Places a new Window, Door, Skylight, Section, Elevation, Interior Elevation, ChangeMarker, Detail, or Worksheet element with the specified marker into the current database.
GSErrCode ACAPI_Element_CreateExt ( API_Element* element, API_ElementMemo* memo, UInt32 nSubElems, API_SubElement* subElems );
Parameters
- element
- [in/out] The desired element will be created in the pointed structure. The
element->header.type
must specify the type of the element to be created. It can beAPI_WindowID, API_DoorID, API_CutPlaneID, API_ElevationID, API_InteriorElevationID, API_ChangeMarkerID, API_DetailID
,API_WorksheetID, API_CurtainWallID
orAPI_StairID
. - memo
- [in] The memo field of the desired element will be created from the pointed structure (if the memo field is needed).
- nSubElems
- [in] The number of subelems passed.
- API_SubElement
- [in] Subelem / marker related information.
Return Values
NoError
- The function has completed with success.
APIERR_BADDATABASE
- The current database is not proper for the operation.
APIERR_BADPARS
- The
element
parameter isnullptr
, or the element type is invalid, or
the element type is not supported by the server application. TheelementMarker->header.type
is notAPI_ObjectID
. APIERR_REFUSEDPAR
- The
element->header.type
parameter was incorrect. It might happen if you want to create something in a window not capable to display it, for example a cut plane in a section window. APIERR_INVALFLOOR
- The
element->header.floorInd
parameter is out of range.
For other common API errors see the API Errors document.
Remarks
The type of the element to be created is defined by type
in the element header. On return, the guid
field of the header is filled in. Don’t forget to call ACAPI_DisposeElemMemoHdls to dispose the handles when you don’t need them any more.
The meaning of the different parameters is explained in the table below:
element |
memo |
elementMarker |
memoMarker |
elementMarker2 |
memoMarker2 |
---|---|---|---|---|---|
API_WindowType API_DoorType |
addpar | window/door marker object | marker object parameters | – | – |
API_SkylightType ![]() |
addpar | window/door marker object | marker object parameters | – | – |
API_CutPlaneType | cutplane coordinates | section marker object on floorplan | section marker object parameters | story handle marker object on section | story handle marker object parameters |
API_ChangeMarkerType | polygon data (optional) | ChangeMarker marker object | marker object parameters | – | – |
API_DetailType API_WorksheetType |
polygon data (optional) | detail drawing/worksheet marker object | marker object parameters | – | – |
For more details and instructions see the description of ACAPI_Element_Create.
Requirements
- Version: API 4.3 or later
- Header: ACAPinc.h
See Also
API_Element, API_ElementMemo, API_SubElement
ACAPI_Element_Create, ACAPI_DisposeElemMemoHdls
ACAPI_Element_GetDefaultsExt, ACAPI_Element_ChangeDefaultsExt
API_WindowType, API_SkylightType, API_CutPlaneType
API_ElevationType, API_InteriorElevationType, API_ChangeMarkerType, API_DetailType, API_WorksheetType
Element Manager, API Functions