Retrieves all additional information attached to elements.
GSErrCode ACAPI_Element_GetMemo (
const API_Guid& guid,
API_ElementMemo* memo,
UInt64 mask = APIMemoMask_All
);
Parameters
- guid

- [in] Guid of the element.
- memo
- [out] Pointer to the memo to be filled.
- mask

- [in] Specifies which part of the memo you are interested in.
Return Values
NoError- The function has completed with success.
APIERR_BADPARS- The passed
memoparameter isnullptr APIERR_BADID- The element type is invalid, or
the element type is not supported by the server application APIERR_BADID- The element guid is invalid.
APIERR_DELETED- The element does not exist in the database
APIERR_MEMFULL- not enough memory to complete the operation
For other common API errors see the API Errors document.
Remarks
This function returns additional information attached to elements. This doesn’t apply to all the drawing elements; you can check the hasMemo field of the element header.
The following table shows which elements may have additional data attached; it also explains what information is returned in API_ElementMemo.
|
Value |
Parameters |
Function (📝) |
|---|---|---|
|
|
(API_Gable **) gables |
Returns the gable1 and the polygon data2 and the vector image data of the complex cross-section profile5. May also return the windows and doors in this wall. |
|
|
(API_Gable **) gables |
Returns the gable data1, the vector image data of the complex cross-section profile5 and segment related information. |
|
|
(API_Gable **) gables |
Returns the gable data1, the vector image data of the complex cross-section profile5, the holes of the beam, and segment related information. |
|
|
(API_Gable **) gables |
Returns the gable data1 and the parameters of the instance of a library part4, also the window / door orientation text in textContent. |
|
|
(API_Gable **) gables |
Returns the gable data1 and the parameters of the instance of a library part4 |
|
|
(API_AddParType **) params |
Returns the parameters of the instance of a library part4 |
|
|
(API_Coord **) coords |
Returns the polygon2, the edge trim data3 and the side materials6 of the slab. |
|
|
(API_Coord **) coords |
|
|
|
(API_Coord **) coords |
Returns the polygon2 of the mesh, and the level lines |
|
|
API_ShellShapeData shellShapes[2] |
Returns the profile shape polygon(s)8 and the clipping and hole contour data9 of the shell |
|
|
(Modeler::Body*) morphBody |
Returns the body and the material override map table of the morph |
|
|
(API_DimElem **) dimElems |
Returns the coordinates, the neig information, the text, and the witness line information of the dimension |
|
|
(char **) textContent (API_AddParType **) params |
Returns the text and its style for text-type labels, or the parameters of the originating library part for symbol labels. |
|
|
(API_Coord **) coords |
Returns the Bezier curve parameters |
|
|
(char **) textContent |
Returns the content the line starts (offsets into |
|
|
(API_Coord **) coords |
Returns the polygon of the hatch |
|
|
(API_Gable **) gables |
Returns the polygon of the room2 |
|
|
(API_LinkType **) linkList |
Returns the data of the camera |
|
|
(API_Coord **) sectionSegmentMainCoords |
Returns the coordinates of the main, amrked distant area, and depth line of the section segment. |
|
|
(API_Coord **) sectionSegmentMainCoords |
Returns the coordinates of the main, amrked distant area, and depth line of the section segment. |
|
|
(API_SectionSegment **) intElevSegments |
Returns the coordinates of the main, amrked distant area, and depth line of the section segment, and also the parameters of the common marker. |
|
|
(API_Coord **) coords |
Returns the polygon of the ChangeMarker2, if it has a polygon. |
|
|
(API_Coord **) coords |
Returns the polygon of the detail or worksheet2 |
|
|
(API_Coord **) coords |
Returns the polygon of the polyline2 |
|
|
(char **) pictHdl |
Returns the picture |
|
|
(API_Coord **) coords |
Returns the polygon and drawing data of a drawing element |
|
|
(API_Coord **) coords |
Returns the polygon and all CW related data. |
|
|
(API_GridMesh*) cWSegGridMesh (API_CWContourData*) cWSegContour (API_CWSegmentPatternData) cWSegPrimaryPattern (API_CWSegmentPatternData) cWSegSecondaryPattern (API_CWSegmentPatternCellData*) cWSegPatternCells |
Returns the CW segment related data. |
|
|
(API_Coord **) coords |
Returns the coordinates of the panel’s polygon. Please note that a curtain wall panel cannot contain holes. |
|
|
(API_StairRiserType*) stairRisers; (API_StairTreadType*) stairTreads; (API_StairStructureType*) stairStructures; (API_StairBoundaryData[2]) stairBoundary; |
Returns the Stair related data. |
|
|
(API_Coord **) coords (Int32 **) pends (API_PolyArc **) parcs (API_RailingNodeType*) railingNodes; (API_RailingSegmentType*) railingSegments; (API_RailingPostType*) railingPosts; (API_RailingRailEndType*) railingRailEnds; (API_RailingRailEndType*) railingHandrailEnds; (API_RailingRailEndType*) railingToprailEnds; (API_RailingRailConnectionType*) railingRailConnections; (API_RailingRailConnectionType*) railingHandrailConnections; (API_RailingRailConnectionType*) railingToprailConnections; (API_RailingRailType*) railingRails; (API_RailingToprailType*) railingToprails; (API_RailingHandrailType*) railingHandrails; (API_RailingPatternType*) railingPatterns; (API_RailingInnerPostType*) railingInnerPosts; (API_RailingPanelType*) railingPanels; (API_RailingBalusterSetType*) railingBalusterSets; (API_RailingBalusterType*) railingBalusters; (double**) polyZCoords; |
Returns the Railing related data. |
1 Any number of gables can be present.
2 See the description of API_Polygon.
3 The length of the API_EdgeTrim memo handle is(poly.nCoords+1)*sizeof(API_EdgeTrim); the first and the last record are not used, filled with zero.
4 The parameters of an element are the parameters of its originating library part, their values are taken from the actual instance.
5 The drawing primitives of the complex profile are stored in a serialized HGX::VectorImage.
6 The length of thesideMaterialsmemo array is(poly.nCoords+1)*sizeof(API_OverriddenAttribute); the first and the last record are not used, filled with zero.
7 The length of thepivotPolyEdgesmemo array is(pivotPolygon.nCoords+1)*sizeof(API_PivotPolyEdgeData); the first and the last record are not used, filled with zero.
8 Fixed size array of twoAPI_ShellShapeDatarecords. The members of API_ShellShapeData are handled similarly to the members of API_Polygon.
9 The number of API_ShellContourData records in theshellContoursmemo array can be calculated from the API_ShellType parameters:numHoles+(hasContour?1:0).
For improving performance you can select which data is needed with the mask parameter. This feature provides filtered access to the attached data; instead of converting all the attached data, the function returns only those which are in interest.
The possible values of the mask are:
Mask Meaning APIMemoMask_PolygonReturns the polygon for polygonal elements. For more information see API_Polygon. APIMemoMask_GablesReturns the gable information. APIMemoMask_AddParsReturns the additional parameters of a library part-based element (object, lamp, door, window, zone stamp, label). APIMemoMask_EdgeTrimsReturns the edge trim information for roofs and slabs. (Renamed from APIMemoMask_RoofSide.)APIMemoMask_MeshPolyZReturns Z coordinates of the mesh points for meshes. APIMemoMask_MeshLevelReturns the mesh level information for meshes. APIMemoMask_BeamHoleReturns the hole information for beams. APIMemoMask_TextContentReturns the content as ANSI string for textual elements (Text, Label). (This is the default.) APIMemoMask_ParagraphReturns paragraph informations for textual elements (Text, Label). The paragraphshandle contains byte offsets. Use withAPIMemoMask_TextContentmask. (This is the default.)APIMemoMask_TextContentUniReturns the content as UniCode string for textual elements (Text, Label). You should cast the textContent handle to unsigned short **APIMemoMask_ParagraphUniReturns paragraph informations for textual elements (Text, Label). The paragraphshandle contains character offsets. Use withAPIMemoMask_TextContentUnimask.APIMemoMask_DrawingDataReturns the drawing data of a drawing element (API_DrawingType) in internal format. See also APIDb_StopDrawingDataID. APIMemoMask_CustomOrigProfileReturns the original custom profile data applied to the wall, beam, or column element. APIMemoMask_StretchedProfileReturns the stretched profile actually used by the wall, beam, or column element. APIMemoMask_SectionSegmentsReturns the section segments of a section, elevation, or interior elevation element. APIMemoMask_SectionMainCoordsReturns the section view line coordinates of a section, elevation, or interior elevation element. APIMemoMask_SectionDistCoordsReturns the section marked distant area line coordinates of a section, elevation, or interior elevation element. APIMemoMask_SectionDepthCoordsReturns the section depth line coordinates of a section, elevation, or interior elevation element. APIMemoMask_WallWindowsReturns the Guid list of the windows placed in a given wall element. APIMemoMask_WallDoorsReturns the Guid list of the doors placed in a given wall element. APIMemoMask_CWSegGridMeshReturns the GridMesh of a curtain wall segment. APIMemoMask_CWSegPrimaryPatternReturns the primary pattern of a curtain wall segment. APIMemoMask_CWSegSecPatternReturns the secondary pattern of a curtain wall segment. APIMemoMask_CWSegPanelPatternReturns the panel pattern of curtain wall segment. APIMemoMask_CWSegContourReturns the contour of curtain wall segment. APIMemoMask_CWallSegmentsReturns the segments of curtain wall element. APIMemoMask_CWallFramesReturns the frames of curtain wall element. APIMemoMask_CWallPanelsReturns the panels of curtain wall element. APIMemoMask_CWallJunctionsReturns the junctions of curtain wall element. APIMemoMask_CWallAccessoriesReturns the accessories of curtain wall element. APIMemoMask_FromFloorPlanAdditional flag; take the element information from the floor plan database. This flag is excluded from APIMemoMask_All!APIMemoMask_RoofEdgeTypesReturns the edge types of the contour polygon of a roof element. APIMemoMask_SideMaterialsReturns the side material indices of a Slab or Roof element. APIMemoMask_PivotPolygonReturns the pivot polygon and the pivot edges of a Multi-plane Roof element (see API_PolyRoofData). APIMemoMask_StairRiserReturns the Riser subelements of a Stair element. APIMemoMask_StairTreadReturns the Tread subelements of a Stair element. APIMemoMask_StairStructureReturns the Stair Structure subelements of a Stair element. APIMemoMask_RailingNodeReturns the Nodes of a Railing element. APIMemoMask_RailingSegmentReturns the Segments of a Railing element. APIMemoMask_RailingPostReturns the Railing Posts of a Railing element. APIMemoMask_RailingInnerPostReturns the Inner Posts of a Railing element. APIMemoMask_RailingRailReturns the Rails of a Railing element. APIMemoMask_RailingHandrailReturns the Handrails of a Railing element. APIMemoMask_RailingToprailReturns the Toprails of a Railing element. APIMemoMask_RailingPanelReturns the Railing Panels of a Railing element. APIMemoMask_RailingBalusterReturns the Balusters of a Railing element. APIMemoMask_RailingPatternReturns the Railing Patterns of a Railing element. APIMemoMask_RailingBalusterSetReturns the Baluster Sets of a Railing element. APIMemoMask_RailingRailEndReturns the Rail Ends of a Railing Node element. APIMemoMask_RailingRailConnectionReturns the Rail Connections of a Railing Node element. APIMemoMask_BeamSegmentReturns the Beam segments of a Beam element. APIMemoMask_ColumnSegmentReturns the Column segments of a Column element. APIMemoMask_AssemblySegmentCutReturns cuts of a Column or a Beam element. APIMemoMask_AssemblySegmentSchemeReturns schemes of ColumnSegments or BeamSegments. APIMemoMask_AssemblySegmentProfileReturns profiles of ColumnSegments or BeamSegments. APIMemoMask_SurfaceLoadCustomDataReturns the contour of the Custom Surface Load APIMemoMask_AllReturns all the applicable fields for the element.
Do not forget to call ACAPI_DisposeElemMemoHdls to dispose of the handles when you’re finished.
Example
void DoAnything (const API_Guid&) { API_Element element = {}; API_ElementMemo memo; GSErrCode err; element.header.guid = guid; err = ACAPI_Element_Get (&element); if (err == NoError && element.header.hasMemo) { err = ACAPI_Element_GetMemo (element.header.guid, &memo, APIMemoMask_Gables); if (err == NoError) { /* ... do anything with it ... */ } ACAPI_DisposeElemMemoHdls (&memo); } }
Requirements
- Version: API 1.3 or later
- Header: ACAPinc.h
See Also
API_ElemTypeID, API_Polygon, API_ElementMemo
ACAPI_DisposeElemMemoHdls
Element Manager, API Functions