Draws the primitives of the Story Level Control elements on the given Section/Elevation database.

    GSErrCode ACAPI_Database (
        API_DatabaseUnId*     databaseUnId,
        ShapePrimsProc*       shapePrimsProc



[in] The unique ID of the database
[in] The function to be called to process the element primitives


Return Values

The function has completed with success.
The passed dbUnID or the shapePrimsProc parameter nullptr,
or dbUnID contains invalid database reference.
The database referenced by dbUnID is not Section, or cannot find the linked Cut Plane element.
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.



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.



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);



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