Element Manager


To have an overview what the elements are, and how they fit into the entire database please refer to the Element Overview chapter.

In these papers only the handler functions are explained in full details.

 

Handler Functions

All of the element handler functions begins with the ACAPI_Element_ prefix. This function family gives support to query the element database, to modify the existing items, and also to create new instances. Refer to the functions below to have details on these topics.

The following functions manage the current setting defaults:

ACAPI_Element_GetDefaults
ACAPI_Element_GetDefaultsExt
ACAPI_Element_ChangeDefaults
ACAPI_Element_ChangeDefaultsExt

Use the functions below to enumerate elements and to query the data of an element:

ACAPI_Element_GetElemList  12
ACAPI_Element_GetConnectedElements  Featuring API 15
ACAPI_Element_Filter
ACAPI_Element_Get
ACAPI_Element_GetHeader  Featuring API 11
ACAPI_Element_GetMemo

ACAPI_Element_GetComponents_Obsolete
ACAPI_Element_GetDescriptors
ACAPI_Element_GetPropertyObjects
ACAPI_Element_GetQuantities
ACAPI_Element_GetMoreQuantities
ACAPI_Element_GetSurfaceQuantities
ACAPI_Element_GetRelations
ACAPI_Element_GetSyTran
ACAPI_Element_GetHotspots  12
ACAPI_Element_Get3DInfo

ACAPI_Element_GetLinkedPropertyObjects  6.1

ACAPI_Element_GetCategoryValue  Featuring API 19
ACAPI_Element_GetCategoryValueDefault  Featuring API 19

ACAPI_Element_ShapePrims
ACAPI_Element_ShapePrimsExt  Featuring API 12
ACAPI_Element_Decompose  Featuring API 15

ACAPI_Element_GetVisualOverriddenImage  Featuring API 20
ACAPI_Element_GetActualOverrideStyle  Featuring API 20

Modify the data of existing elements with the functions:

ACAPI_Element_Change
ACAPI_Element_ChangeExt
ACAPI_Element_ChangeMore  Featuring API 10

ACAPI_Element_ChangeMemo
ACAPI_Element_ChangeParameters

ACAPI_Element_SetLinkedPropertyObjects  6.1

ACAPI_Element_SetCategoryValue  Featuring API 19
ACAPI_Element_SetCategoryValueDefault  Featuring API 19

ACAPI_Element_Edit
ACAPI_Element_Tool

Other control functions:

ACAPI_Element_Create
ACAPI_Element_CreateExt
ACAPI_Element_Delete
ACAPI_Element_Select
ACAPI_Element_GrantElements  Featuring API 23

Controlling the user data assigned to an element:

ACAPI_Element_GetUserData
ACAPI_Element_SetUserData
ACAPI_Element_DeleteUserData

Monitoring elements:

ACAPI_Element_AttachObserver
ACAPI_Element_DetachObserver
ACAPI_Element_GetObservedElements

Creating links between elements:

ACAPI_Element_Link
ACAPI_Element_Unlink
ACAPI_Element_GetLinks
ACAPI_Element_GetLinkFlags

Solid operations between elements:

ACAPI_Element_SolidLink_Create
ACAPI_Element_SolidLink_GetFlags
ACAPI_Element_SolidLink_GetOperation
ACAPI_Element_SolidLink_GetOperators
ACAPI_Element_SolidLink_GetTargets
ACAPI_Element_SolidLink_GetTime
ACAPI_Element_SolidLink_Remove
ACAPI_Element_SolidOperation_Create  API 20 feature

Composition of Roof and Shell elements: Featuring API 15

ACAPI_Element_Trim_Elements
ACAPI_Element_Trim_ElementsWith
ACAPI_Element_Trim_Remove
ACAPI_Element_Trim_GetTrimType
ACAPI_Element_Trim_GetTrimmedElements
ACAPI_Element_Trim_GetTrimmingElements

ACAPI_Element_Merge_Elements  Featuring API 18
ACAPI_Element_Merge_GetMergedElements  Featuring API 18
ACAPI_Element_Merge_Remove  Featuring API 18

IFC data management: Featuring API 16

ACAPI_Element_GetElemListByIFCIdentifier  Featuring API 18
ACAPI_Element_GetIFCIdentifier  Featuring API 18

ACAPI_Element_GetIFCType  Featuring API 19

ACAPI_Element_GetIFCAttributes
ACAPI_Element_SetIFCAttribute

ACAPI_Element_GetIFCProperties
ACAPI_Element_SetIFCProperty
ACAPI_Element_RemoveIFCProperty

ACAPI_Element_GetIFCClassificationReferences
ACAPI_Element_SetIFCClassificationReference
ACAPI_Element_RemoveIFCClassificationReference

ACAPI_Element_GetIFCPropertyValuePrimitiveType

Properties:  API 20 feature

ACAPI_Element_GetPropertyDefinitions
ACAPI_Element_GetPropertyValuesOfDefaultElem Featuring API 22
ACAPI_Element_GetPropertyValues
ACAPI_Element_GetPropertyValuesByGuid
ACAPI_Element_GetPropertiesDefault
ACAPI_Element_SetProperties
ACAPI_Element_SetPropertiesOfDefaultElem Featuring API 22
ACAPI_Element_SetProperty Featuring API 22
ACAPI_Element_IsPropertyDefinitionAvailable Featuring API 21
ACAPI_Element_IsPropertyDefinitionAvailableDefault Featuring API 21
ACAPI_Element_IsPropertyDefinitionValueEditable Featuring API 22
ACAPI_Element_IsPropertyDefinitionValueEditableDefault Featuring API 22
ACAPI_Element_IsPropertyDefinitionVisible Featuring API 21
ACAPI_Element_IsPropertyDefinitionVisibleDefault Featuring API 21

ACAPI_ElementList_AddProperty
ACAPI_ElementList_ModifyPropertyValue
ACAPI_ElementList_DeleteProperty

Classifications of the elements: API 21 feature

ACAPI_Element_GetClassificationItems
ACAPI_Element_GetClassificationInSystem
ACAPI_Element_AddClassificationItem
ACAPI_Element_RemoveClassificationItem
ACAPI_Element_GetClassificationItemsDefault
ACAPI_Element_GetClassificationInSystemDefault
ACAPI_Element_AddClassificationItemDefault
ACAPI_Element_RemoveClassificationItemDefault
ACAPI_Element_IsClassificationItemVisible
ACAPI_Element_IsClassificationItemVisibleDefault

Converter functions:

ACAPI_Element_UnIdToGuid  Featuring API 11
ACAPI_Element_GuidToUnId  Featuring API 11
ACAPI_Element_LinkIdToDrwGuid  Featuring API 12
ACAPI_Element_DrwGuidToLinkId  Featuring API 12

Collision detection function:

ACAPI_Element_GetCollisions  Featuring API 21

 

General Error Codes

APIERR_BADDATABASE

The current database is not proper for the operation.

APIERR_BADID

invalid reference;
an element GUID is invalid (no such element exists), the element type is invalid or the operation cannot apply that type

APIERR_DELETED

invalid reference;
the element does not exist in the database (deleted)

APIERR_NOTMINE

permission denied;
the element is out of the users workspace

 

Notes

All the functions are working on the current database; refer to the ACAPI_Database function how to control the current database.