Virtually draws the shape of an element
GSErrCode ACAPI_Element_ShapePrimsExt ( const API_Elem_Head& elemHead, ShapePrimsProc* shapePrimsProc, API_ShapePrimsParams* shapePrimsParams );
Parameters
- elemHead
- [in] Identifies the element to be processed.
- shapePrimsProc
- [in] The function to be called to process the element primitives.
- shapePrimsParams
- [in] Shape primitives parameters structure to process the shape primitives by.
Return Values
NoError
- The function has completed with success.
APIERR_BADDATABASE
- Not the appropriate database was open for the operation. For example you tried to access a 2D element while the 3D window – and also the 3D database – was active.
APIERR_BADID
- The element type is invalid, or
the elementguid
is invalid, or
the element type is not supported by the server application APIERR_REFUSEDCMD
- This error code is returned when the element specified by the
guid
parameter is not on the current floor. APIERR_REFUSEDPAR
- Elements that cannot be drawn from primitives were specified in the
type
parameter, for exampleAPI_CamSetID
in Archicad.
For other common API errors see the API Errors document.
- This function can return an error code generated by the user defined function specified by the ShapePrimsProc pointer.
Remarks
This function draws the element from drawing primitives (see API_PrimElement), using the shapePrimsProc
function.
The API_PrimElement (the first parameter of ShapePrimsProc) can also contain a control code; these codes mark the beginning and the end of the drawing of sub-parts. It can also contain information on connected elements (e.g. for walls, you get the indices of windows and doors in that wall).
These drawing procedures can not be nested.
To enable Renovation Overrides or Graphical Overrides see APIAny_EnableRenovationOverrideID and APIAny_EnableVisualOverrideID.
Requirements
- Version: API 12.0 or later
- Header: ACAPinc.h
See Also
API_ElemTypeID, API_PrimElement
ShapePrimsProc, API_ShapePrimsParams, ACAPI_Element_ShapePrims
ACAPI_LibPart_ShapePrims
ACAPI_LibPart_GetHotspots, APIDb_DrawStoryControlID
Element Manager, API Functions