2019-01-21 03:03 PM - last edited on 2022-10-04 04:42 PM by Daniel Kassai
Solved! Go to Solution.
2019-01-22 10:20 AM
API_Element element; BNZeroMemory (&element, sizeof (API_Element)); element.header.typeID = API_ObjectID; API_ElementMemo elementMemo; BNZeroMemory (&elementMemo, sizeof (API_ElementMemo)); ACAPI_Element_GetDefaults (&element, &elementMemo); element.object.libInd = libIndex; element.object.pos.x = 3; element.object.pos.y = 0; element.object.level = 0; ACAPI_Element_Create (&element, &elementMemo); ACAPI_DisposeElemMemoHdls (&elementMemo);
2019-01-21 10:14 PM
n.mihaylov wrote:In reply to your questions:
I have to create an element for it and I want to ask the following:
1. Do I have to use ACAPI_Element_Create or some API_LibPart function?
2. In the first case, is this the correct ID - element.header.typeID = API_ObjectID?
3. Do I have to set in the memo the coordinates and sizes of all the "lines" which build this figure? If I already have them imported, can I retrieve them in some way?
2019-01-22 10:20 AM
API_Element element; BNZeroMemory (&element, sizeof (API_Element)); element.header.typeID = API_ObjectID; API_ElementMemo elementMemo; BNZeroMemory (&elementMemo, sizeof (API_ElementMemo)); ACAPI_Element_GetDefaults (&element, &elementMemo); element.object.libInd = libIndex; element.object.pos.x = 3; element.object.pos.y = 0; element.object.level = 0; ACAPI_Element_Create (&element, &elementMemo); ACAPI_DisposeElemMemoHdls (&elementMemo);
2019-01-22 12:52 PM
GS::ucscpy (libPart.docu_UName, L("Object Name")); ACAPI_LibPart_Search (&libPart, false);Thank you both!
2019-02-05 02:59 PM
2019-02-05 03:24 PM
2019-02-06 08:15 AM
API_LibPart libPart; BNZeroMemory (&libPart, sizeof (API_LibPart)); libPart.index = element.object.libInd; ACAPI_LibPart_Get (&libPart);
2019-02-06 10:00 AM
n.mihaylov wrote:It could become confusing if you use the wrong terminology. That code you quoted gives you the definition of a
I found how to get the element:API_LibPart libPart; BNZeroMemory (&libPart, sizeof (API_LibPart)); libPart.index = element.object.libInd; ACAPI_LibPart_Get (&libPart);
2019-02-06 02:37 PM
2019-02-06 02:44 PM
n.mihaylov wrote:Ok, that makes sense as long as the details you are interested in are defined by the library part and can't be overridden by the instance element. For example, the parameter values should be extracted from the element, not the library part (unless you want the defaults).
Yes, I need to get details for my element and so I need the details for its Library Part.