Draws the primitives of the Story Level Control elements on the given Section/Elevation database.
GSErrCode ACAPI_Database ( APIDb_DrawStoryControlID, API_DatabaseUnId* databaseUnId, ShapePrimsProc* shapePrimsProc );
Parameters
- databaseUnId
- [in] The unique ID of the database
- shapePrimsProc
- [in] The function to be called to process the element primitives
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- The passed
dbUnID
or theshapePrimsProc
parameternullptr
,
ordbUnID
contains invalid database reference. APIERR_BADID
- The database referenced by
dbUnID
is not Section, or cannot find the linked Cut Plane element. APIERR_REFUSEDCMD
- Internal initialization failed.
The function can also return the error code generated by the user specified ShapePrimsProc callback function.
For other common API errors see the API Errors document.
Remarks
Use this function to export the primitives of the Story Level Control of a Section/Elevation database.
Similarly to ACAPI_Element_ShapePrims and ACAPI_LibPart_ShapePrims it calls back the passed handler function with each drawing primitive part of the Story Level Handler. Since the Story Level Handler is not a separate element type in API, it is referenced by the database unique ID of the Section/Elevation the Story Levels are displayed on.
The settings of the Story Level lines and Markers can be accessed via the API_CutPlaneType structure.
Note that the primitives are sent only when the value of API_StoryHandleAppearance is APICutPl_SHAAll
in the settings of the Cut Plane element.
Example
API_DatabaseInfo databaseInfo; BNZeroMemory (&databaseInfo, sizeof (API_DatabaseInfo)); GSErrCode err = ACAPI_Database (APIDb_GetCurrentDatabaseID, &databaseInfo, nullptr); if (err == NoError && databaseInfo.typeID == APIWind_SectionID) ACAPI_Database (APIDb_DrawStoryControlID, &(databaseInfo.databaseUnId), MyDrawShapePrimsProc);
Requirements
- Version: API 10 or later
- Header: APIdefs_Database.h
See Also
API_DatabaseUnId, ShapePrimsProc
ACAPI_Element_ShapePrims, ACAPI_LibPart_ShapePrims
API_CutPlaneType, API_StoryHandleAppearance
ACAPI_Database, API Functions