Virtually draws the shape of a registered Library Part.
GSErrCode ACAPI_LibPart_ShapePrims ( Int32 libInd, const API_Guid& instanceElemGuid, short gdlContext, ShapePrimsProc* shapePrimsProc );
- [in] Index of the library part
- [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.
[in] The environment of the GDL object (sets
GLOB_CONTEXTGDL 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
- [in] Callback function for catching the drawing primitives of the Libpart Part shape.
- The function has completed with success.
nullptr, or invalid
libIndparameter has been passed
instanceElemGuidfor the element type that
- The function was called from a ShapePrimsProc; recursion is not allowed
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_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.
- Version: API 1.3 or later
- Header: ACAPinc.h