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
memo
parameter 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 thesideMaterials
memo array is(poly.nCoords+1)*sizeof(API_OverriddenAttribute)
; the first and the last record are not used, filled with zero.
7 The length of thepivotPolyEdges
memo 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_ShellShapeData
records. The members of API_ShellShapeData are handled similarly to the members of API_Polygon.
9 The number of API_ShellContourData records in theshellContours
memo 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_Polygon
Returns the polygon for polygonal elements. For more information see API_Polygon. APIMemoMask_Gables
Returns the gable information. APIMemoMask_AddPars
Returns the additional parameters of a library part-based element (object, lamp, door, window, zone stamp, label). APIMemoMask_EdgeTrims
Returns the edge trim information for roofs and slabs. (Renamed from APIMemoMask_RoofSide
.)APIMemoMask_MeshPolyZ
Returns Z coordinates of the mesh points for meshes. APIMemoMask_MeshLevel
Returns the mesh level information for meshes. APIMemoMask_BeamHole
Returns the hole information for beams. APIMemoMask_TextContent
Returns the content as ANSI string for textual elements (Text, Label). (This is the default.) APIMemoMask_Paragraph
Returns paragraph informations for textual elements (Text, Label). The paragraphs
handle contains byte offsets. Use withAPIMemoMask_TextContent
mask. (This is the default.)APIMemoMask_TextContentUni
Returns the content as UniCode string for textual elements (Text, Label). You should cast the textContent handle to unsigned short **
APIMemoMask_ParagraphUni
Returns paragraph informations for textual elements (Text, Label). The paragraphs
handle contains character offsets. Use withAPIMemoMask_TextContentUni
mask.APIMemoMask_DrawingData
Returns the drawing data of a drawing element (API_DrawingType) in internal format. See also APIDb_StopDrawingDataID. APIMemoMask_CustomOrigProfile
Returns the original custom profile data applied to the wall, beam, or column element. APIMemoMask_StretchedProfile
Returns the stretched profile actually used by the wall, beam, or column element. APIMemoMask_SectionSegments
Returns the section segments of a section, elevation, or interior elevation element. APIMemoMask_SectionMainCoords
Returns the section view line coordinates of a section, elevation, or interior elevation element. APIMemoMask_SectionDistCoords
Returns the section marked distant area line coordinates of a section, elevation, or interior elevation element. APIMemoMask_SectionDepthCoords
Returns the section depth line coordinates of a section, elevation, or interior elevation element. APIMemoMask_WallWindows
Returns the Guid list of the windows placed in a given wall element. APIMemoMask_WallDoors
Returns the Guid list of the doors placed in a given wall element. APIMemoMask_CWSegGridMesh
Returns the GridMesh of a curtain wall segment. APIMemoMask_CWSegPrimaryPattern
Returns the primary pattern of a curtain wall segment. APIMemoMask_CWSegSecPattern
Returns the secondary pattern of a curtain wall segment. APIMemoMask_CWSegPanelPattern
Returns the panel pattern of curtain wall segment. APIMemoMask_CWSegContour
Returns the contour of curtain wall segment. APIMemoMask_CWallSegments
Returns the segments of curtain wall element. APIMemoMask_CWallFrames
Returns the frames of curtain wall element. APIMemoMask_CWallPanels
Returns the panels of curtain wall element. APIMemoMask_CWallJunctions
Returns the junctions of curtain wall element. APIMemoMask_CWallAccessories
Returns the accessories of curtain wall element. APIMemoMask_FromFloorPlan
Additional flag; take the element information from the floor plan database. This flag is excluded from APIMemoMask_All
!APIMemoMask_RoofEdgeTypes
Returns the edge types of the contour polygon of a roof element. APIMemoMask_SideMaterials
Returns the side material indices of a Slab or Roof element. APIMemoMask_PivotPolygon
Returns the pivot polygon and the pivot edges of a Multi-plane Roof element (see API_PolyRoofData). APIMemoMask_StairRiser
Returns the Riser subelements of a Stair element. APIMemoMask_StairTread
Returns the Tread subelements of a Stair element. APIMemoMask_StairStructure
Returns the Stair Structure subelements of a Stair element. APIMemoMask_RailingNode
Returns the Nodes of a Railing element. APIMemoMask_RailingSegment
Returns the Segments of a Railing element. APIMemoMask_RailingPost
Returns the Railing Posts of a Railing element. APIMemoMask_RailingInnerPost
Returns the Inner Posts of a Railing element. APIMemoMask_RailingRail
Returns the Rails of a Railing element. APIMemoMask_RailingHandrail
Returns the Handrails of a Railing element. APIMemoMask_RailingToprail
Returns the Toprails of a Railing element. APIMemoMask_RailingPanel
Returns the Railing Panels of a Railing element. APIMemoMask_RailingBaluster
Returns the Balusters of a Railing element. APIMemoMask_RailingPattern
Returns the Railing Patterns of a Railing element. APIMemoMask_RailingBalusterSet
Returns the Baluster Sets of a Railing element. APIMemoMask_RailingRailEnd
Returns the Rail Ends of a Railing Node element. APIMemoMask_RailingRailConnection
Returns the Rail Connections of a Railing Node element. APIMemoMask_BeamSegment
Returns the Beam segments of a Beam element. APIMemoMask_ColumnSegment
Returns the Column segments of a Column element. APIMemoMask_AssemblySegmentCut
Returns cuts of a Column or a Beam element. APIMemoMask_AssemblySegmentScheme
Returns schemes of ColumnSegments or BeamSegments. APIMemoMask_AssemblySegmentProfile
Returns profiles of ColumnSegments or BeamSegments. APIMemoMask_SurfaceLoadCustomData
Returns the contour of the Custom Surface Load APIMemoMask_All
Returns 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