Virtually draws the shape of a registered Library Part.
GSErrCode ACAPI_LibPart_ShapePrims ( Int32 libInd, const API_Guid& instanceElemGuid, short gdlContext, ShapePrimsProc* shapePrimsProc );
Parameters
- libInd
- [in] Index of the library part
- instanceElemGuid
- [in] Instance element GUID; if APINULLGuid, then the drawing parameters will be the default parameters of the library part (with no transformation, etc.), otherwise they are taken from the instance of the library part defined by this GUID.
- gdlContext
-
[in] The environment of the GDL object (sets
GLOB_CONTEXT
GDL Global parameter).ContextValueDefault (depends on the current database)APIGdl_DefaultLibrary Part Editing Dialog (all windows within it)APIGdl_FromEditFloor Plan WindowAPIGdl_FromFloor3D WindowAPIGdl_From3DWinSection/Elevation WindowsAPIGdl_FromSideLibrary Part Settings DialogAPIGdl_FromDialList generated about Library PartAPIGdl_FromListDetail WindowsAPIGdl_FromDetailLayout WindowsAPIGdl_FromLayout - shapePrimsProc
- [in] Callback function for catching the drawing primitives of the Libpart Part shape.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
shapePrimsProc
isnullptr
, or invalidlibInd
parameter has been passedAPIERR_BADINDEX
- Invalid
instanceElemGuid
for the element type thatlibInd
implies APIERR_NESTING
- The function was called from a ShapePrimsProc; recursion is not allowed
Remarks
This function is used to draw the shape of the Libpart Part; as it would appear on the floor plan.
The key point is the parameter values to use, since it absolutely determines how a Library Part looks like when it is placed. That’s why the instanceElemGuid
parameter should be passed; if it is zero the default parameter set, otherwise the parameter set of an already placed instance will be used.
The shape will be passed to the callback function with the same drawing primitives would be drawn onto the display. Refer to he ShapePrimsProc to get further details.
These drawing procedures cannot be nested. From the callback function it is not allowed to call the ACAPI_LibPart_ShapePrims
function again.
The function works only on Library Parts can be placed onto the floor plan. Applicable type of Library Parts are:
- APILib_WindowID
- APILib_DoorID
- APILib_ObjectID
- APILib_LampID
- APILib_RoomID (zone stamp)
- APILib_LabelID (symbol label)
In order to get the hotspots of a library part or an object instance use the ACAPI_LibPart_GetHotspots function.
Requirements
- Version: API 1.3 or later
- Header: ACAPinc.h
See Also
API_LibTypeID
ShapePrimsProc
ACAPI_Element_ShapePrims
ACAPI_LibPart_GetHotspots
LibPart Manager
API Functions