Functions providing access to the geometrical primitive-level drawing data of elements.
More...
|
typedef GSErrCode | ShapePrimsProc(const API_PrimElement *primElem, const void *par1, const void *par2, const void *par3) |
| Primitive drawing function for elements and library parts.
|
|
Functions providing access to the geometrical primitive-level drawing data of elements.
◆ ShapePrimsProc
typedef GSErrCode ShapePrimsProc(const API_PrimElement *primElem, const void *par1, const void *par2, const void *par3) |
Primitive drawing function for elements and library parts.
- Parameters
-
primElem | The primitive element to draw; can also contain control codes. |
par1 | First parameter for drawing the element (can be nullptr). |
par2 | Second parameter for drawing the element (can be nullptr). |
par3 | Third parameter for drawing the element (can be nullptr). |
- Returns
- NoError - The element was drawn successfully.
- APINOTIFY_NODATA - Supress hierarchical decomposition.
- APINOTIFY_OWN_MEMORY_HANDLER - Tells the API that your add-on took over the ownership of the passed coords, pends and parcs array. For lines, polylines and polygons only.
- APIERR_GENERAL - Any user-defined error can be returned.
◆ ACAPI_DrawingPrimitive_DrawStoryControl()
Draws the primitives of the Story Level Control elements on the given Section/Elevation database.
- Parameters
-
databaseUnId | [in] The unique ID of the database |
shapePrimsProc | [in] The function to be called to process the element primitives |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - The passed dbUnID or the shapePrimsProc parameter nullptr,
- Example
-
◆ ACAPI_DrawingPrimitive_ShapePrims()
Virtually draws the shape of an element.
- Parameters
-
elemHead | [in] Identifies the element to be processed. |
shapePrimsProc | [in] The function to be called to process the element primitives. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - The passed parameter is nullptr; element
- 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,
- Example
- The following example shows the usage of ACAPI_DrawingPrimitive_ShapePrims and a sample ShapePrimsProc functions
const void *par1,
const void *par2,
const void *par3)
{
default: break;
}
return NoError;
}
In the main program
for (GS::Array<API_Guid>::ConstIterator it = elemList.Enumerate (); it != nullptr && !lastErr; ++it) {
header = {};
}
◆ ACAPI_DrawingPrimitive_ShapePrimsExt()
Virtually draws the shape of an element.
- 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. |
- Returns
- 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 element guid 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 example
API_CamSetID
in Archicad.