Archicad 30 C++ API
Loading...
Searching...
No Matches
Element Manager

To have an overview what the elements are, and how they fit into the entire database please refer to the Element Overview chapter. In these papers only the handler functions are explained in full details. More...

Classes

class  ACAPI::Element::Opening
 
class  ACAPI::Element::Opening::Modifier
 
class  ACAPI::Element::OpeningDefault
 The ElementDefault contains the necessary non-geometric data for creating a MEP element. More...
 
class  ACAPI::Element::OpeningDefault::Modifier
 
class  ACAPI::Element::OpeningExtrusionParameters
 
class  ACAPI::Element::ModifiableOpeningExtrusionParameters
 
class  ACAPI::Element::OpeningFloorPlanParameters
 
class  ACAPI::Element::ModifiableOpeningFloorPlanParameters
 
class  ACAPI::Element::OpeningGeometry
 
class  ACAPI::Element::ModifiableOpeningGeometry
 
class  ACAPI::ElementBase
 A base class for all elements. More...
 
class  ACAPI::ElementDefault
 A base class for all element defaults. More...
 
class  ACAPI::ZoneBoundary
 Represents a boundary between a Zone and another element. A boundary is the intersection of the coplanar surfaces of the Zone body and the boundary element. The surface will be split into multiple boundaries if it is connected to multiple Zones, one boundary for each Zone. A boundary can be either internal or external. An internal boundary is between two Zones, otherwise it is external. More...
 
class  ACAPI::ZoneBoundaryQuery
 This class can be used to query the boundaries of Zones. Before use an Update must be called on it. More...
 
class  ACAPI::ZoneBoundaryQuery::Modifier
 Modifier of the ZoneBoundaryQuery. More...
 
class  API_ElementDecomposerInterface
 Interface class for the element decomposition process. More...
 
struct  API_InteriorElevationType
 An iterior elevation element. More...
 
struct  API_AnalyticalNode
 Describes a Structural Analytical Node. More...
 
struct  API_AnalyticalCurve
 Describes a Structural Analytical Model Curve that is either a line segment between two Structural Analytical Model Nodes, or an arc segment with a specified intermediate point. More...
 
struct  API_SurfaceLoadCustomData
 Describes Custom Surface Coordinates for Surface Load. More...
 
struct  API_Sector
 Describes the geometry of a 2D line. More...
 
struct  API_Box3D
 Rectangular region of the model with Z extent. More...
 
struct  API_GridMeshHead
 General header for Grid Mesh type. More...
 
struct  API_GridMeshVertex
 Describes a Grid Mesh vertex. More...
 
struct  API_GridMeshEdge
 Describes a Grid Mesh edge. More...
 
struct  API_GridEdgeInfo
 Contains extended information of a API_GridMeshEdge. More...
 
struct  API_GridMeshLine
 Describes a grid line of the mesh. More...
 
struct  API_GridMeshPolygon
 A 3D mesh polygon with four edge indices. More...
 
struct  API_GridMesh
 Describes a Curtain Wall segment geometry. More...
 
struct  API_Interval
 Describes an interval, handling possible periodicity. More...
 
struct  API_NotifyElementType
 Describes the element the notification is coming for, and the type of the notification. More...
 
struct  API_ComponentID
 Identifies a component. More...
 
struct  API_ElemComponentID
 Identifies a component of an element. More...
 
struct  API_RoomReductionPolyType
 Parameters to get room reduction data. More...
 
struct  API_ElemURLRef
 URL reference to be stored into elements. More...
 
struct  API_ElemType
 The type of an element. More...
 
struct  std::hash< API_ElemType >
 std::hash specialization for API_ElemType. More...
 
struct  API_Elem_Head
 General element header for element types. More...
 
struct  API_ElemPartId
 Identify a part of an element. It's valid for PolyRoof and Morph only. More...
 
struct  API_HatchOrientation
 Fill orientation and distortion parameters. More...
 
struct  API_CoverFillTransformation
 Fill orientation and distortion parameters. More...
 
struct  API_SyTran
 Symbol transformation parameters. More...
 
struct  API_StoryVisibility
 Determines the appearance of model elements on different stories. More...
 
struct  API_LinkToSettings
 Option for linking model elements to their home stories. More...
 
struct  API_EdgeTrim
 Describes the parameters of a roof or slab edge. In previous API versions this structure used to be called API_RoofSide. More...
 
struct  API_ArrowData
 Describes the arrows at line ends. More...
 
struct  API_NoteType
 Describes a general note, used in dimensioning and hatch text. More...
 
struct  API_Gable
 Defines a cutting plane applied to spatial elements. More...
 
struct  API_WallType
 Represents a wall element. More...
 
struct  API_CWSegmentPatternCellData
 Represents a curtain wall segment cell. More...
 
struct  API_CWSegmentPatternData
 Represents the horizontal (primary) or vertical (secondary) pattern of a Curtain Wall segment. More...
 
struct  API_CWSegmentType
 Represents a curtain wall segment element. More...
 
struct  API_CWFrameType
 Represents a Curtain Wall Frame element. More...
 
struct  API_CWPanelType
 Represents a Curtain Wall Panel element. More...
 
struct  API_CWJunctionType
 Represents a curtain wall junction element. More...
 
struct  API_CWAccessoryType
 Represents a curtain wall accessory element. More...
 
struct  API_CurtainWallType
 Represents a Curtain Wall element. More...
 
struct  API_AssemblySegmentData
 Represents a general segment. More...
 
struct  API_AssemblySegmentSchemeData
 Represents a segment scheme. More...
 
struct  API_AssemblySegmentProfileData
 Represents a segment of the beam element. More...
 
struct  API_AssemblySegmentCutData
 Represents a cut on segment. More...
 
struct  API_ColumnSegmentType
 Represents a segment of the column element. More...
 
struct  API_ColumnType
 Represents a column element. More...
 
struct  API_BeamSegmentType
 Represents a segment of the beam element. More...
 
struct  API_Beam_Hole
 Describes a beam hole. More...
 
struct  API_BeamType
 Represents a beam element. More...
 
struct  API_VerticalLink
 Option for anchoring the vertical position of an opening within the wall or the roof. More...
 
struct  API_OpeningBaseType
 Represents the common part of window, door and skylight elements. More...
 
struct  API_WindowType
 Represents a window element. More...
 
struct  API_SkylightType
 Represents a skylight element. More...
 
struct  API_ObjectType
 Represents an object or a lamp, or a symbol label. More...
 
struct  API_SlabType
 Represents a slab element. More...
 
struct  API_ShellBaseType
 The common parameters of roof (API_RoofType) and shell (API_ShellType) elements. More...
 
struct  API_RoofLevelData
 Defines a level of a polyroof plane. This structure is used in API_PolyRoofData. More...
 
struct  API_Wrapping
 Texture wrapping parameters. This structure is used in API_LocalCoordsType. More...
 
struct  API_LocalCoordsType
 Texture applying parameters. This structure is used in API_LocalCoordsData. More...
 
struct  API_LocalCoordsData
 Dynamic array of API_LocalCoordsType items. This structure is used in API_RoofSegmentData. More...
 
struct  API_RoofSegmentData
 Describes various properties/parameters of a roof segment that can be separately adjusted. This structure is used in API_PivotPolyEdgeData. More...
 
struct  API_PivotPolyEdgeData
 Complete polygon descriptor for polyroofs and shells. This structure is used in API_ElementMemo. More...
 
struct  API_PlaneRoofData
 This structure holds the Single-plane Roof specific data of API_RoofType. More...
 
struct  API_PolyRoofData
 This structure holds the Multi-plane Roof specific data of API_RoofType. More...
 
struct  API_RoofType
 Represents a roof element. More...
 
struct  API_ContourEdgeData
 Parameters of a shell contour edge. More...
 
struct  API_ShellShapeData
 Contains the profile data of the Shell element. This structure is used in API_ElementMemo. More...
 
struct  API_ShellContourData
 Shell contour or shell hole contour definition. This structure is used in API_ElementMemo. More...
 
struct  API_ExtrudedShellData
 This structure holds the Extruded Shell specific data of API_ShellType. More...
 
struct  API_RevolvedShellData
 This structure holds the Revolved Shell specific data of API_ShellType. More...
 
struct  API_RuledShellData
 This structure holds the Ruled Shell specific data of API_ShellType. More...
 
struct  API_ShellType
 Represents a shell element. More...
 
struct  API_MorphType
 Represents a morph element. More...
 
struct  API_MeshLevelCoord
 Describes one coordinate of a mesh level line. More...
 
struct  API_MeshLevel
 Defines the level lines of a mesh. More...
 
struct  API_MeshType
 Represents a mesh. More...
 
struct  API_MarkerData
 Describes the various parameters of dimension markers. More...
 
struct  API_Base
 The base of a non-static linear, angle or radial dimension element. More...
 
struct  API_DimBase
 Describes the base element for dimensioning. More...
 
struct  API_DimElem
 Describes a dimension element. More...
 
struct  API_DimensionType
 Describes a (linear) dimension. More...
 
struct  API_RadialDimensionType
 Represents a radial dimension. More...
 
struct  API_LevelDimensionType
 Represents a level dimension. More...
 
struct  API_AngleDimensionType
 Represents an angle dimension. More...
 
struct  API_TabType
 Describes a tabulator of a paragraph. More...
 
struct  API_RunType
 Describes a continuous monostyle piece - called run - of a paragraph. More...
 
struct  API_ParagraphType
 Describes a paragraph of a text. More...
 
struct  API_TextFrameType
 Parameters of the Text frame shape. More...
 
struct  API_TextType
 Represents a text, or a textual label. More...
 
struct  API_LabelType
 Represents a textual or a symbol label. More...
 
struct  API_ZoneType
 Represents a zone stamp. More...
 
struct  API_ExtendedPenType
 Describes the optionally overridden pen used for hatches. More...
 
struct  API_HatchType
 Represents a hatch element. More...
 
struct  API_LineType
 Represents a 2D line. More...
 
struct  API_PolyLineType
 Represents a 2D polyline. More...
 
struct  API_ArcType
 Represents an elliptical or circular arc. More...
 
struct  API_SplineDir
 Describes the control handles for Bezier-splines. More...
 
struct  API_SplineType
 Represents a cubic or Bezier-spline. More...
 
struct  API_HotspotType
 Represents a hotspot. More...
 
struct  API_PictureType
 Represents a figure (picture) element. More...
 
struct  API_SectionSegment
 Represents one segment of a section/elevation/interior elevation. More...
 
struct  API_MarkerLinkDataType
 This type manifestates as a "linkedMarker" named variable in the detail/worksheet, section and elevation API types, and used to set the referring properties of the marker. More...
 
struct  API_CutPlaneType
 Represents a section element. More...
 
struct  API_PerspCamPars
 Parameters of a perspective camera. More...
 
struct  API_LinkType
 Describes a link for cameras. More...
 
struct  API_CameraType
 Represents a single camera. More...
 
struct  API_PersCamSetPars
 Represents a perspective camera set. More...
 
struct  API_CamSetType
 Represents a camera set. More...
 
struct  API_DrawingTitle
 Specifies the drawing's title object. More...
 
struct  API_DrawingType
 Represents a drawing element. More...
 
struct  API_SectElemType
 Describes an element in the section window. More...
 
struct  API_DetailType
 Represents a detail/worksheet (detail/worksheet mark). More...
 
struct  API_HotlinkType
 Represents a Hotlink Module type or XRef type hotlink instance element. More...
 
struct  API_ChangeMarkerType
 Represents a ChangeMarker (a placeable element, not to be confused with the Change from the Change Manager palette). More...
 
struct  API_StairPolylineEdgeData
 Stores data of a stair polyline edge. More...
 
struct  API_StairPolylineVertexData
 Stores data of a stair polyline vertex. More...
 
struct  API_StairPolylineData
 Represents a Stair polyline (baseline or walking line). More...
 
struct  API_StairBoundaryVertexData
 Stores data of a stair boundary vertex. More...
 
struct  API_StairBoundaryEdgeData
 Stores data of a stair boundary edge. More...
 
struct  API_StairBoundaryData
 Represents a Stair boundary. More...
 
struct  API_StairLayoutData
 Represents the layout of a Stair element. More...
 
struct  API_StairRulesData
 Represents a the Rules and Standards of a Stair element. More...
 
struct  API_StairHeadroomData
 Description of the Stair Headroom. More...
 
struct  API_StairStructureDrainingData
 Represents the draining of a monolithic Stair Structure element. More...
 
struct  API_SideStairStructData
 Represents the data of a side supported Stair Structure element. More...
 
struct  API_MonolithStairStructData
 Represents the data of a monolithic Stair Structure element. More...
 
struct  API_StairStructureSymbolData
 Represents the data of a 2D symbol a Stair's Structure elements. More...
 
struct  API_StairMonolithStructureSymbolData
 Represents the data of a monolith Stair's Structure elements. More...
 
struct  API_MonolithPartsVisibilityData
 Describes which types of monolith parts are visible. More...
 
struct  API_StairStructureComponentSettingsVisibilityOnStory
 Describes story's stair structure component visibility settings. More...
 
struct  API_StairStructureComponentSettingsVisibility
 Settings for visibility of the stair component strucutre. More...
 
struct  API_StairRiserType
 Represents a Riser element. More...
 
struct  API_StairTreadType
 Represents a Tread element. More...
 
struct  API_StairStructureType
 Represents a Stair Structure element. More...
 
struct  API_RailingHorizontalPosData
 Represents the horizontal alignment of a Railing subelement. More...
 
struct  API_RailingVerticalPosData
 Represents the vertical position of a Railing subelement. More...
 
struct  API_RailingFrameData
 Represents the boundaries of a Railing subelement. More...
 
struct  API_RailingDistributionData
 Represents the distribution of some Railing subelements. More...
 
struct  API_RailingPostType
 Represents a Railing Post element. More...
 
struct  API_RailingBalusterType
 Represents a Baluster element. More...
 
struct  API_RailingBalusterSetType
 Represents a Baluster Set element. More...
 
struct  API_RailingFinishType
 Represents the finish of a Rail End element. More...
 
struct  API_RailingRailEndType
 Represents a Rail/Handrail/Toprail End element. More...
 
struct  API_RailingRailConnectionType
 Represents a connection between two Rail/Handrail/Toprail elements. More...
 
struct  API_RailingNodeType
 Represents a Railing Node element. More...
 
struct  API_RailingToprailType
 Represents a Toprail element. More...
 
struct  API_RailingHandrailType
 Represents a Handrail element. More...
 
struct  API_RailingRailType
 Represents a Rail element. More...
 
struct  API_RailingInnerPostType
 Represents an Inner Post element. More...
 
struct  API_RailingPanelType
 Represents a Railing Panel element. More...
 
struct  API_RailingPatternType
 Represents a Railing Pattern element. More...
 
struct  API_RailingSegmentType
 Represents a Railing Segment element. More...
 
struct  API_RailingType
 Represents a Railing element. More...
 
struct  API_ExternalElemType
 A struct containing the header and data of an external element type (see API_AnalyticalLinkType). More...
 
union  API_Element
 A union collecting all known element types. More...
 
struct  API_ElementMemo
 Describes the variable length additional data of elements. More...
 
struct  API_SubElement
 Helper structure to create / modify / get markers for window, door, section, elevation, interior elevation, detail, worksheet elements and curtain wall parts. More...
 
struct  API_WallPart
 Section of a wall segment that neighbours a border line of the room. More...
 
struct  API_Niche
 Structure describing a niche in a room. More...
 
struct  API_BeamPart
 Section of a beam that crosses the room. More...
 
struct  API_RoomRelation
 Structure for retrieving data related to a room. More...
 
struct  API_ConnectionGuidItem
 Represents a wall or beam connection. More...
 
struct  API_WallRelation
 Structure for retrieving connection data of a wall. More...
 
struct  API_BeamSegmentRelation
 Structure for retrieving connection data of a beam segment. More...
 
struct  API_BeamRelation
 Structure for retrieving connection data of a beam. More...
 
struct  API_CWPanelRelation
 Structure for retrieving connection data of a curtain wall panel, skylight, window or a door element. More...
 
struct  API_RoofRelation
 Structure for retrieving connection data of a roof or a shell element. More...
 
struct  API_WallQuantity
 Describes the different calculated values for walls. More...
 
struct  API_ColumnQuantity
 Describes the different calculated values for columns. More...
 
struct  API_ColumnSegmentQuantity
 Describes the different calculated values for column segments. More...
 
struct  API_BeamQuantity
 Describes the different calculated values for beams. More...
 
struct  API_BeamSegmentQuantity
 Describes the different calculated values for beam segments. More...
 
struct  API_WindowQuantity
 Describes the different calculated values for windows. More...
 
struct  API_SkylightQuantity
 Describes the different calculated values for skylight. More...
 
struct  API_ObjectQuantity
 Describes the different calculated values for objects. More...
 
struct  API_MorphQuantity
 Returns the morph quantity values. More...
 
struct  API_SlabQuantity
 Describes the different calculated values for slabs. More...
 
struct  API_MeshQuantity
 Describes the different calculated values for meshes. More...
 
struct  API_RoofQuantity
 Gives the different calculated values for roofs. More...
 
struct  API_ShellQuantity
 Returns the shell quantity values. More...
 
struct  API_HatchQuantity
 Describes the different calculated values for fills. More...
 
struct  API_ZoneAllQuantity
 Describes the different calculated values for zones. More...
 
struct  API_CurtainWallQuantity
 Describes the different calculated values for curtain walls. More...
 
struct  API_CWFrameQuantity
 Describes the different calculated values for curtain wall frames. More...
 
struct  API_CWPanelQuantity
 Describes the different calculated values for curtain wall panels. More...
 
struct  API_CWJunctionQuantity
 Describes the different calculated values for curtain wall junctions. More...
 
struct  API_CWAccessoryQuantity
 Describes the different calculated values for curtain wall accessories. More...
 
struct  API_StairQuantity
 Calculates values for stairs. More...
 
struct  API_StairTreadQuantity
 Calculated values for a stair tread. More...
 
struct  API_StairRiserQuantity
 Calculated values for the stair riser. More...
 
struct  API_StairStructureQuantity
 Calculated values for the stair structure. More...
 
struct  API_RailingQuantity
 Calculated values for a railing. More...
 
struct  API_RailingToprailQuantity
 Calculated values for a top rail. More...
 
struct  API_RailingHandrailQuantity
 Calculated values for a handrail. More...
 
struct  API_RailingRailQuantity
 Calculated values for the rails of the railing. More...
 
struct  API_RailingToprailEndQuantity
 Calculated values for the top rail end of the railing. More...
 
struct  API_RailingHandrailEndQuantity
 Calculated values for the handrail end of the railing. More...
 
struct  API_RailingRailEndQuantity
 Calculated values for the rail end of the railing. More...
 
struct  API_RailingToprailConnectionQuantity
 Calculated values for the top rail connection. More...
 
struct  API_RailingHandrailConnectionQuantity
 Calculated values for the handrail connection. More...
 
struct  API_RailingRailConnectionQuantity
 Calculated values for the rail connection. More...
 
struct  API_RailingPostQuantity
 Calculated values for the railing posts. More...
 
struct  API_RailingInnerPostQuantity
 Calculated values for the railing inner posts. More...
 
struct  API_RailingBalusterQuantity
 Calculated values for the balusters. More...
 
struct  API_RailingPanelQuantity
 Calculated values for railing panels. More...
 
struct  API_RailingSegmentQuantity
 Calculated values for the railing segments. More...
 
union  API_ElementQuantity
 Describes the different calculated values. More...
 
struct  API_QuantityPar
 Supplies extra information for some element quantity calculations. More...
 
struct  API_CompositeId
 Identifies the composite skin and sub-element. More...
 
struct  API_CompositeQuantity
 Describes the different calculated values for skins of composite or complex elements. More...
 
struct  API_ElemPartQuantity
 Describes the different calculated values for parts of an element. More...
 
struct  API_ElemPartCompositeQuantity
 Describes the different calculated values for skins of composite or complex elements. More...
 
struct  API_ElemPartSurfaceQuantity
 Describes the different calculated values for surfaces of elements. More...
 
class  API_Quantities
 Describes the different calculated values for skins of composite or complex elements. More...
 
struct  API_ElementQuantityMask
 Describes the filter for the different calculated values for elements. More...
 
class  API_QuantitiesMask
 Describes the filter for the different calculated values for skins and elements. More...
 
struct  API_PropertyObjectRefType
 The property object reference record. More...
 
struct  API_Obsolete_ComponentRefType
 The component reference record. More...
 
struct  API_DescriptorRefType
 The descriptor reference record. More...
 
struct  API_EditPars
 Transformation parameters for elements. More...
 
struct  API_CWallPanel
 A primitive triangle. More...
 
struct  API_ToolBoxItem
 Data of the active toolbox mode. More...
 
struct  API_OverrideStyle
 Specifies what is overridden and how, for an API_Element. More...
 
struct  API_RoomImage
 Structure for retrieving data related to a room. More...
 
struct  API_ElemSearchPars
 Structure to search for an element by coordinate. More...
 
struct  API_TextLinePars
 Represents some text to measure its length. More...
 
struct  API_ContentPars
 It is used at the ACAPI_Element_Change goodie function. More...
 
struct  API_CollisionElem
 A container for storing a collision element created by ACAPI_Element_GetCollisions. More...
 
struct  API_CollisionDetectionSettings
 Collision detection settings used by ACAPI_Element_GetCollisions. More...
 

Typedefs

typedef GSErrCode APIDefaultsChangeHandlerProc(const API_ToolBoxItem *defElemType)
 Callback procedure to receive notifications on changes in element defaults.
 
typedef GSErrCode APIElementEventHandlerProc(const API_NotifyElementType *elemType)
 User supplied callback function for handling changes in elements.
 
typedef void RoomReductionPolyProc(const API_RoomReductionPolyType *roomRed)
 Callback function to get reduction polygons of a room.
 
using API_DoorType = API_WindowType
 Represents a door element.
 
using API_LampType = API_ObjectType
 Represents an object or a lamp, or a symbol label.
 
using API_ElevationType = API_CutPlaneType
 Represents an elevation element.
 
using API_WorksheetType = API_DetailType
 Represents a worksheet (worksheet mark).
 
using API_ElementUserData = API_UserData
 A UserData attached to an Element.
 
using API_CWSegmentPart = API_WallPart
 Section of a curtain wall segment that neighbours a border line of the room.
 
using API_SkylightRelation = API_CWPanelRelation
 Structure for retrieving connection data of a curtain wall panel, skylight, window or a door element.
 
using API_WindowRelation = API_CWPanelRelation
 Structure for retrieving connection data of a curtain wall panel, skylight, window or a door element.
 
using API_DoorRelation = API_CWPanelRelation
 Structure for retrieving connection data of a curtain wall panel, skylight, window or a door element.
 
using API_ShellRelation = API_RoofRelation
 Structure for retrieving connection data of a roof or a shell element.
 
using API_DoorQuantity = API_WindowQuantity
 Describes the different calculated values for doors.
 
using API_LightQuantity = API_ObjectQuantity
 Describes the different calculated values for lights.
 
typedef bool API_ElemFilter[API_LastElemType+1]
 Array for filtering elements.
 
typedef GS::HashTable< API_Guid, GS::Array< API_GridElemID > > API_CWPanelGridIDTable
 This table contains the grid mesh identifiers for each Curtain Wall panel instance (these grid mesh cells are partly or fully covered by the panel).
 
using API_CircleType = API_ArcType
 Represents a circle (derived from the circular arc).
 
typedef API_CompositeQuantity API_CompositeQuantityMask
 Describes the filter for the different calculated values for skins.
 

Enumerations

enum  API_AnalyticalCurveType {
  API_AnalyticalCurve_LineType , API_AnalyticalCurve_ArcType , API_AnalyticalCurve_SplineType , API_AnalyticalCurve_BezierType ,
  API_AnalyticalCurve_EllipseType
}
 Describes the type of the Structural Analytical Model Curve. More...
 
enum class  ACAPI::Element::ShapeType { ShapeType::Rectangular , ShapeType::Circular , ShapeType::Polygonal }
 Type of The opening polygon. More...
 
enum class  ACAPI::Element::Constraint { Constraint::ForcedVertical , Constraint::ForcedHorizontal , Constraint::Aligned , Constraint::Free }
 Orientation of the opening in host element. More...
 
enum class  ACAPI::Element::LimitType { LimitType::Infinite , LimitType::Finite , LimitType::HalfInfinite }
 Type of the extrusion body. More...
 
enum class  ACAPI::Element::LinkedStatus { LinkedStatus::Linked , LinkedStatus::NotLinked }
 Relation between the width and height value. More...
 
enum class  ACAPI::Element::OpeningFloorPlanDisplayMode { OpeningFloorPlanDisplayMode::Symbolic , OpeningFloorPlanDisplayMode::SymbolicCut , OpeningFloorPlanDisplayMode::SymbolicOverhead , OpeningFloorPlanDisplayMode::Projected }
 Floor plan display mode type of openings. More...
 
enum class  ACAPI::Element::DividedOpeningMode { DividedOpeningMode::Disconnected , DividedOpeningMode::Connected }
 Representation type of openings divided by air space. More...
 
enum class  ACAPI::Element::OpeningOpenEdgeStyle { OpeningOpenEdgeStyle::Hide , OpeningOpenEdgeStyle::ShowUncut , OpeningOpenEdgeStyle::ShowOverhead }
 Type of contours on open edges of outlines. More...
 
enum  API_GridMeshDirection {
  API_GridMeshLeft = 0 , API_GridMeshRight = 1 , API_GridMeshLowerRight = 2 , API_GridMeshLower = 3 ,
  API_GridMeshLowerLeft = 4 , API_GridMeshUpperRight = 5 , API_GridMeshUpper = 6 , API_GridMeshUpperLeft = 7 ,
  API_GridMeshDirNum = 8
}
 The direction of a grid mesh. More...
 
enum  API_ElementDBEventID {
  APINotifyElement_BeginEvents = -1 , APINotifyElement_EndEvents = -2 , APINotifyElement_New = 1 , APINotifyElement_Copy = 2 ,
  APINotifyElement_Change = 3 , APINotifyElement_Edit = 4 , APINotifyElement_Delete = 5 , APINotifyElement_Undo_Created = 11 ,
  APINotifyElement_Undo_Modified = 12 , APINotifyElement_Undo_Deleted = 13 , APINotifyElement_Redo_Created = 14 , APINotifyElement_Redo_Modified = 15 ,
  APINotifyElement_Redo_Deleted = 16 , APINotifyElement_PropertyValueChange = 17 , APINotifyElement_ClassificationChange = 18
}
 Describes the cause of the element notification. More...
 
enum  API_ElemTypeID {
  API_ZombieElemID = 0 , API_WallID = 1 , API_ColumnID = 2 , API_BeamID = 3 ,
  API_WindowID = 4 , API_DoorID = 5 , API_ObjectID = 6 , API_LampID = 7 ,
  API_SlabID = 8 , API_RoofID = 9 , API_MeshID = 10 , API_DimensionID = 11 ,
  API_RadialDimensionID = 12 , API_LevelDimensionID = 13 , API_AngleDimensionID = 14 , API_TextID = 15 ,
  API_LabelID = 16 , API_ZoneID = 17 , API_HatchID = 18 , API_LineID = 19 ,
  API_PolyLineID = 20 , API_ArcID = 21 , API_CircleID = 22 , API_SplineID = 23 ,
  API_HotspotID = 24 , API_CutPlaneID = 25 , API_CameraID = 26 , API_CamSetID = 27 ,
  API_GroupID = 28 , API_SectElemID = 29 , API_DrawingID = 30 , API_PictureID = 31 ,
  API_DetailID = 32 , API_ElevationID = 33 , API_InteriorElevationID = 34 , API_WorksheetID = 35 ,
  API_HotlinkID = 36 , API_CurtainWallID = 37 , API_CurtainWallSegmentID = 38 , API_CurtainWallFrameID = 39 ,
  API_CurtainWallPanelID = 40 , API_CurtainWallJunctionID = 41 , API_CurtainWallAccessoryID = 42 , API_ShellID = 43 ,
  API_SkylightID = 44 , API_MorphID = 45 , API_ChangeMarkerID = 46 , API_StairID = 47 ,
  API_RiserID = 48 , API_TreadID = 49 , API_StairStructureID = 50 , API_RailingID = 51 ,
  API_RailingToprailID = 52 , API_RailingHandrailID = 53 , API_RailingRailID = 54 , API_RailingPostID = 55 ,
  API_RailingInnerPostID = 56 , API_RailingBalusterID = 57 , API_RailingPanelID = 58 , API_RailingSegmentID = 59 ,
  API_RailingNodeID = 60 , API_RailingBalusterSetID = 61 , API_RailingPatternID = 62 , API_RailingToprailEndID = 63 ,
  API_RailingHandrailEndID = 64 , API_RailingRailEndID = 65 , API_RailingToprailConnectionID = 66 , API_RailingHandrailConnectionID = 67 ,
  API_RailingRailConnectionID = 68 , API_RailingEndFinishID = 69 , API_BeamSegmentID = 70 , API_ColumnSegmentID = 71 ,
  API_OpeningID = 72 , API_ExternalElemID = 150
}
 The type of an element. API_ElemType variationID APIVarId_Generic. More...
 
enum  API_ElemVariationID {
  APIVarId_Generic = 0 , APIVarId_WallEnd = 'WAEN' , APIVarId_Door = 'DOOR' , APIVarId_Skylight = 'SKYL' ,
  APIVarId_Object = 'SYMB' , APIVarId_GridElement = 'GREL' , APIVarId_Light = 'LIGH' , APIVarId_CornerWindow = 'CRWD'
}
 Describes the subcategory of an element. More...
 
enum  API_HatchOrientationTypeID { API_HatchGlobal = 0 , API_HatchRotated = 1 , API_HatchDistorted = 2 , API_HatchCentered = 3 }
 Type of the cover fill orientation. More...
 
enum  API_CoverFillTransformationTypeID { API_CoverFillTransformationType_Global = 0 , API_CoverFillTransformationType_Rotated = 1 , API_CoverFillTransformationType_Distorted = 2 }
 Type of cover fill transformation. More...
 
enum  API_ElemDisplayOptionsID {
  API_Standard = 0 , API_StandardWithAbstract = 1 , API_CutOnly = 2 , API_OutLinesOnly = 3 ,
  API_AbstractAll = 4 , API_CutAll = 5
}
 Floor plan display options of construction elements. More...
 
enum  API_ElemProjectionModesID { API_Symbolic = 0 , API_Projected = 1 , API_Hybrid = 2 }
 Floor plan projection modes of construction elements. More...
 
enum  API_ElemViewDepthLimitationsID { API_ToFloorPlanRange = 0 , API_ToAbsoluteLimit = 1 , API_EntireElement = 2 }
 Depth limitation for the appearance of complex elements on the floor plan. More...
 
enum  API_EdgeTrimID {
  APIEdgeTrim_Vertical , APIEdgeTrim_Perpendicular , APIEdgeTrim_Horizontal , APIEdgeTrim_CustomAngle ,
  APIEdgeTrim_AlignWithCut
}
 Determines the type of the roof or slab edge trim. In previous API versions this enum type used to be called @ref API_RsideID. More...
 
enum  API_ArrowID {
  APIArr_EmptyCirc , APIArr_CrossCircIs , APIArr_FullCirc , APIArr_SlashLine15 ,
  APIArr_OpenArrow15 , APIArr_ClosArrow15 , APIArr_FullArrow15 , APIArr_SlashLine30 ,
  APIArr_OpenArrow30 , APIArr_ClosArrow30 , APIArr_FullArrow30 , APIArr_SlashLine45 ,
  APIArr_OpenArrow45 , APIArr_ClosArrow45 , APIArr_FullArrow45 , APIArr_SlashLine60 ,
  APIArr_OpenArrow60 , APIArr_ClosArrow60 , APIArr_FullArrow60 , APIArr_SlashLine90 ,
  APIArr_PepitaCirc , APIArr_BandArrow , APIArr_HalfArrowCcw15 , APIArr_HalfArrowCw15 ,
  APIArr_HalfArrowCcw30 , APIArr_HalfArrowCw30 , APIArr_HalfArrowCcw45 , APIArr_HalfArrowCw45 ,
  APIArr_HalfArrowCcw60 , APIArr_HalfArrowCw60 , APIArr_SlashLine75
}
 Describes the different arrow types. More...
 
enum  API_NoteContentType { API_NoteContent_Measured , API_NoteContent_Custom }
 Describes the type of the content. More...
 
enum  API_LblAnchorID { APILbl_MiddleAnchor = 0 , APILbl_TopAnchor = 1 , APILbl_BottomAnchor = 2 , APILbl_Underlined = 3 }
 Describes how the pointer line is connected to the Label text (in case of Text Labels). More...
 
enum  API_LeaderLineShapeID { API_Segmented = 0 , API_Splinear = 1 , API_SquareRoot = 2 }
 Describes the shape of the pointer line of Note text or Label. More...
 
enum  API_JustID { APIJust_Left = 0 , APIJust_Center , APIJust_Right , APIJust_Full }
 Describes the various justification options. More...
 
enum  API_ModelElemStructureType { API_BasicStructure , API_CompositeStructure , API_ProfileStructure }
 Determines the structure type of the element. More...
 
enum  API_WallReferenceLineLocationID {
  APIWallRefLine_Outside = 0 , APIWallRefLine_Center , APIWallRefLine_Inside , APIWallRefLine_CoreOutside ,
  APIWallRefLine_CoreCenter , APIWallRefLine_CoreInside
}
 Distinguishes among the different wall reference line locations. More...
 
enum  API_WallTypeID { APIWtyp_Normal , APIWtyp_Trapez , APIWtyp_Poly }
 Represents the different wall types. More...
 
enum  API_ZoneRelID { APIZRel_Boundary , APIZRel_ReduceArea , APIZRel_None , APIZRel_SubtractFromZone }
 Describes the relation of an element to a zone. More...
 
enum  API_CWSegmentTypeID { APICWSeT_Invalid = 0 , APICWSeT_Line , APICWSeT_Arc }
 Curtain wall segment type. More...
 
enum  API_CWCellCrossingFrameTypeID { APICWCFT_NoCrossingFrame , APICWCFT_FromBottomLeftToTopRight , APICWCFT_FromTopLeftToBottomRight }
 Describes the type of the crossing frame in the cell. More...
 
enum  API_CWSegmentCategoryID { APICWSeC_System = 0 , APICWSeC_Custom }
 Curtain wall segment type. More...
 
enum  API_CWSegmentGridOrigPosTypeID { APICWSeGridOrigin_StartWithPattern , APICWSeGridOrigin_StartFromCenter , APICWSeGridOrigin_AlignToCenter , APICWSeGridOrigin_EndWithPattern }
 Curtain wall segment grid origin pos type. More...
 
enum  API_CWSegmentPatternLogicID { APICWSePL_FixedSizes , APICWSePL_BestDivision , APICWSePL_NumberOfDivisions }
 Describes how the pattern is stretched in segments. More...
 
enum  API_CWFrameObjectTypeID { APICWFrObjectType_Invisible = 0 , APICWFrObjectType_GDL , APICWFrObjectType_InvisibleConnectedTurning , APICWFrObjectType_InvisibleConnectedStill }
 Curtain wall frame object type. More...
 
enum  API_CWPanelObjectTypeID { APICWPaObjectType_Generic = 0 , APICWPaObjectType_GDL }
 Curtain wall panel object type. More...
 
enum  API_CWJunctionClampFrameOrientationID { APICWJunClampFrameOrient_NoClamp = 0 , APICWJunClampFrameOrient_ClampAtBeg , APICWJunClampFrameOrient_ClampAtEnd , APICWJunClampFrameOrient_ClampAtBothEnds }
 Curtain wall junction clamp frame orientation type. More...
 
enum  API_CWJunctionCategoryID { APICWJunC_System = 0 , APICWJunC_Custom }
 Curtain wall junction category type. More...
 
enum  API_CWAccessoryCategoryID { APICWAccC_System = 0 , APICWAccC_Custom }
 Curtain wall accessory category type. More...
 
enum  API_CWBoundaryFramePosID { APICW_Boundary_Unknown = 0 , APICW_Boundary_OutSide , APICW_Boundary_Center , APICW_Boundary_Inside }
 Define curtain wall boundary frame position. More...
 
enum  API_CWPlacementID { APICW_Placement_AllGridPoints = 0 , APICW_Placement_Manual }
 Curtain wall junction placement type. More...
 
enum  API_AssemblySegmentLengthTypeID { APIAssemblySegment_Fixed = 0 , APIAssemblySegment_Proportional = 1 }
 The type of segment length. More...
 
enum  API_AssemblySegmentCutTypeID { APIAssemblySegmentCut_Horizontal = 0 , APIAssemblySegmentCut_Vertical = 1 , APIAssemblySegmentCut_Custom = 2 }
 The type of cut. More...
 
enum  API_VeneerTypeID { APIVeneer_Core = 0 , APIVeneer_Finish = 1 , APIVeneer_Other = 2 }
 Describes the veneer type of a column. More...
 
enum  API_BHoleTypeID { APIBHole_Rectangular , APIBHole_Circular }
 Determines the shape of the holes in the beam. More...
 
enum  API_BeamVisibleLinesID { APIBeamLineShowAlways = 0 , APIBeamLineHideAlways = 1 , APIBeamLineByMVO = 2 }
 Controls the visibility of the beam lines. More...
 
enum  API_BeamShapeTypeID { API_StraightBeam = 0 , API_HorizontallyCurvedBeam = 1 , API_VerticallyCurvedBeam = 2 }
 The type of segment length. More...
 
enum  API_VerticalLinkID {
  API_NoLink = -1 , API_LinkSillToWallBottom = 0 , API_LinkSillToStory = 1 , API_LinkHeaderToWallBottom = 2 ,
  API_LinkHeaderToStory = 3 , API_LinkSkylightToRoofPivot = 4 , API_LinkSkylightToStory = 5 , API_LinkSkylightToShellBase = 6 ,
  API_LinkSillToWallTop = 7 , API_LinkHeaderToWallTop = 8
}
 Type of the vertical anchor. More...
 
enum  API_WindowDoorDirectionTypes { API_WDAssociativeToWall = 0 , API_WDVertical = 1 }
 Window Door Direction type. More...
 
enum  API_WindowDoorRevealDepthLocationID { APIWDRevealDepth_Side = 0 , APIWDRevealDepth_Core = 1 }
 Window Door Reveal Depth Location type. More...
 
enum  API_SkylightFixModeID { APISkylightFixMode_Horizontal , APISkylightFixMode_Vertical }
 Skylight constrain in the Roof element. More...
 
enum  API_SkylightAnchorID {
  APISkylightAnchor_BC = 0 , APISkylightAnchor_BL = 1 , APISkylightAnchor_BR = 2 , APISkylightAnchor_TC = 3 ,
  APISkylightAnchor_TL = 4 , APISkylightAnchor_TR = 5
}
 Anchor point of the Skylight object. More...
 
enum  API_SlabReferencePlaneLocationID { APISlabRefPlane_Top = 0 , APISlabRefPlane_CoreTop , APISlabRefPlane_CoreBottom , APISlabRefPlane_Bottom }
 Location of slab's reference plane. More...
 
enum  API_ShellBaseCutBodyTypeID {
  APIShellBaseCutBody_Editable , APIShellBaseCutBody_ContoursDown , APIShellBaseCutBody_PivotLinesDown , APIShellBaseCutBody_UpwardsExtrusion ,
  APIShellBaseCutBody_DownwardsExtrusion
}
 These values affect the connection type of Roof and Shell elements (see on the Model tab page of the Roof/Shell Settings dialog). More...
 
enum  API_ShellBaseSegmentTypeID { APIShellBase_SegmentsByCircle , APIShellBase_SegmentsByArc }
 Arc decomposition method for polyroof pivot edges or revolved shells. An N integral number tells how many segments to generate and this enum determines how to use the number N. More...
 
enum  API_RoofClassID { API_PlaneRoofID , API_PolyRoofID }
 Roof type identifier. More...
 
enum  API_RoofEdgeTypeID {
  APIRoofEdgeType_Undefined = 0 , APIRoofEdgeType_Ridge , APIRoofEdgeType_Valley , APIRoofEdgeType_Gable ,
  APIRoofEdgeType_Hip , APIRoofEdgeType_Eaves , APIRoofEdgeType_Peak , APIRoofEdgeType_SideWall ,
  APIRoofEdgeType_EndWall , APIRoofEdgeType_RTDome , APIRoofEdgeType_RTHollow
}
 Determines the type of the roof edges. This type is used just for listing purposes. It can be set individualy for each edge of the roof, the default value is Undefined. More...
 
enum  API_RoofOverHangTypeID { API_OffsetOverhang = 1 , API_ManualOverhang = 2 }
 Type of the eaves overhang of Multi-plane Roofs. More...
 
enum  API_PolyRoofSegmentAngleTypeID { APIPolyRoof_SegmentAngleTypeSloped , APIPolyRoof_SegmentAngleTypeGable }
 Type of the segment of Multi-plane Roofs. More...
 
enum  API_ShellBaseContourEdgeTypeID {
  APIShellBaseContour_Undefined = 0 , APIShellBaseContour_Ridge , APIShellBaseContour_Valley , APIShellBaseContour_Gable ,
  APIShellBaseContour_Hip , APIShellBaseContour_Eaves , APIShellBaseContour_Peak , APIShellBaseContour_SideWall ,
  APIShellBaseContour_EndWall , APIShellBaseContour_RTDome , APIShellBaseContour_RTHollow
}
 Determines the type of the shell contour edge. More...
 
enum  API_MorphingRuleID { APIMorphingRule_Paired , APIMorphingRule_Smooth }
 Type of the morphing rule applied by the Ruled Shell. More...
 
enum  API_ShellClassID { API_ExtrudedShellID , API_RevolvedShellID , API_RuledShellID }
 Shell class identifier. More...
 
enum  API_TextureProjectionTypeID {
  APITextureProjectionType_Invalid = 0 , APITextureProjectionType_Planar = 1 , APITextureProjectionType_Default = 2 , APITextureProjectionType_Cylindric = 3 ,
  APITextureProjectionType_Spheric = 4 , APITextureProjectionType_Box = 5
}
 Determines the type of the texture projection. More...
 
enum  API_MorphBodyTypeID { APIMorphBodyType_SurfaceBody , APIMorphBodyType_SolidBody }
 Determines the type of the morph body. More...
 
enum  API_MorphEdgeTypeID { APIMorphEdgeType_SoftHiddenEdge , APIMorphEdgeType_HardHiddenEdge , APIMorphEdgeType_HardVisibleEdge }
 Determines the type of the morph edge. More...
 
enum  API_WitnessID { APIWtn_None , APIWtn_Small , APIWtn_Large , APIWtn_Fix }
 Describes the various appearance options for witness lines. More...
 
enum  API_TextPosID { APIPos_Above , APIPos_In , APIPos_Below }
 Describes the various options for dimension text positioning. More...
 
enum  API_DirID {
  APIDir_Parallel , APIDir_Horizontal , APIDir_Vertical , APIDir_General ,
  APIDir_Radial , APIDir_ArcDim , APIDir_Perpendicular
}
 Defines various orientations for dimension and label texts. More...
 
enum  API_MarkerID {
  APIMark_CrossLine , APIMark_EmptyCirc , APIMark_SlashLine , APIMark_OpenArrow30 ,
  APIMark_ClosArrow30 , APIMark_FullArrow30 , APIMark_SlashLine45 , APIMark_CrossCirc ,
  APIMark_OpenArrow90 , APIMark_ClosArrow90 , APIMark_FullArrow90 , APIMark_FullCirc ,
  APIMark_PepitaCirc , APIMark_BandArrow , APIMark_OpenArrow60 , APIMark_ClosArrow60 ,
  APIMark_FullArrow60 , APIMark_SlashLine75
}
 Describes the various types of dimension markers. More...
 
enum  API_DimOriginID {
  APIDimOrigin_ProjectZero , APIDimOrigin_RefLevel1 , APIDimOrigin_RefLevel2 , APIDimOrigin_StoredOrigin ,
  APIDimOrigin_Altitude
}
 Describes the elevation dimension origin. More...
 
enum  API_DimLayoutID { API_Legacy = 0 , API_Flexible , API_Centered , API_LayoutOff }
 Describes the layouting algorithm of the dimension. More...
 
enum  API_CircleLevelDimensionFillID { API_EmptyFill , API_NorthwestBlack , API_NortheastBlack }
 Describe the circle style marker fill type of elevation dimension. More...
 
enum class  API_DimTextFillOrderID { API_DimTextFillOrderID::FillAndContourUnderDimLine , API_DimTextFillOrderID::FillAndContourAboveDimLine }
 Describes the drawing order of the text's fill and contour relative to the dimension line. More...
 
enum  API_AnchorID {
  APIAnc_LT , APIAnc_MT , APIAnc_RT , APIAnc_LM ,
  APIAnc_MM , APIAnc_RM , APIAnc_LB , APIAnc_MB ,
  APIAnc_RB
}
 Various options for anchor points. More...
 
enum  API_TabID { APITab_Left , APITab_Center , APITab_Right , APITab_Decimalpoint }
 Types of the tab. More...
 
enum  API_TextFrameShapeTypeID {
  API_TextFrameShapeType_Rectangle = 0 , API_TextFrameShapeType_Circle = 1 , API_TextFrameShapeType_RoundedRectangle = 2 , API_TextFrameShapeType_Pill = 3 ,
  API_TextFrameShapeType_Diamond = 4 , API_TextFrameShapeType_Pointed_Rectangle90 = 5 , API_TextFrameShapeType_Pointed_Rectangle120 = 6 , API_TextFrameShapeType_Hexagon = 7 ,
  API_TextFrameShapeType_Hexagon_Rotated = 8
}
 Text frame shape identifiers. More...
 
enum  API_LblClassID { APILblClass_Text = 'TEXT' , APILblClass_Symbol = 'SYMB' }
 Describes the various types for a label. More...
 
enum  API_HatchSubType { API_FillHatch , API_BuildingMaterialHatch }
 Determines the subtype type of the hatch. More...
 
enum  API_HatchFlags {
  APIHatch_HasBkgRGBColor = 0x01 , APIHatch_HasFgRGBColor = 0x02 , APIHatch_OverrideFgPen = 0x04 , APIHatch_OverrideBkgPen = 0x08 ,
  APIHatch_OverrideFillInd = 0x10
}
 Determines the behaviour of the hatch. More...
 
enum  API_PictureFormat {
  APIPictForm_Default , APIPictForm_Bitmap , APIPictForm_GIF , APIPictForm_TIFF ,
  APIPictForm_JPEG , APIPictForm_PNG
}
 Storage format of a picture. More...
 
enum  API_SegmentHorizontalRange { APIHorRange_Infinite = 0 , APIHorRange_Limited , APIHorRange_ZeroDepth }
 Horizontal range of the segment. More...
 
enum  API_SegmentVerticalRange { APIVerRange_Infinite = 0 , APIVerRange_Limited , APIVerRange_FitToZoneRange }
 Vertical range of the segment. More...
 
enum  API_CutPlaneShowType { APICutPl_ShowAll , APICutPl_ShowOnOneStory , APICutPl_ShowInRange , APICutPl_ShowPartRange }
 Stories to show cutplane on. More...
 
enum  API_CutPlaneUncutSurfaceFillID { APICutPl_PenColor = 1 , APICutPl_MaterialColorShaded = 2 , APICutPl_MaterialColorNonShaded = 3 }
 The method for displaying fills of uncut surfaces in the distant area of the Section/Elevation (effective if distAreaUseUncutSurfFill is true ) More...
 
enum  API_StoryHandleAppearance { APICutPl_SHANone = 0 , APICutPl_SHADisplayOnly = 1 , APICutPl_SHAAll = 2 }
 Options for displaying story lines on the Section/Elevation. More...
 
enum  API_CutPlaneMarkerShowType { APICutPl_ShowMiddleMarker = 0 , APICutPl_ShowWingMarkers = 1 }
 The enumeration of the available Section/Elevation markers appearing. More...
 
enum  API_ReferringLevel { NotReferred = 0 , ReferredToViewPoint = 1 , ReferredToView = 2 , ReferredToDrawing = 3 }
 This enum determines the referred type. More...
 
enum  API_NameTypeValues { APIName_ViewOrSrcFileName = 0 , APIName_ViewIdAndName = 1 , APIName_CustomName = 2 }
 Specifies how the name of the drawing is assembled. More...
 
enum  API_NumberingTypeValues { APINumbering_ByLayout = 0 , APINumbering_ByViewId = 1 , APINumbering_CustomNum = 2 }
 Numbering method options of a drawing element. More...
 
enum  API_ColorModeValues { APIColorMode_OriginalColors = 0 , APIColorMode_BlackAndWhite = 1 , APIColorMode_GrayScale = 2 }
 Specifies output color transformation for drawing elements. More...
 
enum  API_PenTableUsageModeValues { APIPenTableUsageMode_UseOwnPenTable = 0 , APIPenTableUsageMode_UseModelPenTable = 1 , APIPenTableUsageMode_UsePenTableIndex = 2 }
 Specifies which pen table a drawing element uses. More...
 
enum  API_TitlePreviewModes { APITitlePreviewMode_DrawingWithTitle = 0 , APITitlePreviewMode_TitleOnly = 1 }
 Determines what is shown on the preview the drawing title. More...
 
enum  API_ChangeMarkerLinkType { APICMLT_CreateNewChange , APICMLT_Linked , APICMLT_Unlinked }
 Specifies the linkage type of a ChangeMarker, or the ChangeMarker Default. More...
 
enum  API_ChangeMarkerComponentType { APICMCT_HeadOnly , APICMCT_CloudOnly , APICMCT_HeadAndCloud }
 Specifies which parts of the Change Marker are visible. More...
 
enum  API_LinePositionID { APILP_Left , APILP_Right , APILP_Center , APILP_Auto }
 Position of the walking line. More...
 
enum  API_StairDisplayTypeID { APIStairDisplay_Custom , APIStairDisplay_ByModelViewOptions }
 Display type of the Stair. More...
 
enum  API_StairGridTypeID {
  APIStairGrid_NotRelevant , APIStairGrid_WithSingleBreaklineFull , APIStairGrid_NoBreaklineFull , APIStairGrid_BelowBreakline ,
  APIStairGrid_AboveBreakline , APIStairGrid_MiddleBreakline , APIStairGrid_MiddleBreaklineFull , APIStairGrid_NoBreakMarkHidden ,
  APIStairGrid_AboveBreakMarkHidden , APIStairGrid_BelowBreakMarkHidden , APIStairGrid_Multistory2DAllVisible , APIStairGrid_Multistory2DHiddenVisible ,
  APIStairGrid_Multistory2DNoneVisibleHidden , APIStairGrid_WithBreakMarkAllVisible , APIStairGrid_WithBreakMarkHiddenVisible
}
 Layout above relevant stories. More...
 
enum  API_BreakLineAngleTypeID { APIBreakLineAngle_AngleToVertical , APIBreakLineAngle_AngleToHorizontal , APIBreakLineAngle_NumberOfGoings }
 The angle type of the break line. More...
 
enum  API_BreakLinePositionTypeID { APIBreakLinePosition_FloorPlanCutPlaneHeight , APIBreakLinePosition_CustomHeight , APIBreakLinePosition_AtNthRiser }
 The line position type of the break line. More...
 
enum  API_RiserPositionID { APIRP_OnTread , APIRP_BehindTread }
 Riser position. More...
 
enum  API_RiserCrossSectID { APIRCS_Simple , APIRCS_Slanted }
 Riser cross section type. More...
 
enum  API_StairStructBottomTypeID { APISB_Stepped , APISB_Flat , APISB_Smooth }
 The type of the stair structure bottom. More...
 
enum  API_StairPolyTypeID {
  APISP_Undefined , APISP_BaseLine , APISP_LeftBoundary , APISP_RightBoundary ,
  APISP_Tread , APISP_Riser , APISP_WalkingLine , APISP_FloorPlanSymb ,
  APISP_BreakMark , APISP_DummyTreadLeading , APISP_DummyTreadTrailing
}
 Determines the type of a Stair boundary edge or vertex. More...
 
enum  API_StairPolyGeometryTypeID { APISG_Vertex , APISG_Edge , APISG_Surface }
 Determines the type of a Stair boundary edge or vertex. More...
 
enum  API_StairNumberingID { APISN_Treads , APISN_Risers }
 Type of numbering for each step of the Stair element. More...
 
enum  API_StairDirectionID { APISD_Upward , APISD_Inverse }
 The walking direction of the Stair element. More...
 
enum  API_StairSegmentTypeID { APIST_StepsSegment , APIST_LandingSegment , APIST_DividedLandingSegment }
 Type of the segment described by this edge. More...
 
enum  API_StairDLWinderNumTypeID { APIDWN_Max , APIDWN_Optimal , APIDWN_Fix , APIDWN_Uniform }
 Describes the mode for deciding the amount of winders in a divided landing. More...
 
enum  API_StairTurnTypeID { APIST_NoTurn , APIST_LandingTurn , APIST_WinderTurn , APIST_DividedLandingTurn }
 The type of the turn. More...
 
enum  API_StairInnerWidthOffsetTypeID { APIIWO_Min , APIIWO_Fix }
 The type of the Riser Offsets from Corner. More...
 
enum  API_StairWinderNumTypeID { APIWN_Min , APIWN_Fix }
 The type of the Number of Winders. More...
 
enum  API_StairPartRoleID { APISR_Run = 0 , APISR_Landing = 1 }
 Represents the role of a stair subelement. More...
 
enum  API_StairStructureTypeID { APIST_Side , APIST_Monolith , APIST_BeamSupport , APIST_CantileveredSupport }
 The type of the stair structure. More...
 
enum  API_StairStructureSideID { APISS_LeftSide = 0 , APISS_RightSide = 1 , APISS_UnderSide = 2 }
 Supported side of the Stair. More...
 
enum  API_StairWalkLineSymbPosID { APISP_Auto , APISP_Center , APISP_Custom }
 Position of the walking line symbol. More...
 
enum  API_StairDrainSurfaceTypeID { APIST_Stepped , APIST_Smooth }
 Surface type of the draining. More...
 
enum  API_StairDrainSideID { APIDS_Left = 0 , APIDS_Right = 1 }
 Data about the Stair Structure's drainings. More...
 
enum  API_StairWinderID { APIWT_DINTurn , APIWT_NZETurn , APIWT_SIPTurn , APIWT_AGNTurn }
 The type of the Winder. More...
 
enum  API_StairStoryVisibilityID {
  APISSV_HomeStoryOnly , APISSV_HomeAndOneStoryUp , APISSV_HomeAndOneStoryDown , APISSV_HomeAndOneStoryUpAndDown ,
  APISSV_OneStoryUp , APISSV_OneStoryDown , APISSV_AllStories , APISSV_AllRelevantStories ,
  APISSV_AllRelevantAndOneStoryUp , APISSV_AllRelevantAndOneStoryDown
}
 Settings of stair visibility across stories. More...
 
enum  API_StairStructSymbTypeID { APIST_UnderStructure = 0 , APIST_Stringer = 1 }
 The type of the stair structure symbol. More...
 
enum  API_StairStructSymbViewID { APISV_FloorPlan = 0 , APISV_CeilingPlan = 1 }
 The type of the stair structure symbol view. More...
 
enum  API_StairStructSymbVisibilityID { APISV_Beam = 0 , APISV_Cantilevered = 1 , APISV_Stringer = 2 , APISV_Monolith = 3 }
 The type of the stair structure symbol visibility. More...
 
enum  API_StairStructSymbPartID { APISP_Visible = 0 , APISP_Hidden = 1 }
 The type of the stair structure symbol part. More...
 
enum  API_StairStructSymbRelevantStoriesID {
  APISCV_ALL_STORIES = 0 , APISCV_BELOW_RELEVANT = 1 , APISCV_BOTTOM_RELEVANT = 2 , APISCV_MID_RELEVANT = 3 ,
  APISCV_TOP_RELEVANT = 4 , APISCV_ABOVE_RELEVANT = 5
}
 The type of the stair structure symbol relevant stories. More...
 
enum  API_StairTreadNosingTypeID { APITN_ByValue , APITN_BySlanting }
 Type of the Tread nosing. More...
 
enum  API_StairStructHeightMeasureID { APIHM_Perpendicular , APIHM_Vertical }
 The way of measuring of height above treads. More...
 
enum  API_HeadroomGenerationModeID { APIHM_RightAngleToSlope , APIHM_VerticallyToSlope }
 The type of room generation mode. More...
 
enum  API_DistribTypeID { APIDT_Divisions , APIDT_PatternLength , APIDT_BestDivisionByLength }
 Distribution of the given patternO. More...
 
enum  API_PatternAlignID { APIPA_StartWithPattern , APIPA_StartFromCenter , APIPA_CenterAligned , APIPA_EndWithPattern }
 Pattern origin position. More...
 
enum  API_RailEndTypeID { APIRE_Extension , APIRE_Curve , APIRE_FullReturn , APIRE_ConnectWithDuplicate }
 The type of the Rail End. More...
 
enum  API_RailEndBaseConnectionID { APIBC_Horizontal , APIBC_Tangential }
 Connection type between the Rail End and a base. More...
 
enum  API_RailBaseBaseConnectionID { APIBB_Horizontal , APIBB_Tangential }
 Connection type between two Rail bases. More...
 
enum  API_RailEndFixtureConnectionID { APIRC_SegmentPlane , APIRC_HorizontalRight , APIRC_HorizontalLeft }
 The type of the curving in case of Curved type. More...
 
enum  API_RailEndArcAngleModeID { APIAM_SetToVertical , APIAM_CustomAngle }
 Angle mode of the Rail End's arc. More...
 
enum  API_RailEndExtrusionModeID { APIEM_CustomLength , APIEM_ToReferenceLine , APIEM_ToHandrailSibling }
 Mode of the second extrusion. More...
 
enum  API_RailConnectionTypeID { APICT_NoRailConnection , APICT_GooseneckRailConnection , APICT_DirectRailConnection }
 Connection type. More...
 
enum  API_RailingRefLineLocationID { APIRLL_Left , APIRLL_Center , APIRLL_Right }
 The location of the segment's reference line. More...
 
enum  API_SubElementType : UInt64 {
  APISubElement_MainMarker = 0x0000000000000001 , APISubElement_SHMarker = 0x0000000000000002 , APISubElement_CommonMarker = 0x0000000000000004 , APISubElement_CWFrameClass = 0x0000000000000008 ,
  APISubElement_CWPanelClass = 0x0000000000000010 , APISubElement_CWJunction = 0x0000000000000020 , APISubElement_CWAccessory = 0x0000000000000040 , APISubElement_StairRiser = 0x0000000000000080 ,
  APISubElement_StairTread = 0x0000000000000100 , APISubElement_StairStructure = 0x0000000000000200 , APISubElement_StairFPDMarker = 0x0000000000000400 , APISubElement_StairRCPDMarker = 0x0000000000000800 ,
  APISubElement_RailingNode = 0x0000000000001000 , APISubElement_RailingSegment = 0x0000000000002000 , APISubElement_RailingPost = 0x0000000000004000 , APISubElement_RailingInnerPost = 0x0000000000008000 ,
  APISubElement_RailingRail = 0x0000000000010000 , APISubElement_RailingHandrail = 0x0000000000020000 , APISubElement_RailingToprail = 0x0000000000040000 , APISubElement_RailingPanel = 0x0000000000080000 ,
  APISubElement_RailingBaluster = 0x0000000000100000 , APISubElement_RailingPattern = 0x0000000000200000 , APISubElement_RailingBalusterSet = 0x0000000000400000 , APISubElement_RailingRailEnd = 0x0000000000800000 ,
  APISubElement_RailingHandrailEnd = 0x0000000001000000 , APISubElement_RailingToprailEnd = 0x0000000002000000 , APISubElement_RailingRailConnection = 0x0000000004000000 , APISubElement_RailingHandrailConnection = 0x0000000008000000 ,
  APISubElement_RailingToprailConnection = 0x0000000010000000 , APISubElement_RailingFinish = 0x0000000020000000 , APISubElement_CWTag = 0x1000000000000000 , APISubElement_NoElem = 0x2000000000000000 ,
  APISubElement_NoParams = 0x4000000000000000
}
 Describes the filter for the different subtypes of elements. More...
 
enum  API_SubElemFlagType : UInt32 {
  APISubElemFlag_Run = 0x00000001 , APISubElemFlag_Landing = 0x00000002 , APISubElemFlag_LeftSide = 0x00000004 , APISubElemFlag_RightSide = 0x00000008 ,
  APISubElemFlag_UnderSide = 0x00000010 , APISubElemFlag_GridMarker = 0x00000020 , APISubElemFlag_BreakMarkMarker = 0x00000040 , APISubElemFlag_WalkingLineMarker = 0x00000080 ,
  APISubElemFlag_NumberingMarker = 0x00000100 , APISubElemFlag_UpDownTextMarker = 0x00000200 , APISubElemFlag_DescriptionMarker = 0x00000400 , APISubElemFlag_DefaultDefault = 0x00000800
}
 Subelement Flags (Stair). More...
 
enum  API_EditCmdID {
  APIEdit_Drag = 'DRAG' , APIEdit_Rotate = 'ROTZ' , APIEdit_Mirror = 'MIRR' , APIEdit_Elevate = 'ELEV' ,
  APIEdit_Stretch = 'STRE' , APIEdit_VertStretch = 'VSTR' , APIEdit_Resize = 'RSIZ' , APIEdit_General = 'GENE' ,
  APIEdit_PHeightStretch = 'PHST' , APIEdit_PDirStretch = 'PDST'
}
 Possible element transformations. More...
 
enum  API_SolidOperationID {
  APISolid_Substract = 'SSUB' , APISolid_SubstUp = 'SSUU' , APISolid_SubstDown = 'SSUD' , APISolid_Intersect = 'SINT' ,
  APISolid_Add = 'SADD'
}
 The type of the solid operation link between two construction elements. More...
 
enum  API_TrimTypeID { APITrim_No = 'TRNO' , APITrim_KeepInside = 'TRIN' , APITrim_KeepOutside = 'TROU' , APITrim_KeepAll = 'TRAL' }
 The type of the trim connection link between two construction elements. More...
 
enum  API_NeigID {
  APINeig_None = 0 , APINeig_Wall = 1 , APINeig_WallPl = 2 , APINeig_WallOn = 3 ,
  APINeig_WallPlOn = 4 , APINeig_Colu = 5 , APINeig_Beam = 6 , APINeig_BeamOn = 7 ,
  APINeig_BeamHole = 8 , APINeig_Wind = 9 , APINeig_WindHole = 10 , APINeig_Door = 11 ,
  APINeig_DoorHole = 12 , APINeig_Symb = 13 , APINeig_Light = 14 , APINeig_Ceil = 15 ,
  APINeig_CeilOn = 16 , APINeig_Roof = 17 , APINeig_RoofOn = 18 , APINeig_RBL = 19 ,
  APINeig_RBLOn = 20 , APINeig_Mesh = 21 , APINeig_MeshOn = 22 , APINeig_MeshRidge = 23 ,
  APINeig_MeshRidgeOn = 24 , APINeig_DimInt = 25 , APINeig_DimPt = 26 , APINeig_DimOn = 27 ,
  APINeig_RadDim = 28 , APINeig_LevDim = 29 , APINeig_AngDim = 30 , APINeig_AngDimOn = 31 ,
  APINeig_Word = 32 , APINeig_Label = 33 , APINeig_Room = 34 , APINeig_RoomStamp = 35 ,
  APINeig_RoomOn = 36 , APINeig_RoomRefPt = 37 , APINeig_Hatch = 38 , APINeig_HatchOn = 39 ,
  APINeig_Line = 40 , APINeig_LineOn = 41 , APINeig_PolyLine = 42 , APINeig_PolyLineOn = 43 ,
  APINeig_Arc = 44 , APINeig_ArcOn = 45 , APINeig_Circ = 46 , APINeig_CircOn = 47 ,
  APINeig_Spline = 48 , APINeig_SplineOn = 49 , APINeig_Hot = 50 , APINeig_CutPlane = 51 ,
  APINeig_CutPlOn = 52 , APINeig_Camera = 53 , APINeig_CamSet = 54 , APINeig_VirtSy = 55 ,
  APINeig_VirtSyOn = 56 , APINeig_PictObj = 57 , APINeig_Detail = 58 , APINeig_DetailPoly = 59 ,
  APINeig_DetailPolyOn = 60 , APINeig_DetailMarker = 61 , APINeig_Symb3D = 62 , APINeig_Light3D = 63 ,
  APINeig_Wind3D = 64 , APINeig_Door3D = 65 , APINeig_WindMark = 66 , APINeig_DoorMark = 67 ,
  APINeig_CutPlMarker = 68 , APINeig_WallPlClOff = 69 , APINeig_WallPlOnClOff = 70 , APINeig_SymbOn = 71 ,
  APINeig_WindOn = 72 , APINeig_DoorOn = 73 , APINeig_LightOn = 74 , APINeig_Note = 75 ,
  APINeig_SplineDir = 76 , APINeig_DrawingCenter = 77 , APINeig_DrawingFrame = 78 , APINeig_DrawingFrameOn = 79 ,
  APINeig_DrawingIDF = 80 , APINeig_DrawingIDFOn = 81 , APINeig_DrawingTitle = 82 , APINeig_DrawingTitleOn = 83 ,
  APINeig_Worksheet = 84 , APINeig_WorksheetPoly = 85 , APINeig_WorksheetPolyOn = 86 , APINeig_WorksheetMarker = 87 ,
  APINeig_Elevation = 88 , APINeig_ElevationOn = 89 , APINeig_ElevationMarker = 90 , APINeig_InteriorElevation = 91 ,
  APINeig_InteriorElevationOn = 92 , APINeig_InteriorElevationMarker = 93 , APINeig_SectionSegment = 94 , APINeig_SectionSegmentOn = 95 ,
  APINeig_SectionSegmentMarker = 96 , APINeig_CurtainWall = 97 , APINeig_CurtainWallOn = 98 , APINeig_CurtainWallCut = 99 ,
  APINeig_CurtainWallCutOn = 100 , APINeig_CWSegment = 101 , APINeig_CWSegmentOn = 102 , APINeig_CWSegmentBaseLine = 103 ,
  APINeig_CWSegmentBaseLineOn = 104 , APINeig_CWFrame = 105 , APINeig_CWFrameOn = 106 , APINeig_CWFrame3D = 107 ,
  APINeig_CWPanel = 108 , APINeig_CWPanel3D = 109 , APINeig_CWJunction = 110 , APINeig_CWJunction3D = 111 ,
  APINeig_CWAccessory = 112 , APINeig_CWAccessory3D = 113 , APINeig_Shell = 114 , APINeig_ShellOn = 115 ,
  APINeig_Skylight = 116 , APINeig_SkylightHole = 117 , APINeig_Skylight3D = 118 , APINeig_SkylightOn3D = 119 ,
  APINeig_SkylightOn = 120 , APINeig_SkylightMark = 121 , APINeig_Morph = 122 , APINeig_MorphOn = 123 ,
  APINeig_ChangeMarker = 124 , APINeig_ChangeMarkerPoly = 125 , APINeig_ChangeMarkerPolyOn = 126 , APINeig_ChangeMarkerMarker = 127 ,
  APINeig_ColuOn = 128 , APINeig_WordOn = 129 , APINeig_CurtainWallBaseLine = 130 , APINeig_CurtainWallBaseLineOn = 131 ,
  APINeig_StairOn = 132 , APINeig_Tread = 133 , APINeig_TreadOn = 134 , APINeig_Riser = 135 ,
  APINeig_RiserOn = 136 , APINeig_Stair = 137 , APINeig_StairStructure = 138 , APINeig_StairStructureOn = 139 ,
  APINeig_Railing = 140 , APINeig_RailingOn = 141 , APINeig_RailingToprail = 142 , APINeig_RailingToprailOn = 143 ,
  APINeig_RailingHandrail = 144 , APINeig_RailingHandrailOn = 145 , APINeig_RailingRail = 146 , APINeig_RailingRailOn = 147 ,
  APINeig_RailingPost = 148 , APINeig_RailingPostOn = 149 , APINeig_RailingInnerPost = 150 , APINeig_RailingInnerPostOn = 151 ,
  APINeig_RailingBaluster = 152 , APINeig_RailingBalusterOn = 153 , APINeig_RailingPanel = 154 , APINeig_RailingPanelOn = 155 ,
  APINeig_RailingToprailEnd = 156 , APINeig_RailingToprailEndOn = 157 , APINeig_RailingHandrailEnd = 158 , APINeig_RailingHandrailEndOn = 159 ,
  APINeig_RailingRailEnd = 160 , APINeig_RailingRailEndOn = 161 , APINeig_RailingToprailConnection = 162 , APINeig_RailingToprailConnectionOn = 163 ,
  APINeig_RailingHandrailConnection = 164 , APINeig_RailingHandrailConnectionOn = 165 , APINeig_RailingRailConnection = 166 , APINeig_RailingRailConnectionOn = 167 ,
  APINeig_RailingEndFinish = 168 , APINeig_RailingEndFinishOn = 169 , APINeig_BeamSegment = 170 , APINeig_BeamSegmentOn = 171 ,
  APINeig_ColumnSegment = 172 , APINeig_ColumnSegmentOn = 173 , APINeig_Opening = 174 , APINeig_OpeningOn = 175
}
 Describes the various special points of elements. More...
 
enum  API_StructureDisplay { API_EntireStructure , API_CoreOnly , API_WithoutFinishes , API_StructureOnly }
 This is the enumeration of the Partial Structure Display. More...
 
enum  API_ImageViewID { APIImage_Model2D = 0 , APIImage_Model3D = 1 , APIImage_Section = 2 }
 View type identifier. More...
 

Functions

Result< OpeningDefault > ACAPI::Element::CreateOpeningDefault ()
 Creates an OpeningDefault.
 
ARCHICADAPI_EXPORT Result< OpeningDefault > ACAPI::Element::CreateOpeningDefault (const ACAPI::ElementDefault &defaultElem)
 Creates an OpeningDefault from the given base element default.
 
ZoneBoundaryQuery ACAPI::CreateZoneBoundaryQuery ()
 
GSErrCode ACAPI_Element_GetExtent (API_Box *extent, API_DatabaseUnId *databaseUnId=nullptr)
 Returns the drawing extent of the current database.
 
GSErrCode ACAPI_Element_GetExtent3D (API_Box3D *extent3D)
 Returns the model extent of the current database.
 
GSErrCode ACAPI_Element_CalcBounds (const API_Elem_Head *elemHead, API_Box3D *extent3D)
 Returns the model extent of an element in the current database.
 
GSErrCode ACAPI_Element_RoomReductions (const API_Guid *guid, RoomReductionPolyProc *roomReductionPolyProc)
 Returns reduction data assigned to a room in the current database.
 
GSErrCode ACAPI_Element_GetElementURLRef (API_Elem_Head *elem_Head, API_ElemURLRef *elemURLRef)
 Retrieves the URL reference assigned to an element.
 
GSErrCode ACAPI_Element_SetElementURLRef (API_Elem_Head *elemHead, API_ElemURLRef *elemURLRef)
 Assigns a URL reference to an element.
 
GSErrCode ACAPI_Element_RefreshElement (API_Elem_Head *elemHead, bool *force)
 Rebuilds (refreshes) a library part instance.
 
GSErrCode ACAPI_Element_DrawElement (API_Elem_Head *elem_Head, UInt32 mask)
 Shows/draws an existing element.
 
GSErrCode ACAPI_Element_GetCompoundInfoString (const API_Guid *elementGuid, GS::UniString *infoString)
 Returns the compound info string of the given element.
 
GSErrCode ACAPI_Element_GetElementFromAnywhere (const API_Guid *guid, API_Element *element)
 Returns the element referred by guid irrespectively of the current database.
 
GSErrCode ACAPI_Element_GetElementInfoString (const API_Guid *elementGuid, GS::UniString *infoString)
 Returns the compound info string of the given element.
 
GSErrCode ACAPI_Element_ChangeElementInfoString (const API_Guid *elementGuid, const GS::UniString *infoString)
 Changes the compound info string of the given element.
 
GSErrCode ACAPI_Element_SearchElementByCoord (const API_ElemSearchPars *elemSearchPars, API_Guid *foundElement)
 Searches for an element by coordinate.
 
GSErrCode ACAPI_Element_NeigToCoord (API_Neig *neig, API_Coord3D *coord3D, API_Coord3D *coord3DDocument=nullptr)
 Returns the coordinate of a neig.
 
GSErrCode ACAPI_Element_GetTextLineLength (API_TextLinePars *textLinePars, double *length)
 Returns the length of a line of text in mms.
 
GSErrCode ACAPI_Element_GetTextSizeFactor (short *api_fontID, double *textSizeFactor)
 Returns the ratio of the font capital size and typography size.
 
GSErrCode ACAPI_Element_GetElemCreatorToolUnId (API_Elem_Head *elemHead, char *unIDStr)
 Returns the unique ID of the creator tool of the specified object.
 
GSErrCode ACAPI_Element_SetEmptyHoleUnId (GSType *signature, const char *emptyHoleUnIdStr, const char *emptyOpeningSubtypeUnIDStr)
 Sets the unique ID of the empty hole.
 
GSErrCode ACAPI_Element_ChangeContent (API_ContentPars *contentPars)
 Change the content of a text or a textual label element.
 
GSErrCode ACAPI_Element_GetSkylightHolePolygon (const API_Guid *skylightGuid, Geometry::Polygon2D *holePoly)
 Returns the polygon data of a Skylight hole contour.
 
GSErrCode ACAPI_Element_UI2ElemPriority (GS::Int32 *uiPriority, GS::Int32 *elemPriority)
 Returns user building material connection priority for a interface priority.
 
GSErrCode ACAPI_Element_Elem2UIPriority (GS::Int32 *elemPriority, GS::Int32 *uiPriority)
 Returns user interface priority for a building material connection priority.
 
GSErrCode ACAPI_Element_CalcSideOffsetToCoreOffset (const API_Guid *wallOpeningGuid, const double *sideOffset, double *coreOffset)
 Converts the reveal depth offset from wall side to core skin for wall openings.
 
GSErrCode ACAPI_Element_CalcCoreOffsetToSideOffset (const API_Guid *wallOpeningGuid, const double *coreOffset, double *sideOffset)
 Converts the reveal depth offset from core skin to wall side for wall openings.
 
GSErrCode ACAPI_Element_ElemHasVisibleSkin (const API_Guid *elemGuid, const API_StructureDisplay *structure, bool *result)
 Returns if elem has visible skin depending on Partial Structure Display.
 
GSErrCode ACAPI_Element_GetOpeningTransformation (const API_Guid *elemGuid, API_Tranmat *openingTranMat)
 Returns the position and the normal vector of the given opening.
 
GSErrCode ACAPI_Element_GetRoomImage (API_RoomImage *roomImage)
 Returns the image of the given room.
 
GSErrCode ACAPI_Element_GetElemTypeName (const API_ElemType &elemType, GS::UniString &elemName)
 Returns the localized name of the built-in element types.
 
GSErrCode ACAPI_Element_NeigIDToElemType (API_NeigID neigID, API_ElemType &elemType)
 Returns the element type assigned to a neig.
 
GSErrCode ACAPI_Element_ElemTypeToNeigID (const API_ElemType &elemType, API_NeigID &neigID)
 Returns a neig for the given element type.
 
GSErrCode ACAPI_DisposeParagraphsHdl (API_ParagraphType ***paragraphs)
 Frees the memory occupied by a handle to an array of API_ParagraphType.
 
GSErrCode ACAPI_DisposeElemMemoHdls (API_ElementMemo *memo)
 Frees the memory occupied by all of the allocated memo handles.
 
GSErrCode ACAPI_DisposeRoomRelationHdls (API_RoomRelation *roomInfo)
 Frees the memory occupied by all allocated room relation handles.
 
void ACAPI_DisposeWallRelationHdls (API_WallRelation *wallInfo)
 Frees the memory occupied by all allocated wall relation handles.
 
void ACAPI_DisposeBeamSegmentRelationHdls (API_BeamSegmentRelation *segmentInfo)
 Frees the memory occupied by all the allocated beam segment relation handles.
 
void ACAPI_DisposeBeamRelationHdls (API_BeamRelation *beamInfo)
 Frees the memory occupied by all allocated beam relation handles.
 
GSErrCode ACAPI_Element_GetDefaults (API_Element *element, API_ElementMemo *memo)
 Retrieves the actual default settings for the element of type.
 
GSErrCode ACAPI_Element_GetDefaultsExt (API_Element *element, API_ElementMemo *memo, UInt32 nSubElems, API_SubElement *subElems)
 Retrieves the actual default settings for the Window, Door, Section, Elevation, Interior Elevation, ChangeMarker, Detail, Worksheet, or Stair element with its marker(s). You are also able to obtain the Curtain Wall and its sub-element default settings via this function.
 
GSErrCode ACAPI_Element_ChangeDefaults (API_Element *element, API_ElementMemo *memo, const API_Element *mask)
 Changes the default parameters of an element.
 
GSErrCode ACAPI_Element_ChangeDefaultsExt (API_Element *element, API_ElementMemo *memo, const API_Element *mask, UInt32 nSubElems, API_SubElement *subElems)
 Changes the default parameters of the Window, Door, Section, Elevation, Interior Elevation, ChangeMarker, Detail, Worksheet, or Stair default element and its marker(s). This function also allows you to change the default settings of the Curtain Wall and its subelem.
 
GSErrCode ACAPI_Element_GetElemList (const API_ElemType &type, GS::Array< API_Guid > *elemList, API_ElemFilterFlags filterBits=APIFilt_None, const API_Guid &renovationFilterGuid=APINULLGuid)
 Returns an array of guids of the elements of the given type.
 
bool ACAPI_Element_Filter (const API_Guid &guid, API_ElemFilterFlags filterBits, API_ElemVariationID variationID=APIVarId_Generic, const API_Guid &renovationFilterGuid=APINULLGuid)
 Tests an element by some given criteria.
 
GSErrCode ACAPI_Element_Get (API_Element *element, UInt32 mask=0)
 Returns information on the main parameters of a given element.
 
GSErrCode ACAPI_Element_GetHeader (API_Elem_Head *elementHead, UInt32 mask=0)
 Returns general information on the given element.
 
GSErrCode ACAPI_Element_GetMemo (const API_Guid &guid, API_ElementMemo *memo, UInt64 mask=APIMemoMask_All)
 Retrieves all additional information attached to elements.
 
GSErrCode ACAPI_Element_GetMemo_ExternalHierarchical (const API_Guid &guid, std::vector< API_SubElement > &subElems, UInt64 mask=APIMemoMask_All)
 Retrieves all additional information of the sub-elements of an external hierarchical element.
 
GSErrCode ACAPI_Element_ChangeMemo (API_Guid &guid, UInt64 mask, const API_ElementMemo *memo)
 Changes the memo part of certain element types.
 
GSErrCode ACAPI_Element_GetRelations (const API_Guid &guid, const API_ElemType &otherType, void *relData, UInt32 mask=0)
 Returns information on objects connected to walls, beams, beam segments, rooms, shells, roofs, curtain wall panels, skylights, windows, and doors.
 
GSErrCode ACAPI_Element_GetSyTran (const API_Elem_Head *elemHead, API_SyTran *syTran)
 Obtains the transformation parameters of an actual instance of a library part.
 
GSErrCode ACAPI_Element_GetHotspots (const API_Guid &guid, GS::Array< API_ElementHotspot > *hotspotArray)
 Retrieves the hotspots of the given element.
 
GSErrCode ACAPI_Element_Create (API_Element *element, API_ElementMemo *memo)
 Places a new element into the current database.
 
GSErrCode ACAPI_Element_CreateExt (API_Element *element, API_ElementMemo *memo, UInt32 nSubElems, API_SubElement *subElems)
 Places a new Window, Door, Skylight, Section, Elevation, Interior Elevation, ChangeMarker, Detail, or Worksheet element with the specified marker into the current database.
 
GSErrCode ACAPI_Element_ChangeParameters (const GS::Array< API_Guid > &elemGuids, const API_Element *defPars, const API_ElementMemo *defMemo, const API_Element *mask)
 Changes the parameters of a number of elements.
 
GSErrCode ACAPI_Element_Change (API_Element *element, const API_Element *mask, const API_ElementMemo *memo, UInt64 memoMask, bool withdel)
 Modifies an element in the current database.
 
GSErrCode ACAPI_Element_ChangeMore (GS::Array< API_Guid > &elemGuids, const API_Element *defPars, const API_ElementMemo *defMemo, const API_Element *mask, UInt64 memoMask, bool withdel)
 Modifies a number of elements in the current database.
 
GSErrCode ACAPI_Element_ChangeMorphEdgeType (const API_Guid &elemID, API_MorphEdgeTypeID edgeType)
 Modifies a morph element's edge type in the current database.
 
GSErrCode ACAPI_Element_ChangeExt (API_Element *element, const API_Element *mask, API_ElementMemo *memo, UInt64 memoMask, UInt32 nSubElems, API_SubElement *subElems, bool withdel, Int32 subIndex)
 Modifies a Window, Door, Section, Elevation, Interior Elevation, ChangeMarker, Detail, Worksheet, Stair or External element in the current database.
 
GSErrCode ACAPI_Element_Delete (const GS::Array< API_Guid > &elemGuids)
 Deletes a number of elements.
 
GSErrCode ACAPI_Element_DeleteSelected ()
 Deletes the selected elements.
 
GSErrCode ACAPI_Element_Edit (GS::Array< API_Neig > *elemNeigs, const API_EditPars &pars)
 Transforms a set of elements.
 
GSErrCode ACAPI_Element_GetUserData (API_Elem_Head *elemHead, API_ElementUserData *userData, UInt32 mask=0)
 Obtains the user data attached to an element or an element default.
 
GSErrCode ACAPI_Element_SetUserData (API_Elem_Head *elemHead, const API_ElementUserData *userData)
 Attaches the user data to an element or an element default.
 
GSErrCode ACAPI_Element_AttachObserver (const API_Guid &elemGuid, GSFlags notifyFlags=0)
 Attaches an observer to the given element.
 
GSErrCode ACAPI_Element_DetachObserver (const API_Guid &elemGuid)
 Detaches the observer from the given element.
 
GSErrCode ACAPI_Element_SolidOperation_Create (API_Guid guid_Target, API_Guid guid_Operator, API_SolidOperationID operation, GS::Array< API_Guid > *guid_Results=nullptr)
 Creates a new Solid Operation.
 
GSErrCode ACAPI_Element_SolidLink_Create (API_Guid guid_Target, API_Guid guid_Operator, API_SolidOperationID operation, GSFlags linkFlags)
 Defines a new Solid Operation Link.
 
GSErrCode ACAPI_Element_SolidLink_Remove (API_Guid guid_Target, API_Guid guid_Operator)
 Discontinues a Solid Operation Link.
 
GSErrCode ACAPI_Element_SolidLink_GetTime (API_Guid guid_Target, API_Guid guid_Operator, GSTime *linkTime, UInt32 *linkSubTime)
 Retrieves the creation time of a Solid Operation Link.
 
GSErrCode ACAPI_Element_SolidLink_GetOperation (API_Guid guid_Target, API_Guid guid_Operator, API_SolidOperationID *operation)
 Retrieves the operation code of a Solid Operation Link.
 
GSErrCode ACAPI_Element_SolidLink_GetFlags (API_Guid guid_Target, API_Guid guid_Operator, GSFlags *linkFlags)
 Retrieves the flag of a Solid Operation Link.
 
GSErrCode ACAPI_Element_SolidLink_GetTargets (API_Guid guid_Operator, GS::Array< API_Guid > *guid_Targets)
 Retrieves the target elements linked to an operator element.
 
GSErrCode ACAPI_Element_SolidLink_GetOperators (API_Guid guid_Target, GS::Array< API_Guid > *guid_Operators)
 Retrieves the operator elements linked to a target element.
 
GSErrCode ACAPI_Element_GetQuantities (API_Guid elemGuid, const API_QuantityPar *params, API_Quantities *quantities, const API_QuantitiesMask *mask=nullptr)
 Returns information on the quantities parameters of an element.
 
GSErrCode ACAPI_Element_GetMoreQuantities (const GS::Array< API_Guid > *elemGuids, const API_QuantityPar *params, GS::Array< API_Quantities > *quantities, const API_QuantitiesMask *mask=nullptr)
 Returns information on the quantities parameters of multiple elements of the same type.
 
GSErrCode ACAPI_Element_GetSurfaceQuantities (const GS::Array< API_Guid > *elemGuids, const GS::Array< API_Guid > *coverElemGuids, GS::Array< API_ElemPartSurfaceQuantity > *quantities)
 Returns information of the given elements surfaces.
 
GSErrCode ACAPI_Element_GetPropertyObjects (const API_Elem_Head *elemHead, API_PropertyObjectRefType ***propRefs, Int32 *nProp)
 Returns property objects of the element.
 
GSErrCode ACAPI_Element_GetPropertyObjects (const API_Elem_Head &elemHead, std::vector< API_PropertyObjectRefType > &propRefs)
 Returns property objects of the element.
 
GSErrCode ACAPI_Element_GetComponents_Obsolete (const API_Elem_Head *elemHead, API_Obsolete_ComponentRefType ***compRefs, Int32 *nComp)
 Returns the components of the element.
 
GSErrCode ACAPI_Element_GetDescriptors (const API_Elem_Head *elemHead, API_DescriptorRefType ***descRef, Int32 *nDesc)
 Returns the descriptors of an element.
 
GSErrCode ACAPI_Element_Trim_Elements (const GS::Array< API_Guid > &guid_ElementsToTrim)
 Trim elements given in the array with Roof(s) and/or Shell(s) are contained in the array.
 
GSErrCode ACAPI_Element_Trim_ElementsWith (const GS::Array< API_Guid > &guid_ElementsToTrim, const API_Guid &guid_Element, API_TrimTypeID trimType)
 Trim elements given in the array with the given Roof or Shell with the type of trim.
 
GSErrCode ACAPI_Element_Trim_Remove (const API_Guid &guid_Element1, const API_Guid &guid_Element2)
 Remove the trimming connection from the given elements.
 
GSErrCode ACAPI_Element_Trim_GetTrimType (const API_Guid &guid_Element1, const API_Guid &guid_Element2, API_TrimTypeID *trimType)
 Get the type of trimming connection between the given elements.
 
GSErrCode ACAPI_Element_Trim_GetTrimmedElements (const API_Guid &guid_Element, GS::Array< API_Guid > *guid_TrimmedElements)
 Get the trimmed elements with the given Roof or Shell in the array.
 
GSErrCode ACAPI_Element_Trim_GetTrimmingElements (const API_Guid &guid_Element, GS::Array< API_Guid > *guid_TrimmingElements)
 Get the trimming elements of the given element in the array.
 
GSErrCode ACAPI_Element_Merge_Elements (const GS::Array< API_Guid > &guid_ElementsToMerge)
 Merge elements given in the array.
 
GSErrCode ACAPI_Element_Merge_GetMergedElements (const API_Guid &guid_Element, GS::Array< API_Guid > *guid_MergedElements)
 Get the merged elements of the given element in the array.
 
GSErrCode ACAPI_Element_Merge_Remove (const API_Guid &guid_Element1, const API_Guid &guid_Element2)
 Remove the merge connection from the given elements.
 
GSErrCode ACAPI_Element_GetClassificationItems (const API_Guid &elemGuid, GS::Array< GS::Pair< API_Guid, API_Guid > > &systemItemPairs)
 Retrieves all of the classifications of an element.
 
GSErrCode ACAPI_Element_GetClassificationItemsDefault (const API_ElemType &type, GS::Array< GS::Pair< API_Guid, API_Guid > > &systemItemPairs)
 Retrieves all of the classifications of a default elem.
 
GSErrCode ACAPI_Element_GetClassificationInSystem (const API_Guid &elemGuid, const API_Guid &systemGuid, API_ClassificationItem &item)
 Retrieves a classification of an elem in a given classification system.
 
GSErrCode ACAPI_Element_GetClassificationInSystemDefault (const API_ElemType &type, const API_Guid &systemGuid, API_ClassificationItem &item)
 Retrieves a classification of a default elem in a given classification system.
 
GSErrCode ACAPI_Element_AddClassificationItem (const API_Guid &elemGuid, const API_Guid &itemGuid)
 Classifies an element.
 
GSErrCode ACAPI_Element_AddClassificationItemDefault (const API_ElemType &type, const API_Guid &itemGuid)
 Classifies an element.
 
GSErrCode ACAPI_Element_RemoveClassificationItem (const API_Guid &elemGuid, const API_Guid &itemGuid)
 Removes a classification from an element.
 
GSErrCode ACAPI_Element_RemoveClassificationItemDefault (const API_ElemType &type, const API_Guid &itemGuid)
 Removes a classification from an element.
 
bool ACAPI_Element_IsClassificationItemVisible (const API_Guid &elemGuid, const API_Guid &classificationGuid)
 Tells whether a classification item is visible for an element.
 
bool ACAPI_Element_IsClassificationItemVisibleDefault (const API_ElemType &type, const API_Guid &classificationGuid)
 Tells whether a classification item is visible for an element default.
 
GSErrCode ACAPI_Element_GetElementsWithClassification (const API_Guid &classificationItemGuid, GS::Array< API_Guid > &elemGuids)
 Query elements with the given classification.
 
GSErrCode ACAPI_Element_GetPropertyDefinitions (const API_Guid &elemGuid, API_PropertyDefinitionFilter filter, GS::Array< API_PropertyDefinition > &propertyDefinitions)
 Retrieves all of the property definitions that are available for an element.
 
GSErrCode ACAPI_Element_GetPropertyValue (const API_Guid &elemGuid, const API_Guid &propertyDefinitionGuid, API_Property &property)
 Retrieves the specified property definition's value from the element.
 
GSErrCode ACAPI_Element_GetPropertyValues (const API_Guid &elemGuid, const GS::Array< API_PropertyDefinition > &propertyDefinitions, GS::Array< API_Property > &properties)
 Retrieves the specified property definitions with values.
 
GSErrCode ACAPI_Element_GetPropertyValuesByGuid (const API_Guid &elemGuid, const GS::Array< API_Guid > &propertyDefinitions, GS::Array< API_Property > &properties)
 Retrieves the specified property definitions (defined by their GUIDs) with values.
 
GSErrCode ACAPI_Element_SetProperty (const API_Guid &elemGuid, const API_Property &property)
 Sets the specified property for the given values on an element.
 
GSErrCode ACAPI_Element_SetProperties (const API_Guid &elemGuid, const GS::Array< API_Property > &properties)
 Sets the specified properties for the given values on an element.
 
GSErrCode ACAPI_Element_GetPropertyDefinitionsOfDefaultElem (const API_ElemType &type, API_PropertyDefinitionFilter filter, GS::Array< API_PropertyDefinition > &definitions)
 Retrieves all of the property definitions that are available for an element default.
 
GSErrCode ACAPI_Element_GetPropertyValueOfDefaultElem (const API_ElemType &type, const API_Guid &propertyDefinitionGuid, API_Property &property)
 Retrieves the value of the specified property definition.
 
GSErrCode ACAPI_Element_GetPropertyValuesOfDefaultElem (const API_ElemType &type, const GS::Array< API_PropertyDefinition > &propertyDefinitions, GS::Array< API_Property > &properties)
 Retrieves the values of the specified property definitions.
 
GSErrCode ACAPI_Element_GetPropertyValuesOfDefaultElemByGuid (const API_ElemType &type, const GS::Array< API_Guid > &propertyDefinitionGuids, GS::Array< API_Property > &properties)
 Retrieves the values of the specified property definitions.
 
GSErrCode ACAPI_Element_SetPropertyOfDefaultElem (const API_ElemType &type, const API_Property &property)
 Sets the specified property to the given value on an element default.
 
GSErrCode ACAPI_Element_SetPropertiesOfDefaultElem (const API_ElemType &type, const GS::Array< API_Property > &properties)
 Sets the specified properties for the given values on an element default.
 
bool ACAPI_Element_IsPropertyDefinitionValueEditable (const API_Guid &elemGuid, const API_Guid &propertyGuid)
 Tells whether the value of the property can be modified for the specified element. If the elemGuid argument is APINULLGuid, it tells whether the property definition's default value is editable.
 
bool ACAPI_Element_IsPropertyDefinitionValueEditableDefault (const API_ElemType &type, const API_Guid &propertyGuid)
 Tells whether the value of the property can be modified for the specified tool default.
 
bool ACAPI_Element_IsPropertyDefinitionAvailable (const API_Guid &elemGuid, const API_Guid &propertyGuid)
 Tells whether a property definition is available for an element.
 
bool ACAPI_Element_IsPropertyDefinitionAvailableDefault (const API_ElemType &type, const API_Guid &propertyGuid)
 Tells whether a property definition is available for an element default.
 
bool ACAPI_Element_IsPropertyDefinitionVisible (const API_Guid &elemGuid, const API_Guid &propertyGuid)
 Tells whether a property definition is visible for an element.
 
bool ACAPI_Element_IsPropertyDefinitionVisibleDefault (const API_ElemType &type, const API_Guid &propertyGuid)
 Tells whether a property definition is visible for an element default.
 
GSErrCode ACAPI_Element_GetCollisions (const GS::Array< API_Guid > &guidSet1, const GS::Array< API_Guid > &guidSet2, GS::Array< GS::Pair< API_CollisionElem, API_CollisionElem > > &resultArray, const API_CollisionDetectionSettings &apiColDetSettings)
 Returns the collisions between two groups.
 
GSErrCode ACAPI_Element_GetComponents (const API_Guid &elemGuid, GS::Array< API_ElemComponentID > &elemComponents)
 Retrieves the components of an element.
 
GSErrCode ACAPI_Element_GetPropertyDefinitions (const API_ElemComponentID &elemComponent, API_PropertyDefinitionFilter filter, GS::Array< API_PropertyDefinition > &propertyDefinitions)
 Retrieves all of the property definitions that are available for a component of an element.
 
GSErrCode ACAPI_Element_GetPropertyValue (const API_ElemComponentID &elemComponent, const API_Guid &propertyDefinitionGuid, API_Property &property)
 Retrieves the specified property definition's value from the component.
 
GSErrCode ACAPI_Element_GetPropertyValues (const API_ElemComponentID &elemComponent, const GS::Array< API_PropertyDefinition > &propertyDefinitions, GS::Array< API_Property > &properties)
 Retrieves the values of the specified property definitions from the component.
 
GSErrCode ACAPI_Element_GetPropertyValuesByGuid (const API_ElemComponentID &elemComponent, const GS::Array< API_Guid > &propertyDefinitions, GS::Array< API_Property > &properties)
 Retrieves the specified property definitions (defined by their GUIDs) with values from the component.
 
GSErrCode ACAPI_Element_GetActualOverrideStyle (const API_Guid &guid_Element, API_OverrideStyle &elemOverrideStyle)
 Get actual (merged) visual override style for an element.
 
GSErrCode ACAPI_Element_Decompose (const API_Guid &elemGuid, API_ElementDecomposerInterface *elementDecomposer)
 Enumerates the planes of a Multi-plane Roof.
 
GSErrCode ACAPI_Element_CatchChangeDefaults (const API_ToolBoxItem *elemType, APIDefaultsChangeHandlerProc *handlerProc)
 Register or unregister your add-on to be notified if the default settings of a given element type is modified.
 
GSErrCode ACAPI_Element_CatchNewElement (const API_ToolBoxItem *elemType, APIElementEventHandlerProc *handlerProc)
 Register or unregister your add-on to be notified if the given type of element is created.
 
GSErrCode ACAPI_Element_InstallElementObserver (APIElementEventHandlerProc *handlerProc)
 Installs an element observer function which receives notifications on elements' changes.
 
void ACAPI_ELEMENT_QUANTITIES_MASK_CLEAR (API_QuantitiesMask &mask)
 Clears the mask for querying quantities.
 
void ACAPI_ELEMENT_QUANTITIES_MASK_SETFULL (API_QuantitiesMask &mask)
 Set the mask to full (return all quantities) for querying quantities.
 
void ACAPI_ELEMENT_QUANTITY_MASK_CLEAR (API_QuantitiesMask &mask)
 Clears the element part of the mask for querying element quantities.
 
void ACAPI_ELEMENT_QUANTITY_MASK_SETFULL (API_QuantitiesMask &mask)
 Set the element part of the mask to full (return all quantities) for querying element quantities.
 
void ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_CLEAR (API_QuantitiesMask &mask)
 Clears the composites part of the mask for querying composite quantities.
 
void ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_SETFULL (API_QuantitiesMask &mask)
 Set the composites part of the mask to full (return all quantities) for querying composite quantities.
 

Detailed Description

To have an overview what the elements are, and how they fit into the entire database please refer to the Element Overview chapter. In these papers only the handler functions are explained in full details.

Element Overview

Applicable types of elements are enumerated in the API_ElemTypeID structure. The definition of an element is described in the API_Element structure, which is a union of all element types. All of the definitions begin with a common header structure named API_Elem_Head.

Every structure which describes a particular type of element (like API_WallType, API_LineType etc.) are logically separated into different parts.

Many element related functions use the API_Element structure on the parameter list. As a general rule, you have to fill the required fields in the union. Archicad parses the request based on the values, and passes the return parameters in the same structure. This is why most of the functions do not have the const directive in their prototypes.


Retrieving an element from the database

Please note that from API 11 we start to move away from the typeID/index identification towards a GUID-based identification. In API 12 the GUID way has precedence. From API 18 the GUID way is only available, typeID/index identification was removed.

Let's look at a simple example. Assume you are interested in getting the data of a given element of the database. In this case you should use a variable of type API_Element.

API_Element element = {};
GSErrCode err;
element.header.guid = GSGuid2APIGuid (GS::Guid ("EF7A21F7-F841-4030-B6DC-C1DC8DA2F1E6"));
err = ACAPI_Element_Get (&element);
API_Guid & GSGuid2APIGuid(GS::Guid &guid)
Converting from GS::Guid to API_Guid.
Definition API_Guid.hpp:91
GSErrCode ACAPI_Element_Get(API_Element *element, UInt32 mask=0)
Returns information on the main parameters of a given element.
API_Guid guid
The globally unique identifier of the element. It is type-independent, and guaranteed to be globally ...
Definition APIdefs_Elements.h:569
A union collecting all known element types.
Definition APIdefs_Elements.h:17978
API_Elem_Head header
General element header.
Definition APIdefs_Elements.h:17984

The data of the wall is returned in the element.wall part of the union. You should check the hasMemo field in the returned header. If it is set you are informed that additional data is available for the element, such as gables and polygon nodes. Since producing this data may be a relatively a long conversion process, this information can be obtained with an additional function call.

GSErrCode err;
API_ElementMemo memo = {};
err = ACAPI_Element_GetMemo (element.header.guid, &memo, APIMemoMask_All);
GSErrCode ACAPI_Element_GetMemo(const API_Guid &guid, API_ElementMemo *memo, UInt64 mask=APIMemoMask_All)
Retrieves all additional information attached to elements.
Describes the variable length additional data of elements.
Definition APIdefs_Elements.h:18512

In this case, you have got all of the additional data related to the particular element. The memo structure is a collection of several handles and pointer (dynamic memory). If any is allocated (i.e. its value is not nullptr it contains data. If you do not need the data any more you are required to free the allocated memory blocks. The suggested way is the following:

GSErrCode ACAPI_DisposeElemMemoHdls(API_ElementMemo *memo)
Frees the memory occupied by all of the allocated memo handles.

If you use this function, it is ensured that all of the dynamic data will be freed, and also there will be no compatibility problems if your add-on is installed to a newer version of Archicad.

It is very important to examine the error codes returned by the API functions, and interpret the returned value.

It is usual that you want to go through the instances of a particular type of element in the database. The following example gives a good template to do that:

GS::Array<API_Guid> elemList;
GSErrCode err = ACAPI_Element_GetElemList (API_WallID, &elemList);
for (Int32 i = 0; i < elemList.GetSize () && err == NoError; ++i) {
API_Element element = {};
element.header.guid = elemList[i];
if (ACAPI_Element_Get (&element) == NoError) {
/* do what you want */
}
}
GSErrCode ACAPI_Element_GetElemList(const API_ElemType &type, GS::Array< API_Guid > *elemList, API_ElemFilterFlags filterBits=APIFilt_None, const API_Guid &renovationFilterGuid=APINULLGuid)
Returns an array of guids of the elements of the given type.
@ API_WallID
Definition APIdefs_Elements.h:73

A better and suggested way to set up such a loop is to use the element filter service of the API. It is common that you are interested in elements being on the active story only or being on a visible layer, or just for editable elements, and so on. If you call the ACAPI_Element_Get function in a loop, Archicad is requested to convert all of the elements to API form, even if you do not need them. This algorithm can be very slow.

In the next example you see a very effective, fast way to get the elements only you are interested in:

GS::Array<API_Guid> elemList;
ACAPI_Element_GetElemList (API_WallID, &elemList, APIFilt_OnActFloor);
for (GS::Array<API_Guid>::ConstIterator it = elemList.Enumerate (); it != nullptr; ++it) {
API_Element element = {};
element.header.guid = *it;
if (ACAPI_Element_Get (&element) == NoError) {
/* do what you want */
}
}

You now see that the APIERR_DELETED return code is not checked, since all elements are filtered which do not meet your needs as well as the deleted ones.

You can also enumerate elements by drawing order and creation order with the [ACAPI_DrawOrder_DrawOrderGetNext and [AACAPI_DrawOrder_CreationOrderGetNext database functions respectively.


Creating an element

The element creation procedure is also fairly simple. All you have to do is to fill the appropriate part of the API_Element and optionally, the API_ElementMemo structure. The [ACAPIACAPI_Element_Create function does the following:

It is very important that Archicad does not free any dynamic data structure you have allocated and passed to Archicad. They must be freed by your code.

An other important note is the following. Every data structure filled by you must be initialized to zero, because of forward compatibility. Fillers may be used in the later versions of the API, so if they are not initialized to zero the result may be unpredictable.

The template to create an element should be the following:

API_Element element = {};
API_ElementMemo memo = {};
API_Guid wallGuid;
GSErrCode err;
/* fill element.wall */
/* fill memo for polygonal walls */
err = ACAPI_Element_Create (&element, &memo);
wallGuid = element.header.guid;
GSErrCode ACAPI_Element_Create(API_Element *element, API_ElementMemo *memo)
Places a new element into the current database.
API_ElemType type
The type of the element.
Definition APIdefs_Elements.h:550
Represents a GS::Guid in the API layer.
Definition API_Guid.hpp:42

Many elements refer to each other and these cross-references can be set up very easily. You just have to follow the general logic of Archicad, which means that referred elements must exist. For example first you create a wall, then windows are placed in it, and also you can assign associated labels.

You also have to do the same using the API functions. The [ACAPI_Element_Create function returns the guid of the created element, which can be used in references. If you want to place a window in the created wall, and assign a label do the following:

element = {};
element.window.owner = wallGuid;
/* set other parameters... */
err = ACAPI_Element_Create (&element, nullptr);
element = {};
element.label.parent = wallGuid;
/* set other parameters... */
err = ACAPI_Element_Create (&element, nullptr);
@ API_LabelID
Definition APIdefs_Elements.h:118
@ API_WindowID
Definition APIdefs_Elements.h:82
API_Guid parent
Contains the type of the parent element, or API_ZombieElemID if the Label is independent....
Definition APIdefs_Elements.h:10022
API_Guid owner
Reference to the container wall (see API_Guid).
Definition APIdefs_Elements.h:5446
API_LabelType label
Represents a label.
Definition APIdefs_Elements.h:18083
API_WindowType window
Represents a window.
Definition APIdefs_Elements.h:18009

Controlling the selection

You can control the active selection also.

There are two basic type of selection methods in Archicad:

Both of them are supported by the API. The possible values of the active selection method are enumerated in the API_SelTypeID structure. The API_SelEmpty identifier means that nothing is selected in the current database in Archicad. The API_SelElems identifier corresponds to the first method when elements are individually selected. Other values identify that the selection is done by some kind of marquee shape.

In case of individually selected elements, Archicad returns all the elements which are selected. In the case of marquee based selection, only those elements will be returned which have an intersection with, or are within the marquee area.

The element selection procedure is very easy. You just have to call the ACAPI_Selection_Select function to select an individual element, or a group of elements. You have the possibility either to open a new selection, or append one more element to the actual selection.


Internal parts of an element: the API_Neig structure

Both the ACAPI_Selection_Select and ACAPI_Selection_Get functions use the API_Neig structure. This data structure makes possible to distinguish the internal parts of the elements.

You can see how smart the cursor is, when you touch one of the element's nodes or edges while moving it through the shape of a given element. All of these points or edges can be described by an API_Neig structure.

Let's see an example. According to the roofs the special interests are organized into three subclasses. They are:

neigID inIndex range Description
APINeig_Roof [1...n] Identifies one of the vertices of the roof polygon. The inIndex value corresponds to the position of the vertex in the vertex array. The holeSel bit in the flags is not set if the point belongs to the main contour of the roof polygon.
APINeig_RoofOn [1...n] Identifies one of the edges of the roof polygon. The inIndex value corresponds to the position of the starting vertex in the vertex array. The holeSel bit in the flags is set if the edge belongs to a subcontour of the roof polygon.
APINeig_RBL [1...2] Identifies the reference line of the roof. The inIndex value 1 and 2 means the start and end point of it, respectively.

When you go through the selected elements, you get the information which point or edge was clicked by the mouse when the selection was made. The only useful information according to the selection is whether a whole polygonal element is selected or just one of its sub-contours.

If you search the API_Neig structure in the APIdefs_Elements.h file, you will see that it is used in many places.

It is used to give you information on which point was clicked in the input functions; see the [AACAPI_UserInput_GetPoint function.


The 3D model

Warning
Obsolete. The recommended way of accessing the 3D Model is now illustrated in the ModelAccess example.

The 3D representation of the actual database can be accessed through the API_Component3D structure.

Applicable types of elements are enumerated in the API_3DTypeID structure. The definition of a 3D component is described in the API_Component3D structure, which is in fact a union of all component types. All of the definitions begins with a common header structure, API_3D_Head.

Before you try to understand how the 3D model corresponds to the API structures, please read carefully the Primitive Elements chapter in the GDL Reference Manual.

The 3D representation of a particular element is based on the API_BodyType structure. One element may hold one or more bodies to describe the 3D geometry. Generally a body is built up from a number of vertices, edges, polygons and normal vectors. This data structure gives you the number of the internal components as well as some status bits, surface properties and a global transformation matrix. You also get a reference to the parent element through an API_Elem_Head structure.

The 3D geometry itself is described by the API_PgonType, API_PedgType, API_EdgeType, API_VertType and API_VectType structures. They are documented in the GDL Reference Manual.

The 3D representation also owns a common pool of the surface materials. The polygon instances of the geometry description refer to these materials by indices. One surface definition is described by the API_UmatType structure. Surface materials may come from two sources. The list of materials contains all the global material attributes which are referenced by any polygon of the 3D geometry. Materials may be defined in GDL scripts also.

Elements placed with the light tool on the floor plan may contain light emissions, defined via GDL scripts. All of the light sources present in the 3D geometry are described with the API_LghtType structure.


Getting the whole 3D model

Warning
Obsolete. The recommended way of accessing the 3D Model is now illustrated in the ModelAccess example.

If you are interested in the whole 3D model that actually exists, you should use the following template:

API_Component3D comp3D = {};
Int32 nBody, i;
GSErrCode err;
err = ACAPI_3D_GetNum (API_BodyID, &nBody);
for (i = 1; i <= nBody && err == NoError; i++) {
comp3D.header.index = i;
err = ACAPI_3D_GetComponent (&comp3D);
if (err == NoError) {
/* explode the body into pgon, vert etc... */
}
if (err == APIERR_DELETED)
err = NoError;
}
@ APIERR_DELETED
Definition APIdefs_ErrorCodes.h:159
@ API_BodyID
Definition APIdefs_3D.h:42
Int32 index
The index field gives the current database index of the given component. Note that this number is not...
Definition APIdefs_3D.h:88
API_3DTypeID typeID
Identifies the type of the component.
Definition APIdefs_3D.h:82
General representation of a 3D component.
Definition APIdefs_3D.h:725
API_3D_Head header
The common header which specify the type and database index of the given component.
Definition APIdefs_3D.h:731

It is very important to organize your algorithm on a loop based on the component API_BodyType for the following reasons:

Once you have the definition of a body, you can set up inner loops to go through the primitives you are interested in. In the API_BodyType record you get the number of all internal components. Indices should start from 1.

The light and material components can be obtained in their own loops, because they are global (not body relative) components of the 3D model.

It is very important, that you get the data of the 3D model of Archicad that actually exists. This data is often not consistent with the floor plan elements. The update mechanism of the 3D window depends on many things, such as the switches in the preferences dialogs. As a general rule, you get the model which can be seen in the 3D window, if you use the above template.


Getting the 3D representation of a particular element

You also have the possibility to get the 3D representation of any particular floor plan element you are interested for. The basic mechanism is the same as in the previous example. The only difference is that you need the information which bodies belong to the given element.

Bodies assigned to a specific floor plan element can be obtained with the function ACAPI_ModelAccess_Get3DInfo. This function fills an API_ElemInfo3D structure to pass the index range of the main 3D data containers.

Important note: in this way the data you get is independent from the actually existing 3D model of Archicad. If the existing data is not consistent, Archicad converts the given element to 3D again to ensure the right result. As a general rule, you get the model which is fully synchronized to the actual floor plan data.

You should choose between the above mentioned ways to get the 3D model very carefully.

If you need consistent data you should choose the second way, setting up a loop which goes through the floor plan elements you are interested for. In this case you can get the 3D model element by element.

You often have to choose the first method. For example, if your add-on is called from the "Save As 3D" dialog, the data user wants to save is the data actually can be seen in the 3D window.

Typedef Documentation

◆ API_CWSegmentPart

Section of a curtain wall segment that neighbours a border line of the room.

Remarks
The API_WallPart structure is a member of API_RoomRelation. The following example shows how to interpret this data.
See also
API_WallPart

◆ API_DoorQuantity

Describes the different calculated values for doors.

Remarks
See also the window parameters in Appendix A of the GDL Reference manual. See also API_WindowQuantity.

◆ API_DoorRelation

Structure for retrieving connection data of a curtain wall panel, skylight, window or a door element.

Remarks
To learn more about the usage of this relation structure please refer to the ACAPI_Element_GetRelations function. See also API_CWPanelRelation.

◆ API_DoorType

Represents a door element.

Remarks
For door related memo data see the ACAPI_Element_GetMemo function.
See also
API_WindowType

◆ API_ElemFilter

typedef bool API_ElemFilter[API_LastElemType+1]

Array for filtering elements.

Remarks
This type is used in the API_GhostStoryType structure. The indices of this array correspond to the API_ElemTypeID enum values.

◆ API_ElevationType

Represents an elevation element.

Remarks
Most of the original structure members are now in API_SectionSegment. See also API_CutPlaneType.

◆ API_LampType

Represents an object or a lamp, or a symbol label.

Since
Archicad 26
Remarks
For beam related memo data see the ACAPI_Element_GetMemo function. See also API_ObjectType.

◆ API_LightQuantity

Describes the different calculated values for lights.

Remarks
These parameters are calculated from the 3D model of the light. See also API_ObjectQuantity.

◆ API_ShellRelation

Structure for retrieving connection data of a roof or a shell element.

Remarks
To learn more about the usage of this relation structure please refer to the ACAPI_Element_GetRelations function. See also API_RoofRelation.

◆ API_SkylightRelation

Structure for retrieving connection data of a curtain wall panel, skylight, window or a door element.

Remarks
To learn more about the usage of this relation structure please refer to the ACAPI_Element_GetRelations function. See also API_CWPanelRelation.

◆ API_WindowRelation

Structure for retrieving connection data of a curtain wall panel, skylight, window or a door element.

Remarks
To learn more about the usage of this relation structure please refer to the ACAPI_Element_GetRelations function. See also API_CWPanelRelation.

◆ API_WorksheetType

Represents a worksheet (worksheet mark).

Remarks
Refer to the ACAPI_Database_ChangeCurrentDatabase function to access and operate on the corresponding Detail/Worksheet database. For detail related memo data see the ACAPI_Element_GetMemo function.
See also
API_DetailType

◆ APIDefaultsChangeHandlerProc

typedef GSErrCode APIDefaultsChangeHandlerProc(const API_ToolBoxItem *defElemType)

Callback procedure to receive notifications on changes in element defaults.

Parameters
defElemType[in] The element type the notification is coming for.
Returns
  • NoError - The function has completed with success.
Remarks
This is the function which will be called when your add-on requested notifications on element default changes with ACAPI_Element_CatchChangeDefaults.

◆ APIElementEventHandlerProc

typedef GSErrCode APIElementEventHandlerProc(const API_NotifyElementType *elemType)

User supplied callback function for handling changes in elements.

Parameters
elemType[in] This structure contains the various parameters identifying the element the notification is for.
Returns
  • NoError - The function has completed with success.
Remarks
This is the function which will be called when your add-on attached an observer to an element with ACAPI_Element_AttachObserver, i.e. you are interested in changes to an element. This is a common entry point to your add-on for all observed elements; the element in question is passed in the elemType parameter. The meaning of the notification parameters are described at the API_NotifyElementType structure.
Example
#define ELEMSTR_LEN 256
bool GetElementTypeString (const API_ElemType& type, char *elemStr)
{
GS::UniString ustr;
GSErrCode err = ACAPI_Element_GetElemTypeName (type, ustr);
if (err == NoError) {
CHTruncate (ustr.ToCStr (), elemStr, ELEMSTR_LEN - 1);
return true;
}
return false;
}
// -----------------------------------------------------------------------------
// Element event handler function
// -----------------------------------------------------------------------------
GSErrCode ElementEventHandler (const API_NotifyElementType *elemType)
{
GSErrCode err = NoError;
char msgStr[256];
char elemStr[32];
API_Element parentElement {};
ACAPI_Notification_GetParentElement (&parentElement, nullptr, 0, nullptr);
switch (elemType->notifID) {
if (GetElementTypeString (elemType->elemHead.type, elemStr)) {
if (parentElement.header.guid != APINULLGuid)
sprintf (msgStr, "### API Notify Test: %s #%s created as a copy of #%s",
elemStr, APIGuidToString (elemType->elemHead.guid).ToCStr ().Get (),
APIGuidToString (parentElement.header.guid).ToCStr ().Get ());
else
sprintf (msgStr, "### API Notify Test: %s #%s created", elemStr,
APIGuidToString (elemType->elemHead.guid).ToCStr ().Get ());
} else
sprintf (msgStr, "### API Notify Test: Unknown element type created");
break;
default:
break;
}
if (err == NoError)
ACAPI_WriteReport (msgStr, false);
return NoError;
} // ElementEventHandler
// -----------------------------------------------------------------------------
// Called after the Add-On has been loaded into memory
// -----------------------------------------------------------------------------
GSErrCode Initialize ()
{
API_ToolBoxItem elemType_Wall = { API_WallID, { 0, 0 } };
// catch changes in defaults for all element types
return ACAPI_Element_CatchNewElement (&elemType_Wall, ElementEventHandler);
}

◆ RoomReductionPolyProc

typedef void RoomReductionPolyProc(const API_RoomReductionPolyType *roomRed)

Callback function to get reduction polygons of a room.

Parameters
roomRed[out] Data of a room reduction polygon.
Remarks
You should implement this function and pass its address to the ACAPI_Element_RoomReductions function as a callback function if you want Archicad to send the polygons which reduce a room area. Archicad will send you all the area (polygon) which reduce the room area. Much information is provided, the polygon itself, the area, the reduction percent, and the type of the parent element. See API_RoomReductionPolyType for more details. Since Archicad 18, the first dummy element has been removed.

Enumeration Type Documentation

◆ API_AnalyticalCurveType

Describes the type of the Structural Analytical Model Curve.

Since
Archicad 25
Enumerator
API_AnalyticalCurve_LineType 

The Structural Analytical Model Curve is a simple line segment.

API_AnalyticalCurve_ArcType 

The Structural Analytical Model Curve is an arc segment.

API_AnalyticalCurve_SplineType 

The Structural Analytical Model Curve is a spline multi point segment.

API_AnalyticalCurve_BezierType 

The Structural Analytical Model Curve is a Bezier arc segment.

API_AnalyticalCurve_EllipseType 

The Structural Analytical Model Curve is an ellipse arc segment.

◆ API_AnchorID

Various options for anchor points.

Enumerator
APIAnc_LT 

Left top.

APIAnc_MT 

Top middle.

APIAnc_RT 

Right top.

APIAnc_LM 

Left middle.

APIAnc_MM 

Middle.

APIAnc_RM 

Right middle.

APIAnc_LB 

Left bottom.

APIAnc_MB 

Bottom middle.

APIAnc_RB 

Right bottom.

◆ API_ArrowID

Describes the different arrow types.

Enumerator
APIArr_EmptyCirc 

Empty circle

APIArr_CrossCircIs 

Crossline + empty circle (inside the circle)

APIArr_FullCirc 

Full Circle

APIArr_SlashLine15 

15 degree slash line

APIArr_OpenArrow15 

15 degree open arrow

APIArr_ClosArrow15 

15 degree closed arrow (triangle)

APIArr_FullArrow15 

15 degree full arrow

APIArr_SlashLine30 

30 degree slash line

APIArr_OpenArrow30 

30 degree open arrow

APIArr_ClosArrow30 

30 degree closed arrow (triangle)

APIArr_FullArrow30 

30 degree full arrow

APIArr_SlashLine45 

45 degree slash line

APIArr_OpenArrow45 

45 degree open arrow

APIArr_ClosArrow45 

45 degree closed arrow (triangle)

APIArr_FullArrow45 

45 degree full arrow

APIArr_SlashLine60 

60 degree slash line

APIArr_OpenArrow60 

60 degree open arrow

APIArr_ClosArrow60 

60 degree closed arrow (triangle)

APIArr_FullArrow60 

60 degree full arrow

APIArr_SlashLine90 

90 degree slash line

APIArr_PepitaCirc 

Pepita circle

APIArr_BandArrow 

Lane arrow (double line)

APIArr_HalfArrowCcw15 

15 degree rightwards harpoon with barb upwards

APIArr_HalfArrowCw15 

15 degree rightwards harpoon with barb downwards

APIArr_HalfArrowCcw30 

30 degree rightwards harpoon with barb upwards

APIArr_HalfArrowCw30 

30 degree rightwards harpoon with barb downwards

APIArr_HalfArrowCcw45 

45 degree rightwards harpoon with barb upwards

APIArr_HalfArrowCw45 

45 degree rightwards harpoon with barb downwards

APIArr_HalfArrowCcw60 

60 degree rightwards harpoon with barb upwards

APIArr_HalfArrowCw60 

60 degree rightwards harpoon with barb downwards

APIArr_SlashLine75 

75 degree slash line

◆ API_AssemblySegmentCutTypeID

The type of cut.

Enumerator
APIAssemblySegmentCut_Horizontal 

Assembly segment is cut horizontally

APIAssemblySegmentCut_Vertical 

Assembly segment is cut vertically

APIAssemblySegmentCut_Custom 

Assembly segment is cut custom defined

◆ API_AssemblySegmentLengthTypeID

The type of segment length.

Enumerator
APIAssemblySegment_Fixed 

Segment length is fixed.

APIAssemblySegment_Proportional 

Segment length is proportional.

◆ API_BeamShapeTypeID

The type of segment length.

Enumerator
API_StraightBeam 

Straight

API_HorizontallyCurvedBeam 

Horizonzally curved

API_VerticallyCurvedBeam 

Vertically curved

◆ API_BeamVisibleLinesID

Controls the visibility of the beam lines.

Enumerator
APIBeamLineShowAlways 

Always show the beam line

APIBeamLineHideAlways 

Always hide the beam line

APIBeamLineByMVO 

Beam line visibility determined by MVO

◆ API_BHoleTypeID

Determines the shape of the holes in the beam.

Enumerator
APIBHole_Rectangular 

Rectangular holes.

APIBHole_Circular 

Circular holes.

◆ API_BreakLineAngleTypeID

The angle type of the break line.

Enumerator
APIBreakLineAngle_AngleToVertical 

Angle to vertical.

APIBreakLineAngle_AngleToHorizontal 

Angle to horizontal.

APIBreakLineAngle_NumberOfGoings 

Angle will be calculated based on the given Number of Goings.

◆ API_BreakLinePositionTypeID

The line position type of the break line.

Enumerator
APIBreakLinePosition_FloorPlanCutPlaneHeight 

Break line height is determined from the Floor Plan Cut Plane Height.

APIBreakLinePosition_CustomHeight 

Break line is on Custom Height.

APIBreakLinePosition_AtNthRiser 

Break line is on a given Riser.

◆ API_ChangeMarkerComponentType

Specifies which parts of the Change Marker are visible.

Enumerator
APICMCT_HeadOnly 

Only the 'head' part of the Change Marker is visible.

APICMCT_CloudOnly 

Only the 'cloud' part of the Change Marker is visible.

APICMCT_HeadAndCloud 

All components (head and cloud) of the Change Marker are visible.

◆ API_ChangeMarkerLinkType

Specifies the linkage type of a ChangeMarker, or the ChangeMarker Default.

Enumerator
APICMLT_CreateNewChange 

When creating/modifying ChangeMarkers a new Change will be created, and the created/modified ChangeMarker will be linked to that Change.

APICMLT_Linked 

The ChangeMarker or ChangeMarker Default is linked to a Change.

APICMLT_Unlinked 

The ChangeMarker or ChangeMarker Default is unlinked.

◆ API_CircleLevelDimensionFillID

Describe the circle style marker fill type of elevation dimension.

Enumerator
API_EmptyFill 

Without fill.

API_NorthwestBlack 

First and fourth quarter of circle are filled.

API_NortheastBlack 

Second and third quarter of circle are filled.

◆ API_ColorModeValues

Specifies output color transformation for drawing elements.

Enumerator
APIColorMode_OriginalColors 

Use the original colors of the drawing element.

APIColorMode_BlackAndWhite 

Produce B&W output.

APIColorMode_GrayScale 

Produce grayscale output.

◆ API_CoverFillTransformationTypeID

Type of cover fill transformation.

Remarks
This structure holds the API_CoverFillTransformation type of the cover fills of API_BeamType and API_ColumnType elements.
Enumerator
API_CoverFillTransformationType_Global 

The fill is linked to Project Origin, the orientation of the hatching is always orthogonal independently of transformations made on the filled element.

API_CoverFillTransformationType_Rotated 

The fill is linked to Fill Origin, a single handle shows the orientation of the fill, and the fill pattern starts at the origin of the filled element.

API_CoverFillTransformationType_Distorted 

The pattern of the fill is distorted in x and/or y directions.

◆ API_CutPlaneMarkerShowType

The enumeration of the available Section/Elevation markers appearing.

Remarks
The API_CutPlaneMarkerShowType enum is used in the API_CutPlaneType structure.
Enumerator
APICutPl_ShowMiddleMarker 

Show only middle marker.

APICutPl_ShowWingMarkers 

Show only side markers.

◆ API_CutPlaneShowType

Stories to show cutplane on.

Enumerator
APICutPl_ShowAll 

Show on All stories

APICutPl_ShowOnOneStory 

Show only on one story, setting in storyToShowOn

APICutPl_ShowInRange 

Show on stories which are in the range

APICutPl_ShowPartRange 

Show on stories which are in or cut by the range

◆ API_CutPlaneUncutSurfaceFillID

The method for displaying fills of uncut surfaces in the distant area of the Section/Elevation (effective if distAreaUseUncutSurfFill is true )

Enumerator
APICutPl_PenColor 

Apply uniform pencolor to the fills of all uncut surfaces

APICutPl_MaterialColorShaded 

Display uncut fills using own material colors of the elements with shading

APICutPl_MaterialColorNonShaded 

Display uncut fills using own material colors of the elements without shading

◆ API_CWAccessoryCategoryID

Curtain wall accessory category type.

Remarks
The API_CWAccessoryCategoryID type is used in the API_CWAccessoryType structure.
Enumerator
APICWAccC_System 

The CW Accessory is system category. It's generated from owner Curtain Wall's accessory settings.

APICWAccC_Custom 

The CW Accessory is custom category. It has own settings, different from owner elem's accessory settings.

◆ API_CWBoundaryFramePosID

Define curtain wall boundary frame position.

Remarks
The API_CWBoundaryFramePosID type is used in the API_CWSegmentType structure.
Enumerator
APICW_Boundary_Unknown 

Unknown.

APICW_Boundary_OutSide 

Boundary frames are on the outside of the grid.

APICW_Boundary_Center 

Boundary frames are on the center of the grid.

APICW_Boundary_Inside 

Boundary frames are on the inside of the grid.

◆ API_CWCellCrossingFrameTypeID

Describes the type of the crossing frame in the cell.

Enumerator
APICWCFT_NoCrossingFrame 

The cell does not have a crossing frame.

APICWCFT_FromBottomLeftToTopRight 

The cell has a crossing frame from its bottom left to its top right.

APICWCFT_FromTopLeftToBottomRight 

The cell has a crossing frame from its top left to its bottom right.

◆ API_CWFrameObjectTypeID

Curtain wall frame object type.

Remarks
The API_CWFrameObjectTypeID type is used in the API_CWFrameType structure. The APICWFrObjectType_Generic and APICWFrObjectType_ButtGlazed types have been removed in Archicad 22.
Enumerator
APICWFrObjectType_Invisible 

Curtain wall frame object type is invisible

APICWFrObjectType_GDL 

Curtain wall frame object type is GDL

APICWFrObjectType_InvisibleConnectedTurning 

Curtain wall frame object type is invisible connected turning

APICWFrObjectType_InvisibleConnectedStill 

Curtain wall frame object type is invisible connected still

◆ API_CWJunctionCategoryID

Curtain wall junction category type.

Remarks
The API_CWJunctionCategoryID type is used in the API_CWJunctionType structure.
Enumerator
APICWJunC_System 

Junction is generated from owner Curtain Wall settings.

APICWJunC_Custom 

Junction has own custom settings.

◆ API_CWJunctionClampFrameOrientationID

Curtain wall junction clamp frame orientation type.

Remarks
The API_CWJunctionClampFrameOrientationID type is used in the API_CWJunctionType structure.
Enumerator
APICWJunClampFrameOrient_NoClamp 

No clamp.

APICWJunClampFrameOrient_ClampAtBeg 

Clamp at begin.

APICWJunClampFrameOrient_ClampAtEnd 

Clamp at end.

APICWJunClampFrameOrient_ClampAtBothEnds 

Clamp both at begin and at end.

◆ API_CWPanelObjectTypeID

Curtain wall panel object type.

Remarks
The API_CWPanelObjectTypeID type is used in the API_CWPanelType structure.
Enumerator
APICWPaObjectType_Generic 

It is the default generic curtain wall panel type.

APICWPaObjectType_GDL 

The curtain wall panel is a GDL Object.

◆ API_CWPlacementID

Curtain wall junction placement type.

Remarks
The API_CWPlacementID type is used in the API_CWSegmentType structure.
Enumerator
APICW_Placement_AllGridPoints 

Junctions will be placed at all grid points of Curtain wall.

APICW_Placement_Manual 

Junctions will be placed mannually - one by one - in the grid points.

◆ API_CWSegmentCategoryID

Curtain wall segment type.

Remarks
The API_CWSegmentCategoryID type is used in the API_CWSegmentType structure.
Enumerator
APICWSeC_System 

Section is generated from owner Curtain Wall settings.

APICWSeC_Custom 

Section has own custom settings.

◆ API_CWSegmentGridOrigPosTypeID

Curtain wall segment grid origin pos type.

Remarks
The API_CWSegmentGridOrigPosTypeID type is used in the API_CWSegmentPatternData structure.
Enumerator
APICWSeGridOrigin_StartWithPattern 

Pattern placement starts from the beginning of the segment.

APICWSeGridOrigin_StartFromCenter 

The pattern starts from the center of the segment, repeating both ways.

APICWSeGridOrigin_AlignToCenter 

The pattern is aligned so that the center of the segment is the center of a pattern.

APICWSeGridOrigin_EndWithPattern 

Pattern placement starts from the end of the segment.

◆ API_CWSegmentPatternLogicID

Describes how the pattern is stretched in segments.

Enumerator
APICWSePL_FixedSizes 

The length of the pattern is given explicitly. This may result in incomplete patterns.

APICWSePL_BestDivision 

The length of the pattern is stretched, so that the least amount of stretching is done.

APICWSePL_NumberOfDivisions 

The length of the pattern is stretched, so that exactly nDivisionsamount of patterns are placed.

◆ API_CWSegmentTypeID

Curtain wall segment type.

Remarks
The API_CWSegmentTypeID type is used in the API_CWSegmentType structure.
Enumerator
APICWSeT_Invalid 

Invalid segment type.

APICWSeT_Line 

The segment type is Line.

APICWSeT_Arc 

The segment type is arc.

◆ API_DimLayoutID

Describes the layouting algorithm of the dimension.

Enumerator
API_Legacy 

Legacy layouting algorithm. Layouting as in Archicad 18 or before.

API_Flexible 

Flexible layouting algorithm.

API_Centered 

Centered layouting algorithm.

API_LayoutOff 

Layouting logic turned off, all notes are placed on the center of their dimension unit without any collision detection.

◆ API_DimOriginID

Describes the elevation dimension origin.

Enumerator
APIDimOrigin_ProjectZero 

to project zero

APIDimOrigin_RefLevel1 

to first reference level

APIDimOrigin_RefLevel2 

to second reference level

APIDimOrigin_StoredOrigin 

current user origin

APIDimOrigin_Altitude 

current altitude

◆ API_DimTextFillOrderID

enum class API_DimTextFillOrderID
strong

Describes the drawing order of the text's fill and contour relative to the dimension line.

Since
Archicad 26
Enumerator
FillAndContourUnderDimLine 

Fill and contour under dimension line

FillAndContourAboveDimLine 

Fill and contour above dimension line

◆ API_DirID

enum API_DirID

Defines various orientations for dimension and label texts.

Enumerator
APIDir_Parallel 

Parallel with element.

APIDir_Horizontal 

Horizontal orientation.

APIDir_Vertical 

Vertical orientation.

APIDir_General 

General orientation.

APIDir_Radial 

Radial orientation for radial dimensions.

APIDir_ArcDim 

Special orientation for arc dimensions.

APIDir_Perpendicular 

Perpendicular orientation for labels.

◆ API_DistribTypeID

Distribution of the given patternO.

Enumerator
APIDT_Divisions 

Divide segment into patternAmount divisions.

APIDT_PatternLength 

Fixed pattern length.

APIDT_BestDivisionByLength 

Equally distributed pattern. Maximal length is given by length.

◆ API_EdgeTrimID

Determines the type of the roof or slab edge trim. In previous API versions this enum type used to be called @ref API_RsideID.

Enumerator
APIEdgeTrim_Vertical 

Vertical edge. -

APIEdgeTrim_Perpendicular 

Perpendicular edge. -

APIEdgeTrim_Horizontal 

Horizontal edge.

APIEdgeTrim_CustomAngle 

Custom angled edge trim. The angle is defined in the API_EdgeTrim structure, which should be passed on or is returned in the edgeTrims field of API_ElementMemo structure. -

APIEdgeTrim_AlignWithCut 

Trim type of shell contour and hole contour edges (see API_ContourEdgeData). The trim is aligned along the extrusion of the cutting body.

◆ API_EditCmdID

Possible element transformations.

Remarks
Refer to the API_EditPars structure for parametrization; or to the ACAPI_Element_Edit function to transform database elements.
Enumerator
APIEdit_Drag 

Drag or Drag a Copy operation

APIEdit_Rotate 

Rotate or Rotate a Copy operation

APIEdit_Mirror 

Mirror or Mirror a Copy operation

APIEdit_Elevate 

Elevate operation

APIEdit_Stretch 

Horizontal stretch

APIEdit_VertStretch 

Vertical stretch

APIEdit_Resize 

Resize operation

APIEdit_General 

Other editing operation (e.g move a beam hole)

APIEdit_PHeightStretch 

Special stretch of model elements (slanted beam or column) modifying the inclination angle with the height parameter fixed (preserved height stretch)

APIEdit_PDirStretch 

Special stretch of model elements (slanted beam or column) in the direction of the element's axis (preserved direction stretch)

◆ API_ElemDisplayOptionsID

Floor plan display options of construction elements.

Remarks
Element display option defines how a construction element appears on the floor plan.
Enumerator
API_Standard 

Shows cut part of element, plus its uncut (downward) part in 3D-like form ('Projected' in the Settings dialog popups)

API_StandardWithAbstract 

Shows cut part of element (e.g., as cut at the level of the Floor Plan Cut Plane), plus the element's overhead part (i.e. the part of the element that is above the Floor Plan Cut Plane) ('Projected with Overhead' in the Settings dialog popups)

API_CutOnly 

Displays only the cut part of element, as cut with the Floor Plan Cut Plane (symbolic representation, which means 2D full view in case of Door/Window) ('Cut Only' in the Settings dialog popups)

API_OutLinesOnly 

The entire element's outline is shown using its uncut attributes (not available for Door/Window) ('Outlines Only' in the Settings dialog popups)

API_AbstractAll 

The entire element's outline is shown using its overhead attributes ('Overhead All' in the Settings dialog popups)

API_CutAll 

The whole floor plan projection of simple walls or vertical (simple or complex) columns will be displayed as cut, using their cut line and cut fill attributes, regardless of the elements' vertical position. This option is available only for simple straight walls or columns, or for complex columns, and only if the Show on Story control is set to "Current/Own Story only". The Floor Plan Cut plane settings do not affect the display of these elements. ('Symbolic Cut' in the Settings dialog popups)

◆ API_ElementDBEventID

Describes the cause of the element notification.

Remarks
This enumeration type is used in the API_NotifyElementType structure.
Enumerator
APINotifyElement_BeginEvents 

Indicates the start of element notifications.

APINotifyElement_EndEvents 

End of element notifications (no more notifications are expected in this task).

APINotifyElement_New 

A new element was created.

APINotifyElement_Copy 

The element was copied; the notifications are coming for the copy of the original element.

APINotifyElement_Change 

The parameters of the element were changed.

APINotifyElement_Edit 

The element was edited. The parameters of the editing transformation can be retrieved with ACAPI_Notification_GetTranParams.

APINotifyElement_Delete 

The element was deleted.

APINotifyElement_Undo_Created 

The last creating operation performed on the element has been undone.

APINotifyElement_Undo_Modified 

The last modifying operation performed on the element has been undone.

APINotifyElement_Undo_Deleted 

The last deleting operation performed on the element has been undone.

APINotifyElement_Redo_Created 

The last undone creating operation on the element has been redone.

APINotifyElement_Redo_Modified 

The last undone modifying operation on the element has been redone.

APINotifyElement_Redo_Deleted 

The last undone deleting operation on the element has been redone.

APINotifyElement_PropertyValueChange 

A property value attached to the element has been changed.

APINotifyElement_ClassificationChange 

An element's classification has changed.

◆ API_ElemProjectionModesID

Floor plan projection modes of construction elements.

Remarks
Element projection mode defines how a construction element appears on the floor plan.
Enumerator
API_Symbolic 

Symbolic

API_Projected 

Projected

API_Hybrid 

Projected with Symbolic Panels (valid only on API_CurtainWallType.cutProjectionMode)

◆ API_ElemTypeID

The type of an element. API_ElemType variationID APIVarId_Generic.

Since
Archicad 26
Remarks
This is general constant which describes the different element types, and is used in most element-related operations. Use the API_FirstElemType and API_LastElemType defines in loops that enumerate all element types. With the ACAPI_Element_GetElemTypeName goody function you can retrieve the localized name of the element types.
Enumerator
API_ZombieElemID 

Dummy element type. Can be used in certain functions (like in ACAPI_Element_GetRelations.)

API_WallID 

Wall element.

API_ColumnID 

Column element.

API_BeamID 

Beam element.

API_WindowID 

Window element.

API_DoorID 

Door element.

API_ObjectID 

Object element.

API_LampID 

Lamp element.

API_SlabID 

Slab element.

API_RoofID 

Roof element.

API_MeshID 

Mesh element.

API_DimensionID 

Dimension element.

API_RadialDimensionID 

Radial dimension element.

API_LevelDimensionID 

Level dimension element.

API_AngleDimensionID 

Angle dimension element.

API_TextID 

Text element.

API_LabelID 

Label element.

API_ZoneID 

Zone (room) element.

API_HatchID 

Hatch element.

API_LineID 

Line element.

API_PolyLineID 

PolyLine element.

API_ArcID 

Arc element.

API_CircleID 

Circle element.

API_SplineID 

Spline element.

API_HotspotID 

Hotspot element.

API_CutPlaneID 

Section element.

API_CameraID 

Camera element.

API_CamSetID 

Camera set element.

API_GroupID 

Group of elements.

API_SectElemID 

Element in sections.

API_DrawingID 

Drawing element.

API_PictureID 

Picture element.

API_DetailID 

Detail element.

API_ElevationID 

Elevation element.

API_InteriorElevationID 

Interior elevation element.

API_WorksheetID 

Worksheet element.

API_HotlinkID 

Hotlink element.

API_CurtainWallID 

Curtain wall element.

API_CurtainWallSegmentID 

Curtain wall segment element.

API_CurtainWallFrameID 

Curtain wall frame element.

API_CurtainWallPanelID 

Curtain wall panel element.

API_CurtainWallJunctionID 

Curtain wall junction element.

API_CurtainWallAccessoryID 

Curtain wall accessory element.

API_ShellID 

Shell element.

API_SkylightID 

Skylight element.

API_MorphID 

Morph element.

API_ChangeMarkerID 

ChangeMarker element.

API_StairID 

Stair element.

API_RiserID 

Stair Riser element.

API_TreadID 

Stair Tread element.

API_StairStructureID 

Stair Structure element.

API_RailingID 

Railing element.

API_RailingToprailID 

Toprail element.

API_RailingHandrailID 

Handrail element.

API_RailingRailID 

Rail element.

API_RailingPostID 

Railing Post element.

API_RailingInnerPostID 

Inner Post element.

API_RailingBalusterID 

Baluster element.

API_RailingPanelID 

Railing Panel element.

API_RailingSegmentID 

Railing segment element.

API_RailingNodeID 

Railing Node element.

API_RailingBalusterSetID 

Baluster Set element.

API_RailingPatternID 

Railing Pattern element.

API_RailingToprailEndID 

Toprail End element.

API_RailingHandrailEndID 

Handrail End element.

API_RailingRailEndID 

Rail End element.

API_RailingToprailConnectionID 

Toprail Connection element.

API_RailingHandrailConnectionID 

Handrail Connection element.

API_RailingRailConnectionID 

Rail Connection element.

API_RailingEndFinishID 

Railing end finish element.

API_BeamSegmentID 

Beam segment element.

API_ColumnSegmentID 

Column segment element.

API_OpeningID 

Opening element.

API_ExternalElemID 

External element.

◆ API_ElemVariationID

Describes the subcategory of an element.

Remarks
API_ElemVariationID is an extension of typeID (see API_Elem_Head). These are built-in subcategories. But if you register an own subtype with ACAPI_LibraryPart_RegisterSubtype function you have to pass at first a four-character identifier the variationID (your signature). This is an arbitrary long value with which you can identify your own subtype. It is used only in case of library elems (object, lamp, window, door).
Enumerator
APIVarId_Generic 

Generic element.

APIVarId_WallEnd 

Wall End (window subtype).

APIVarId_Door 

Door (opening subtype).

APIVarId_Skylight 

Skylight (opening subtype).

APIVarId_Object 

Generic object.

APIVarId_GridElement 

Grid element.

APIVarId_Light 

Generic light.

APIVarId_CornerWindow 

Corner window.

◆ API_ElemViewDepthLimitationsID

Depth limitation for the appearance of complex elements on the floor plan.

Remarks
For a display option, view depth limitation defines how much of an element appears on the floor plan. You can retrieve the current floor plan cut plane settings using the ACAPI_ProjectSetting_GetPreferences function with the API_FloorPlanCutDefinition structure.
Enumerator
API_ToFloorPlanRange 

The element representation on the floor plan is limited by the floor plan cut plane range.

API_ToAbsoluteLimit 

The element representation on the floor plan is limited by the floor plan cut plane's absolute display limit.

API_EntireElement 

Shows entire element, floor plan cut plane does not affect the floor plan representation.

◆ API_GridMeshDirection

The direction of a grid mesh.

Remarks
Defines the possible GridMesh directions
Enumerator
API_GridMeshLeft 

The left direction of the grid mesh

API_GridMeshRight 

The right direction of the grid mesh

API_GridMeshLowerRight 

The lower right direction of the grid mesh

API_GridMeshLower 

The lower direction of the grid mesh

API_GridMeshLowerLeft 

The lower left direction of the grid mesh

API_GridMeshUpperRight 

The upper right direction of the grid mesh

API_GridMeshUpper 

The upper direction of the grid mesh

API_GridMeshUpperLeft 

The upper left direction of the grid mesh

API_GridMeshDirNum 

The number of directions of the grid mesh

◆ API_HatchFlags

Determines the behaviour of the hatch.

Enumerator
APIHatch_HasBkgRGBColor 

The hatch background color is defined by an RGB Color.

APIHatch_HasFgRGBColor 

The hatch foreground color is defined by an RGB Color.

APIHatch_OverrideFgPen 

In case of a building material type hatch, use the fill pen in the hatch, instead of the building material's fill pen.

APIHatch_OverrideBkgPen 

In case of a building material type hatch, use the fill background pen in the hatch, instead of the building material's fill background pen.

APIHatch_OverrideFillInd 

In case of a building material type hatch, use the fill in the hatch, instead of the building material's fill.

◆ API_HatchOrientationTypeID

Type of the cover fill orientation.

Enumerator
API_HatchGlobal 

The fill is linked to Project Origin, the orientation of the hatching is always orthogonal independently of transformations made on the filled element

API_HatchRotated 

The fill is linked to Fill Origin, a single handle shows the orientation of the fill, and the fill pattern starts at the origin of the filled element

API_HatchDistorted 

The pattern of the fill is distorted in x and/or y directions

API_HatchCentered 

The pattern is circular fill distorted.

◆ API_HatchSubType

Determines the subtype type of the hatch.

Enumerator
API_FillHatch 

The hatch contains a Fill attribute.

API_BuildingMaterialHatch 

The hatch contains a Building Material attribute.

◆ API_HeadroomGenerationModeID

The type of room generation mode.

Enumerator
APIHM_RightAngleToSlope 

Generation with right angle to slope

APIHM_VerticallyToSlope 

Generation vertically to slope.

◆ API_ImageViewID

View type identifier.

Remarks
This structure is used in API_VisualOverriddenImage.
Enumerator
APIImage_Model2D 

2D floorplan view.

APIImage_Model3D 

3D view.

APIImage_Section 

Section view.

◆ API_JustID

enum API_JustID

Describes the various justification options.

Enumerator
APIJust_Left 

Left justification.

APIJust_Center 

Center justification.

APIJust_Right 

Right justification.

APIJust_Full 

Full justification.

◆ API_LblAnchorID

Describes how the pointer line is connected to the Label text (in case of Text Labels).

Enumerator
APILbl_MiddleAnchor 

The pointer line is attached to the middle of the text on the left side.

APILbl_TopAnchor 

The pointer line is attached to the top-left corner of the text.

APILbl_BottomAnchor 

The pointer line is attached to the bottom-left corner of the text.

APILbl_Underlined 

The text is underlined and the pointer line is a continuation of the underline.

◆ API_LblClassID

Describes the various types for a label.

Enumerator
APILblClass_Text 

Textual label

APILblClass_Symbol 

Symbolic label

◆ API_LeaderLineShapeID

Describes the shape of the pointer line of Note text or Label.

Remarks
API_SquareRoot type applies to Labels only.
Enumerator
API_Segmented 

Plain leader line.

API_Splinear 

Spline leader line.

API_SquareRoot 

Square Root leader line.

◆ API_LinePositionID

Position of the walking line.

Enumerator
APILP_Left 

Offset from the left side.

APILP_Right 

Offset from the right side.

APILP_Center 

Centered.

APILP_Auto 

Automatic (walking lines only).

◆ API_MarkerID

Describes the various types of dimension markers.

Enumerator
APIMark_CrossLine 

Small vertical line (for APIWtn_Small ).

APIMark_EmptyCirc 

Empty circle.

APIMark_SlashLine 

60 degree slash line.

APIMark_OpenArrow30 

30 degree open arrow.

APIMark_ClosArrow30 

30 degree closed arrow (triangle).

APIMark_FullArrow30 

30 degree filled arrow.

APIMark_SlashLine45 

45 degree slash line.

APIMark_CrossCirc 

Crossline + empty circle.

APIMark_OpenArrow90 

90 degree open arrow

APIMark_ClosArrow90 

90 degree closed arrow (triangle).

APIMark_FullArrow90 

90 degree filled arrow.

APIMark_FullCirc 

Filled circle.

APIMark_PepitaCirc 

Pepita circle, like a level dimension.

APIMark_BandArrow 

Lane arrow (double line).

APIMark_OpenArrow60 

60 degree open arrow.

APIMark_ClosArrow60 

60 degree closed arrow (triangle).

APIMark_FullArrow60 

60 degree filled arrow.

APIMark_SlashLine75 

75 degree slash line.

◆ API_ModelElemStructureType

Determines the structure type of the element.

Remarks
Valid structure types of an element type are shown in the table below:
Element Type Basic Structure Composite Structure Profile Structure
API_WallID x x x
API_ColumnID, API_BeamID x x
API_SlabID, API_RoofID, API_ShellID x x

API_MeshType, API_MorphType and API_CurtainWallType always contain Building Materials, so they don't have this structure.

Enumerator
API_BasicStructure 

The structure is defined by a Building Material attribute.

API_CompositeStructure 

The structure is defined by a Composite attribute.

API_ProfileStructure 

The structure is defined by a Profile attribute.

◆ API_MorphBodyTypeID

Determines the type of the morph body.

Enumerator
APIMorphBodyType_SurfaceBody 

The body type is Surface.

APIMorphBodyType_SolidBody 

The body type is Solid.

◆ API_MorphEdgeTypeID

Determines the type of the morph edge.

Enumerator
APIMorphEdgeType_SoftHiddenEdge 

The edge type is Soft Hidden.

APIMorphEdgeType_HardHiddenEdge 

The edge type is Hard Hidden.

APIMorphEdgeType_HardVisibleEdge 

The edge type is Hard Visible.

◆ API_MorphingRuleID

Type of the morphing rule applied by the Ruled Shell.

Enumerator
APIMorphingRule_Paired 

Paired segments morphing rule.

APIMorphingRule_Smooth 

Smooth morphing rule.

◆ API_NameTypeValues

Specifies how the name of the drawing is assembled.

Remarks
The options correspond to the different values in the Drawing Name popup on the Identification tabpage of the Drawing Settings dialog.
Enumerator
APIName_ViewOrSrcFileName 

The drawing's name is coming from the name of the view (for internal views) or file (for external drawings).

APIName_ViewIdAndName 

The drawing's name is coming from the ID and the name of the view.

APIName_CustomName 

The drawing has a user-defined name.

◆ API_NeigID

enum API_NeigID

Describes the various special points of elements.

Remarks
Here are the neigIDs with their inIndex in brackets for walls :
Wall neig 1
Wall neig 2
Here are the neigIDs with their inIndex in brackets for columns :
Column neig
Here are the neigIDs with their inIndex in brackets for windows (and very similar for doors):
Window neig
Here are the neigIDs with their inIndex in brackets for objects (and very similar for lamps):
Symbol neig
Here are the neigIDs with their inIndex in brackets for slabs :
Slab neig
Here are the neigIDs with their inIndex in brackets for roofs :
Roof neig
Here are the neigIDs with their inIndex in brackets for meshes :
Mesh neig
Here are the neigIDs with their inIndex in brackets for dimensions :
Dimension neig
Here are the neigIDs with their inIndex in brackets for radial dimensions :
Radial dimension neig
Here are the neigIDs with their inIndex in brackets for level dimensions :
Level dimension neig
Here are the neigIDs with their inIndex in brackets for angle dimensions :
Angle dimension neig
Here are the neigIDs with their inIndex in brackets for texts :
Text neig
Here are the neigIDs with their inIndex in brackets for labels :
Label neig
Here are the neigIDs with their inIndex in brackets for zones :
Zone neig
Here are the neigIDs with their inIndex in brackets for hatches :
Hatch neig
Here are the neigIDs with their inIndex in brackets for lines :
Line neig
Here are the neigIDs with their inIndex in brackets for arcs :
Arc neig
Here are the neigIDs with their inIndex in brackets for circles :
Circle neig
Here are the neigIDs with their inIndex in brackets for splines :
Spline neig
Here are the neigIDs with their inIndex in brackets for hotspots :
Hot neig
Here are the neigIDs with their inIndex in brackets for cutplanes :
Cutplane neig
Here are the neigIDs with their inIndex in brackets for cameras :
Perspective camera neig
Here are the neigIDs with their inIndex in brackets for virtual symbols :
Virtual symbol neig
Here are the neigIDs with their inIndex in brackets for pictures :
Picture neig
Here are the neigIDs with their inIndex in brackets for camera sets :
Camera set neig
Here are the neigIDs with their inIndex in brackets for beams :
Beam neig
Here are the neigIDs with their inIndex in brackets for drawings :
Drawing neig
Enumerator
APINeig_None 

No neig. Can be a return value e.g. in the APIIo_GetPointID functions.

APINeig_Wall 

Wall end points (see picture above).

APINeig_WallPl 

Wall corrected connection point (see picture above).

APINeig_WallOn 

Wall reference line (see picture above).

APINeig_WallPlOn 

Wall nonreference line (see picture above).

APINeig_Colu 

Column origo and corners (see picture above).

APINeig_Beam 

Beam points (see picture above).

APINeig_BeamOn 

Beam segments (see picture above).

APINeig_BeamHole 

Beam's hole points (see picture above).

APINeig_Wind 

Hotspots in the window object (see picture above).

APINeig_WindHole 

Corners of window hole (see picture above).

APINeig_Door 

Hotspots in the door object (see picture above).

APINeig_DoorHole 

Corners of door hole (see picture above).

APINeig_Symb 

Hotspots in the general object (see picture above). The inIndices are counted the way they were defined in the library part.

APINeig_Light 

Hotspots in the light object (see picture above).

APINeig_Ceil 

Vertices of the slab (see picture above). The inIndices are counted in the creation order starting from 1, i.e. the point the user first clicked will have inIndex 1. Later they can be taken from the vertexIDs.

APINeig_CeilOn 

Edges of the slab (see picture above). The inIndices are counted in the creation order (the edge between corners 1 and 2 will have the inIndex 1, etc.); later they can be taken from the vertexIDs.

APINeig_Roof 

Vertices of the roof polygon (see picture above). The inIndices are counted in the creation order starting from 1, i.e. the point the user first clicked will have inIndex 1. Later they can be taken from the vertexIDs.

APINeig_RoofOn 

Edges of the roof polygon (see picture above). The inIndices are counted in the creation order (the edge between corners 1 and 2 will have the inIndex 1, etc.); later they can be taken from the vertexIDs.

APINeig_RBL 

Roof reference line points (see picture above).

APINeig_RBLOn 

Roof reference line itself.

APINeig_Mesh 

Vertices of the mesh (see picture above). The inIndices are counted in the creation order, starting from 1, i.e. the point the user first clicked will have inIndex 1. Later they can be taken from the vertexIDs.

APINeig_MeshOn 

Edges of the mesh (see picture above). The inIndices are counted in the creation order (the edge between corners 1 and 2 will have the inIndex 1, etc.); later they can be taken from the vertexIDs.

APINeig_MeshRidge 

Vertices of the mesh ridges (see picture above). The inIndices are counted in the creation order starting from 0 (!); the first ridge point the user clicked will have inIndex 0, etc. Later they can be taken from the vertexIDs.

APINeig_MeshRidgeOn 

Edges of the mesh ridges (see picture above). The inIndices are counted in the creation order starting from 0 (!); the edge between ridge points 0 and 1 will have inIndex 1, etc. Later they can be taken from the vertexIDs.

APINeig_DimInt 

Dimension segment (interval) as in old dimension.

APINeig_DimPt 

Dimensioning point in the dimension chain (see picture above).

APINeig_DimOn 

Dimension line (see picture above).

APINeig_RadDim 

Radial dimension's location (see picture above).

APINeig_LevDim 

Level dimension marker's center point (see picture above).

APINeig_AngDim 

Angle dimension point (see picture above).

APINeig_AngDimOn 

Angle dimension arc (see picture above).

APINeig_Word 

Multiline text corners (see picture above).

APINeig_Label 

Label points (see picture above).

APINeig_Room 

Room corners (see picture above). The inIndices are counted in the creation order starting from 1, i.e. the point the user first clicked will have inIndex 1. Later they can be taken from the vertexIDs.

APINeig_RoomStamp 

Room stamp hotspots (see picture above). The inIndices are counted in the order the hotspots are defined in the zone category library part.

APINeig_RoomOn 

Room side lines (see picture above). The inIndices are counted in the creation order (the edge between corners 1 and 2 will have the inIndex 1, etc.); later they can be taken from the vertexIDs.

APINeig_RoomRefPt 

Room reference point (see picture above).

APINeig_Hatch 

Vertices of the hatch (see picture above). The inIndices are counted in the creation order starting from 1, i.e. the point the user first clicked will have inIndex 1. Later they can be taken from the vertexIDs.

APINeig_HatchOn 

Edges of the hatch (see picture above). The inIndices are counted in the creation order (the edge between corners 1 and 2 will have the inIndex 1, etc.); later they can be taken from the vertexIDs.

APINeig_Line 

Line end / middle points (see picture above).

APINeig_LineOn 

The line itself (see picture above).

APINeig_PolyLine 

The vertices of the polyline.

APINeig_PolyLineOn 

The edges of the polyLine.

APINeig_Arc 

Arc endpoints and center (see picture above).

APINeig_ArcOn 

The arc itself (see picture above).

APINeig_Circ 

Diagonals and center of circle (see picture above).

APINeig_CircOn 

The circle itself (see picture above).

APINeig_Spline 

Spline corners (see picture above).

APINeig_SplineOn 

Spline segments (see picture above).

APINeig_Hot 

The hotspot itself (see picture above).

APINeig_CutPlane 

CutPlane points (see picture above).

APINeig_CutPlOn 

CutPlane segments (see picture above).

APINeig_Camera 

Camera points (see picture above).

APINeig_CamSet 

Camera set points (see picture above).

APINeig_VirtSy 

Virtual symbol hotspots (see picture above), in section/elevation windows.

APINeig_VirtSyOn 

Virtual symbol lines (see picture above), in section/elevation windows.

APINeig_PictObj 

Corners and center of pasted pictures (see picture above).

APINeig_Detail 

Detail points.

APINeig_DetailPoly 

Detail points.

APINeig_DetailPolyOn 

Detail points.

APINeig_DetailMarker 

Detail points.

APINeig_Symb3D 

3D Hotspots in the general object.

APINeig_Light3D 

3D Hotspots in the light object.

APINeig_Wind3D 

3D Hotspots in the window object.

APINeig_Door3D 

3D Hotspots in the door object.

APINeig_WindMark 

Window marker points.

APINeig_DoorMark 

Door marker points.

APINeig_CutPlMarker 

Section marker points.

APINeig_WallPlClOff 

Wall corner point when Clean Wall Intersections switch is off.

APINeig_WallPlOnClOff 

Wall non-reference line when Clean Wall Intersections switch is off.

APINeig_SymbOn 

Line status in the general object.

APINeig_WindOn 

Line status in the window object.

APINeig_DoorOn 

Line status in the door object.

APINeig_LightOn 

Line status in the light object.

APINeig_Note 

Note text hotspot.

APINeig_SplineDir 

Endpoint of spline direction handle (see picture above).

APINeig_DrawingCenter 

Center point of a drawing element (see picture above).

APINeig_DrawingFrame 

Corner point of the frame of a drawing element (see picture above).

APINeig_DrawingFrameOn 

Frame edge of a drawing element (see picture above).

APINeig_DrawingIDF 

Point status of the drawing content inside of a drawing element (see picture above).

APINeig_DrawingIDFOn 

Line status of the drawing content inside of a drawing element (see picture above).

APINeig_DrawingTitle 

Point status of a drawing title element (see picture above).

APINeig_DrawingTitleOn 

Line status of a drawing title element (see picture above).

APINeig_Worksheet 

Worksheet points.

APINeig_WorksheetPoly 

Worksheet polygon points.

APINeig_WorksheetPolyOn 

Worksheet polygon line segments.

APINeig_WorksheetMarker 

Worksheet marker points.

APINeig_Elevation 

Elevation points.

APINeig_ElevationOn 

Elevation line segments.

APINeig_ElevationMarker 

Elevation marker points.

APINeig_InteriorElevation 

Interior elevation points.

APINeig_InteriorElevationOn 

Interior elevation line segments.

APINeig_InteriorElevationMarker 

Interior elevation marker points.

APINeig_SectionSegment 

Section segment points (for cut plane, elevation, and interior elevation).

APINeig_SectionSegmentOn 

Section segment line segments (for cut plane, elevation, and interior elevation).

APINeig_SectionSegmentMarker 

Section segment marker points (for cut plane, elevation, and interior elevation).

APINeig_CurtainWall 

Curtain wall end points.

APINeig_CurtainWallOn 

Curtain wall reference line.

APINeig_CurtainWallCut 

Curtain wall's cutaway frames and panels points.

APINeig_CurtainWallCutOn 

Curtain wall's cutaway frames and panels lines.

APINeig_CWSegment 

Curtain wall segment end points.

APINeig_CWSegmentOn 

Curtain wall segment reference line.

APINeig_CWSegmentBaseLine 

Curtain wall segment base reference line.

APINeig_CWSegmentBaseLineOn 

Curtain wall segment base reference line end points.

APINeig_CWFrame 

Vertexes of curtain wall frame.

APINeig_CWFrameOn 

Edges of curtain wall frame.

APINeig_CWFrame3D 

3D hotspots of curtain wall frame.

APINeig_CWPanel 

Vertexes of curtain wall panel.

APINeig_CWPanel3D 

3D hotspots in the curtain wall panel.

APINeig_CWJunction 

Vertexes of curtain wall junction.

APINeig_CWJunction3D 

3D hotspots of curtain wall junction.

APINeig_CWAccessory 

Vertexes of curtain wall accessory.

APINeig_CWAccessory3D 

3D hotspots in the curtain wall accessory.

APINeig_Shell 

Vertices of the shell polygon.

APINeig_ShellOn 

Edges of the shell polygon.

APINeig_Skylight 

Hotspots of the skylight object.

APINeig_SkylightHole 

Corners of skylight hole.

APINeig_Skylight3D 

3D hotspots of the skylight object.

APINeig_SkylightOn3D 

3D edges of the skylight object.

APINeig_SkylightOn 

Line status of the skylight object.

APINeig_SkylightMark 

Skylight marker points.

APINeig_Morph 

Vertices of the morph.

APINeig_MorphOn 

Edges of the morph.

APINeig_ChangeMarker 

ChangeMarker points.

APINeig_ChangeMarkerPoly 

ChangeMarker polygon points.

APINeig_ChangeMarkerPolyOn 

ChangeMarker polygon line segments.

APINeig_ChangeMarkerMarker 

ChangeMarker marker points.

APINeig_ColuOn 

Area of the Column on Floor Plan (except Hotspots).

APINeig_WordOn 

Area of Text (except Hotspots).

APINeig_CurtainWallBaseLine 

Hotspots on a Curtain Wall's Reference Line.

APINeig_CurtainWallBaseLineOn 

Curtain Wall's Reference Line (except Hotspots).

APINeig_StairOn 

Neig Stair On

APINeig_Tread 

Neig Tread

APINeig_TreadOn 

Neig Tread On

APINeig_Riser 

Neig Riser

APINeig_RiserOn 

Neig Riser On

APINeig_Stair 

Neig Stair

APINeig_StairStructure 

Neig Stair Structure

APINeig_StairStructureOn 

Neig Stair Structure On

APINeig_Railing 

Neig Railing

APINeig_RailingOn 

Neig Railing On

APINeig_RailingToprail 

Neig Railing Toprail

APINeig_RailingToprailOn 

Neig Railing Toprail On

APINeig_RailingHandrail 

Neig Railing Handrail

APINeig_RailingHandrailOn 

Neig Railing HandrailOn

APINeig_RailingRail 

Neig Railing Rail

APINeig_RailingRailOn 

Neig Railing Rail On

APINeig_RailingPost 

Neig Railing Post

APINeig_RailingPostOn 

Neig Railing Post On

APINeig_RailingInnerPost 

Neig Railing Inner Post

APINeig_RailingInnerPostOn 

Neig Railing Inner Post On

APINeig_RailingBaluster 

Neig Railing Baluster

APINeig_RailingBalusterOn 

Neig Railing Baluster On

APINeig_RailingPanel 

Neig Railing Panel

APINeig_RailingPanelOn 

Neig Railing Panel On

APINeig_RailingToprailEnd 

Neig Railing Toprail End

APINeig_RailingToprailEndOn 

Neig Railing Toprail End On

APINeig_RailingHandrailEnd 

Neig Railing Handrail End

APINeig_RailingHandrailEndOn 

Neig Railing Handrail End On

APINeig_RailingRailEnd 

Neig Railing Rail End

APINeig_RailingRailEndOn 

Neig Railing Rail End On

APINeig_RailingToprailConnection 

Neig Railing Toprail Connection

APINeig_RailingToprailConnectionOn 

Neig Railing Toprail Connection On

APINeig_RailingHandrailConnection 

Neig Railing Handrail Connection

APINeig_RailingHandrailConnectionOn 

Neig Railing Handrail Connection On

APINeig_RailingRailConnection 

Neig Railing Rail Connection

APINeig_RailingRailConnectionOn 

Neig Railing Rail Connection On

APINeig_RailingEndFinish 

Neig Railing End Finish

APINeig_RailingEndFinishOn 

Neig Railing End Finish On

APINeig_BeamSegment 

Neig Beam Segment

APINeig_BeamSegmentOn 

Neig Beam Segment On

APINeig_ColumnSegment 

Neig Column Segment

APINeig_ColumnSegmentOn 

Neig Column Segment On

APINeig_Opening 

Neig Opening

APINeig_OpeningOn 

Neig Opening On

◆ API_NoteContentType

Describes the type of the content.

Remarks
API_NoteContent_Auto has been removed in API 14.
Enumerator
API_NoteContent_Measured 

Measured value content

API_NoteContent_Custom 

Custom text content

◆ API_NumberingTypeValues

Numbering method options of a drawing element.

Remarks
The options correspond to the different values in the Drawing ID popup on the Identification tabpage of the Drawing Settings dialog.
Enumerator
APINumbering_ByLayout 

The drawing's ID is coming from the layout it is placed on.

APINumbering_ByViewId 

The drawing's ID is coming from the owning view.

APINumbering_CustomNum 

The drawing's ID is defined by the user.

◆ API_PatternAlignID

Pattern origin position.

Enumerator
APIPA_StartWithPattern 

Start with pattern.

APIPA_StartFromCenter 

Start from center.

APIPA_CenterAligned 

Aligned to center.

APIPA_EndWithPattern 

End with pattern.

◆ API_PenTableUsageModeValues

Specifies which pen table a drawing element uses.

Enumerator
APIPenTableUsageMode_UseOwnPenTable 

Use the drawing element's own pen table; i.e. the colors stored in the drawing data itself.

APIPenTableUsageMode_UseModelPenTable 

Use the pen table of the model space; this value is valid only for the drawing element default.

APIPenTableUsageMode_UsePenTableIndex 

Use the pen table defined by the penTableIndex field in API_DrawingType

◆ API_PictureFormat

Storage format of a picture.

Remarks
This enum is used when you convert a picture from a given format to another with the ACAPI_Conversion_ConvertPicture goody function. API_PictureFormat is also a part of the API_PictureType structure. You might also use MIME types for identifying the standard image formats instead of API_PictureFormat. See the ACAPI_Conversion_ConvertMimePicture goody function.
Enumerator
APIPictForm_Default 

Default format

APIPictForm_Bitmap 

Bitmap file storage format

APIPictForm_GIF 

GIF file storage format

APIPictForm_TIFF 

TIFF file storage format

APIPictForm_JPEG 

JPEG file storage format

APIPictForm_PNG 

PNG file storage format

◆ API_PolyRoofSegmentAngleTypeID

Type of the segment of Multi-plane Roofs.

Enumerator
APIPolyRoof_SegmentAngleTypeSloped 

Defines a normal segment of Multi-plane Roofs.

APIPolyRoof_SegmentAngleTypeGable 

Defines a Gable.

◆ API_RailBaseBaseConnectionID

Connection type between two Rail bases.

Enumerator
APIBB_Horizontal 

Connection type is horizontal.

APIBB_Tangential 

Connection type is tangential.

◆ API_RailConnectionTypeID

Connection type.

Enumerator
APICT_NoRailConnection 

Disconnected.

APICT_GooseneckRailConnection 

Gooseneck connection.

APICT_DirectRailConnection 

Direct connection.

◆ API_RailEndArcAngleModeID

Angle mode of the Rail End's arc.

Enumerator
APIAM_SetToVertical 

The angle is absolute vertical.

APIAM_CustomAngle 

The angle is relative to the first extrusion.

◆ API_RailEndBaseConnectionID

Connection type between the Rail End and a base.

Enumerator
APIBC_Horizontal 

Connection type is horizontal.

APIBC_Tangential 

Connection type is tangential.

◆ API_RailEndExtrusionModeID

Mode of the second extrusion.

Enumerator
APIEM_CustomLength 

The length is custom.

APIEM_ToReferenceLine 

The length of the extrusion will be set so that it will reach the reference line.

APIEM_ToHandrailSibling 

In case of a handrail the length will be set so that it will reach the other handrail. If this is set for one of the handrails, then the other handrail's secondExtrusionMode will be automatically set to APIEM_ToHandrailSibling, too.

◆ API_RailEndFixtureConnectionID

The type of the curving in case of Curved type.

Enumerator
APIRC_SegmentPlane 

The curving is in the plane of the segment.

APIRC_HorizontalRight 

The curving is horizontal to the right.

APIRC_HorizontalLeft 

The curving is horizontal to the left.

◆ API_RailEndTypeID

The type of the Rail End.

Enumerator
APIRE_Extension 

The type is extension.

APIRE_Curve 

The type is curved.

APIRE_FullReturn 

The type is full return.

APIRE_ConnectWithDuplicate 

The type is connection between duplicated handrails.

◆ API_RailingRefLineLocationID

The location of the segment's reference line.

Enumerator
APIRLL_Left 

Reference line is on the left

APIRLL_Center 

Reference line is at the centre

APIRLL_Right 

Reference line is on the right

◆ API_ReferringLevel

This enum determines the referred type.

Enumerator
NotReferred 

Not referred

ReferredToViewPoint 

Referred to view point

ReferredToView 

Referred to view

ReferredToDrawing 

Referred to drawing

◆ API_RiserCrossSectID

Riser cross section type.

Enumerator
APIRCS_Simple 

Simple, straight risers

APIRCS_Slanted 

Slanted risers.

◆ API_RiserPositionID

Riser position.

Enumerator
APIRP_OnTread 

Risers are placed on top of the treads.

APIRP_BehindTread 

Risers are behind the treads.

◆ API_RoofClassID

Roof type identifier.

Enumerator
API_PlaneRoofID 

Single-plane roof, use the API_PlaneRoofData member of the union

API_PolyRoofID 

Multi-plane roof, use the API_PolyRoofData member of the union

◆ API_RoofEdgeTypeID

Determines the type of the roof edges. This type is used just for listing purposes. It can be set individualy for each edge of the roof, the default value is Undefined.

Enumerator
APIRoofEdgeType_Undefined 

The roof edge type is not set (default value).

APIRoofEdgeType_Ridge 

The roof edge type is Ridge.

APIRoofEdgeType_Valley 

The roof edge type is Valley.

APIRoofEdgeType_Gable 

The roof edge type is Gable.

APIRoofEdgeType_Hip 

The roof edge type is Hip.

APIRoofEdgeType_Eaves 

The roof edge type is Eaves.

APIRoofEdgeType_Peak 

The roof edge type is Peak.

APIRoofEdgeType_SideWall 

The roof edge type is Side Wall.

APIRoofEdgeType_EndWall 

The roof edge type is End Wall.

APIRoofEdgeType_RTDome 

The roof edge type is Roof Transition - Dome.

APIRoofEdgeType_RTHollow 

The roof edge type is Roof Transition - Hollow.

◆ API_RoofOverHangTypeID

Type of the eaves overhang of Multi-plane Roofs.

Enumerator
API_OffsetOverhang 

Uniform offset for the Eaves all along the Pivot Polygon of the Roof.

API_ManualOverhang 

Defines the full contour of the Eaves manually.

◆ API_SegmentHorizontalRange

Horizontal range of the segment.

Enumerator
APIHorRange_Infinite 

No limit on horizontal range.

APIHorRange_Limited 

Limit the horizontal range.

APIHorRange_ZeroDepth 

The depth of the section or elevation is 0.

◆ API_SegmentVerticalRange

Vertical range of the segment.

Enumerator
APIVerRange_Infinite 

No limit on vertical range.

APIVerRange_Limited 

Limit the vertical range; the limits are in vertMin and vertMax

APIVerRange_FitToZoneRange 

If a zone is present, then use the top and bottom level of the zone as a limit (for interior elevations only).

◆ API_ShellBaseContourEdgeTypeID

Determines the type of the shell contour edge.

Enumerator
APIShellBaseContour_Undefined 

The shell contour edge type is not set (default value).

APIShellBaseContour_Ridge 

The shell contour edge type is Ridge.

APIShellBaseContour_Valley 

The shell contour edge type is Valley.

APIShellBaseContour_Gable 

The shell contour edge type is Gable.

APIShellBaseContour_Hip 

The shell contour edge type is Hip.

APIShellBaseContour_Eaves 

The shell contour edge type is Eaves.

APIShellBaseContour_Peak 

The shell contour edge type is Peak.

APIShellBaseContour_SideWall 

The shell contour edge type is Side Wall.

APIShellBaseContour_EndWall 

The shell contour edge type is End Wall.

APIShellBaseContour_RTDome 

The shell contour edge type is Roof Transition - Dome.

APIShellBaseContour_RTHollow 

The shell contour edge type is Roof Transition - Hollow.

◆ API_ShellBaseCutBodyTypeID

These values affect the connection type of Roof and Shell elements (see on the Model tab page of the Roof/Shell Settings dialog).

Remarks
This enumeration type is used in the API_ShellBaseType structure.
Enumerator
APIShellBaseCutBody_Editable 

Extend roof/shell body for connections: Editable

APIShellBaseCutBody_ContoursDown 

Extend roof body for connections: Contours down

APIShellBaseCutBody_PivotLinesDown 

Extend roof body for connections: Pivot Lines down

APIShellBaseCutBody_UpwardsExtrusion 

Extend shell body for connections: Upwards extrusion

APIShellBaseCutBody_DownwardsExtrusion 

Extend shell body for connections: Downwards extrusion

◆ API_ShellBaseSegmentTypeID

Arc decomposition method for polyroof pivot edges or revolved shells. An N integral number tells how many segments to generate and this enum determines how to use the number N.

Enumerator
APIShellBase_SegmentsByCircle 

Cut a whole circle to N segments and use as many as necessary to cover the arc.

APIShellBase_SegmentsByArc 

Cut the arc itself into N straight segments.

◆ API_ShellClassID

Shell class identifier.

Enumerator
API_ExtrudedShellID 

Extruded shell type, use the API_ExtrudedShellData member of the union

API_RevolvedShellID 

Revolved shell type, use the API_RevolvedShellData member of the union

API_RuledShellID 

Ruled shell type, use the API_RuledShellData member of the union

◆ API_SkylightAnchorID

Anchor point of the Skylight object.

Enumerator
APISkylightAnchor_BC 

The skylight is anchored by the bottom center position (default).

APISkylightAnchor_BL 

The skylight is anchored by the bottom left corner point.

APISkylightAnchor_BR 

The skylight is anchored by the bottom right corner point.

APISkylightAnchor_TC 

The skylight is anchored by the top center position.

APISkylightAnchor_TL 

The skylight is anchored by the top left corner point.

APISkylightAnchor_TR 

The skylight is anchored by the top right corner point.

◆ API_SkylightFixModeID

Skylight constrain in the Roof element.

Enumerator
APISkylightFixMode_Horizontal 

Keep the horizontal distance from the pivot line unchanged.

APISkylightFixMode_Vertical 

Keep the anchor level of the skylight unchanged.

◆ API_SlabReferencePlaneLocationID

Location of slab's reference plane.

Remarks
The API_SlabReferencePlaneLocationID enum is used in the API_SlabType structure. The following picture illustrates the different values:
Slab reference line
For a basic (homogenous) slab the possible values are APISlabRefPlane_Top or APISlabRefPlane_Bottom. For composite slabs all values are valid. It determines the reference position: so during input the level member in API_SlabType will refer to this position. The new offsetFromTop [output only] member tells you the distance of the reference position (level) from the top of the slab.
Enumerator
APISlabRefPlane_Top 

Reference plane is the top plane of the slab.

APISlabRefPlane_CoreTop 

Location of reference plane is the top of the core skin in case of composit slab.

APISlabRefPlane_CoreBottom 

Location of reference plane is the top of the core skin in case of composit slab.

APISlabRefPlane_Bottom 

Reference plane is the bottom plane of the slab.

◆ API_SolidOperationID

The type of the solid operation link between two construction elements.

Remarks
These enumerators are used with the ACAPI_Element_SolidLink_Create, ACAPI_Element_SolidLink_GetOperation and ACAPI_Element_SolidOperation_Create functions.
Enumerator
APISolid_Substract 

Substraction

APISolid_SubstUp 

Substraction with upwards extrusion

APISolid_SubstDown 

Substraction with downwards extrusion

APISolid_Intersect 

Intersection

APISolid_Add 

Addition

◆ API_StairDirectionID

The walking direction of the Stair element.

Enumerator
APISD_Upward 

Default walking direction (upwards).

APISD_Inverse 

Inverse walking direction (downwards).

◆ API_StairDisplayTypeID

Display type of the Stair.

Enumerator
APIStairDisplay_Custom 

Custom display.

APIStairDisplay_ByModelViewOptions 

Display by Model View Options.

◆ API_StairDLWinderNumTypeID

Describes the mode for deciding the amount of winders in a divided landing.

Enumerator
APIDWN_Max 

Division method will be Maximum Number of Goings.

APIDWN_Optimal 

Division method will be Optimum Going Width.

APIDWN_Fix 

Division method will be Fixed Number of Goings.

APIDWN_Uniform 

Division method will be Uniform Going Width.

◆ API_StairDrainSideID

Data about the Stair Structure's drainings.

Enumerator
APIDS_Left 

Draining on the left side.

APIDS_Right 

Draining on the right side.

◆ API_StairDrainSurfaceTypeID

Surface type of the draining.

Enumerator
APIST_Stepped 

Stepped structure draining.

APIST_Smooth 

Smooth structure draining.

◆ API_StairGridTypeID

Layout above relevant stories.

Enumerator
APIStairGrid_NotRelevant 

Not Relevant.

APIStairGrid_WithSingleBreaklineFull 

With Break Mark: Visible - Hidden

APIStairGrid_NoBreaklineFull 

No Break Mark: Visible

APIStairGrid_BelowBreakline 

Below Break Mark: Visible

APIStairGrid_AboveBreakline 

Above Break Mark: Visible

APIStairGrid_MiddleBreakline 

Multistory 2D: Visible Inbetween Break Marks

APIStairGrid_MiddleBreaklineFull 

Multistory 2D: Hidden - Visible - Hidden

APIStairGrid_NoBreakMarkHidden 

No Break Mark: Hidden

APIStairGrid_AboveBreakMarkHidden 

Above Break Mark: Hidden

APIStairGrid_BelowBreakMarkHidden 

Below Break Mark: Hidden

APIStairGrid_Multistory2DAllVisible 

Multistory 2D: All Visible

APIStairGrid_Multistory2DHiddenVisible 

Multistory 2D: Hidden - Visible - None

APIStairGrid_Multistory2DNoneVisibleHidden 

Multistory 2D: None - Visible - Hidden

APIStairGrid_WithBreakMarkAllVisible 

With Break Mark: All Visible

APIStairGrid_WithBreakMarkHiddenVisible 

With Break Mark: Hidden - Visible

◆ API_StairInnerWidthOffsetTypeID

The type of the Riser Offsets from Corner.

Enumerator
APIIWO_Min 

Minimum Riser Offset.

APIIWO_Fix 

Fixed Riser Offset.

◆ API_StairNumberingID

Type of numbering for each step of the Stair element.

Enumerator
APISN_Treads 

Numbering on treads.

APISN_Risers 

Numbering on risers.

◆ API_StairPartRoleID

Represents the role of a stair subelement.

Enumerator
APISR_Run 

The role is Run.

APISR_Landing 

The role is landing.

◆ API_StairPolyGeometryTypeID

Determines the type of a Stair boundary edge or vertex.

Enumerator
APISG_Vertex 

The described polyline section is a vertex.

APISG_Edge 

The described polyline section is an edge.

APISG_Surface 

The described polyline section is a surface.

◆ API_StairPolyTypeID

Determines the type of a Stair boundary edge or vertex.

Enumerator
APISP_Undefined 

The type is undefined.

APISP_BaseLine 

The type is baseline.

APISP_LeftBoundary 

The type is left boundary.

APISP_RightBoundary 

The type is right boundary.

APISP_Tread 

The type is tread.

APISP_Riser 

The type is riser.

APISP_WalkingLine 

The type is walking line.

APISP_FloorPlanSymb 

The type is floor plan symb.

APISP_BreakMark 

The type is break mark.

APISP_DummyTreadLeading 

The type is dummy tread leading.

APISP_DummyTreadTrailing 

The type is dummy tread trailing.

◆ API_StairSegmentTypeID

Type of the segment described by this edge.

Enumerator
APIST_StepsSegment 

Step segment.

APIST_LandingSegment 

Landing segment.

APIST_DividedLandingSegment 

Divided landing segment.

◆ API_StairStoryVisibilityID

Settings of stair visibility across stories.

Enumerator
APISSV_HomeStoryOnly 

The stair is visible in the home story.

APISSV_HomeAndOneStoryUp 

The stair is visible in the home story and one story up.

APISSV_HomeAndOneStoryDown 

The stair is visible in the home story and one story down.

APISSV_HomeAndOneStoryUpAndDown 

The stair is visible in the home story and one story up and down.

APISSV_OneStoryUp 

The stair is visible one story up.

APISSV_OneStoryDown 

The stair is visible one story down.

APISSV_AllStories 

The stair is visible in all stories.

APISSV_AllRelevantStories 

The stair is visible in all relevant stories.

APISSV_AllRelevantAndOneStoryUp 

The stair is visible in all relevant stories and one story up.

APISSV_AllRelevantAndOneStoryDown 

The stair is visible in all relevant stories and one story down.

◆ API_StairStructBottomTypeID

The type of the stair structure bottom.

Enumerator
APISB_Stepped 

The stair structure is stepped along with the steps.

APISB_Flat 

The stair structure is flattened under the steps.

APISB_Smooth 

The stair structure is monolithic.

◆ API_StairStructHeightMeasureID

The way of measuring of height above treads.

Enumerator
APIHM_Perpendicular 

Perpendicular calculation.

APIHM_Vertical 

Straight vertical calculation.

◆ API_StairStructSymbPartID

The type of the stair structure symbol part.

Enumerator
APISP_Visible 

Visible.

APISP_Hidden 

Hidden.

◆ API_StairStructSymbRelevantStoriesID

The type of the stair structure symbol relevant stories.

Enumerator
APISCV_ALL_STORIES 

All stories.

APISCV_BELOW_RELEVANT 

Below relevant

APISCV_BOTTOM_RELEVANT 

Bottom relevant

APISCV_MID_RELEVANT 

Middle relevant

APISCV_TOP_RELEVANT 

Top relevant

APISCV_ABOVE_RELEVANT 

Above relevant

◆ API_StairStructSymbTypeID

The type of the stair structure symbol.

Enumerator
APIST_UnderStructure 

Understructure.

APIST_Stringer 

Stringer.

◆ API_StairStructSymbViewID

The type of the stair structure symbol view.

Enumerator
APISV_FloorPlan 

Floor plan.

APISV_CeilingPlan 

Ceiling plan.

◆ API_StairStructSymbVisibilityID

The type of the stair structure symbol visibility.

Enumerator
APISV_Beam 

Beam.

APISV_Cantilevered 

Cantilevered.

APISV_Stringer 

Stringer.

APISV_Monolith 

Monolith.

◆ API_StairStructureSideID

Supported side of the Stair.

Enumerator
APISS_LeftSide 

The stair structure supports the step from the left side.

APISS_RightSide 

The stair structure supports the step from the right side.

APISS_UnderSide 

The stair structure supports the step from under.

◆ API_StairStructureTypeID

The type of the stair structure.

Enumerator
APIST_Side 

The Stair is supported at its sides.

APIST_Monolith 

The Stair has a solid block under it.

APIST_BeamSupport 

The Stair is supported by beams.

APIST_CantileveredSupport 

The Stair is supported at only one side.

◆ API_StairTreadNosingTypeID

Type of the Tread nosing.

Enumerator
APITN_ByValue 

The Tread nosing is given a length value.

APITN_BySlanting 

The Tread nosing is given a slanting value.

◆ API_StairTurnTypeID

The type of the turn.

Enumerator
APIST_NoTurn 

No turn.

APIST_LandingTurn 

Type is landing turn.

APIST_WinderTurn 

Type is winder turn.

APIST_DividedLandingTurn 

Type is divided landing turn.

◆ API_StairWalkLineSymbPosID

Position of the walking line symbol.

Enumerator
APISP_Auto 

Automatic positioning.

APISP_Center 

Centered positioning.

APISP_Custom 

Custom positioning.

◆ API_StairWinderID

The type of the Winder.

Enumerator
APIWT_DINTurn 

Auxiliary Walking Line

APIWT_NZETurn 

Two Points

APIWT_SIPTurn 

Single Point

APIWT_AGNTurn 

Principal Lines

◆ API_StairWinderNumTypeID

The type of the Number of Winders.

Enumerator
APIWN_Min 

Minimum Number of Winders.

APIWN_Fix 

Fixed Number of Winders.

◆ API_StoryHandleAppearance

Options for displaying story lines on the Section/Elevation.

Enumerator
APICutPl_SHANone 

Story lines are not displayed on the Section/Elevation

APICutPl_SHADisplayOnly 

Story lines appear only on-screen, but are not displayed on the printed output

APICutPl_SHAAll 

Story lines appear both on screen and on the printed output

◆ API_StructureDisplay

This is the enumeration of the Partial Structure Display.

Remarks
You are able to get and change the Partial Structure Display via ACAPI_Navigator_GetStructureDisplay and ACAPI_Navigator_ChangeStructureDisplay functions. This function allows you to display and output composite and complex elements in simplified form.
Enumerator
API_EntireStructure 

This is the default setting.

API_CoreOnly 

Only those structures defined as "Core" will be displayed.

API_WithoutFinishes 

The entire structure, except for skins/components defined as "Finish", is displayed.

API_StructureOnly 

Non-Structural element will not be displayed.

◆ API_SubElementType

enum API_SubElementType : UInt64

Describes the filter for the different subtypes of elements.

Since
Archicad 26
Remarks
This enumeration was renamed in Archicad 25, the previous name was API_SubElemMemoMaskType.
Enumerator
APISubElement_MainMarker 

Filter for Main Marker.

APISubElement_SHMarker 

Filter for Story Handle Marker.

APISubElement_CommonMarker 

Filter for Common Marker.

APISubElement_CWFrameClass 

Filter for Curtain Wall Frame.

APISubElement_CWPanelClass 

Filter for Curtain Wall Panel.

APISubElement_CWJunction 

Filter for Curtain Wall Junction.

APISubElement_CWAccessory 

Filter for Curtain Wall Accessory.

APISubElement_StairRiser 

Filter for Stair Riser.

APISubElement_StairTread 

Filter for Stair Tread.

APISubElement_StairStructure 

Filter for Stair Structure.

APISubElement_StairFPDMarker 

Filter for Stair Floor Plan Display Marker.

APISubElement_StairRCPDMarker 

Filter for Stair Reflected Ceiling Plan Display Marker.

APISubElement_RailingNode 

Filter for Railing Node.

APISubElement_RailingSegment 

Filter for Railing Segment.

APISubElement_RailingPost 

Filter for Railing Post.

APISubElement_RailingInnerPost 

Filter for Railing Inner Post.

APISubElement_RailingRail 

Filter for Railing Rail.

APISubElement_RailingHandrail 

Filter for Railing Handrail.

APISubElement_RailingToprail 

Filter for Railing Toprail.

APISubElement_RailingPanel 

Filter for Railing Panel.

APISubElement_RailingBaluster 

Filter for Railing Baluster.

APISubElement_RailingPattern 

Filter for Railing Pattern.

APISubElement_RailingBalusterSet 

Filter for Railing Baluster Set.

APISubElement_RailingRailEnd 

Filter for Railing Rail End.

APISubElement_RailingHandrailEnd 

Filter for Railing Handrail End.

APISubElement_RailingToprailEnd 

Filter for Railing Toprail End.

APISubElement_RailingRailConnection 

Filter for Railing Rail Connection.

APISubElement_RailingHandrailConnection 

Filter for Railing Handrail Connection.

APISubElement_RailingToprailConnection 

Filter for Railing Toprail Connection.

APISubElement_RailingFinish 

Filter for Railing Finish.

APISubElement_CWTag 

Filter for Curtain Wall Tag.

APISubElement_NoElem 

Filter for No Elem.

APISubElement_NoParams 

Filter for No Params.

◆ API_SubElemFlagType

enum API_SubElemFlagType : UInt32

Subelement Flags (Stair).

Enumerator
APISubElemFlag_Run 

stair subelement role: run

APISubElemFlag_Landing 

stair subelement role: landing

APISubElemFlag_LeftSide 

stair structure side: right

APISubElemFlag_RightSide 

stair structure side: left

APISubElemFlag_UnderSide 

stair structure side: under

APISubElemFlag_GridMarker 

stair marker type: grid

APISubElemFlag_BreakMarkMarker 

stair marker type: breakmark

APISubElemFlag_WalkingLineMarker 

stair marker type: walking line

APISubElemFlag_NumberingMarker 

stair marker type: numbering

APISubElemFlag_UpDownTextMarker 

stair marker type: up/down text

APISubElemFlag_DescriptionMarker 

stair marker type: description

APISubElemFlag_DefaultDefault 

railing subelement: default default

◆ API_TabID

enum API_TabID

Types of the tab.

Remarks
This enum is used in API_TabType structure. The only available value is APITab_Left because the other options are not implemented yet.
Enumerator
APITab_Left 

Tab Left

APITab_Center 

Tab Center

APITab_Right 

Tab Right

APITab_Decimalpoint 

Tab Decimal Point

◆ API_TextFrameShapeTypeID

Text frame shape identifiers.

Enumerator
API_TextFrameShapeType_Rectangle 

Text shape is a Rectangle

API_TextFrameShapeType_Circle 

Text shape is a Circle

API_TextFrameShapeType_RoundedRectangle 

Text shape is a Rounded Rectangle

API_TextFrameShapeType_Pill 

Text shape is a Pill

API_TextFrameShapeType_Diamond 

Text shape is a Diamond

API_TextFrameShapeType_Pointed_Rectangle90 

Text shape is a Pointed Rectangle 90

API_TextFrameShapeType_Pointed_Rectangle120 

Text shape is a Pointed Rectangle 120

API_TextFrameShapeType_Hexagon 

Text shape is a Hexagon

API_TextFrameShapeType_Hexagon_Rotated 

Text shape is a Hexagon Rotated

◆ API_TextPosID

Describes the various options for dimension text positioning.

Enumerator
APIPos_Above 

Place text above the dimension line.

APIPos_In 

Place text in the dimension line.

APIPos_Below 

Place text below the dimension line.

◆ API_TextureProjectionTypeID

Determines the type of the texture projection.

Enumerator
APITextureProjectionType_Invalid 

The texture projection type is not set.

APITextureProjectionType_Planar 

The texture projection type is Planar.

APITextureProjectionType_Default 

The texture projection type is Default

APITextureProjectionType_Cylindric 

The texture projection type is Cylindric.

APITextureProjectionType_Spheric 

The texture projection type is Spheric.

APITextureProjectionType_Box 

The texture projection type is Box.

◆ API_TitlePreviewModes

Determines what is shown on the preview the drawing title.

Remarks
The values correspond to the different settings on the Title tabpage of the Drawing Settings dialog. Can be APITitlePreviewMode_DrawingWithTitle or APITitlePreviewMode_TitleOnly
Enumerator
APITitlePreviewMode_DrawingWithTitle 

The preview shows the drawing and the title.

APITitlePreviewMode_TitleOnly 

The preview shows the title only.

◆ API_TrimTypeID

The type of the trim connection link between two construction elements.

Remarks
These enumerators are used with the ACAPI_Element_Trim_ElementsWith and ACAPI_Element_Trim_GetTrimType functions.
Enumerator
APITrim_No 

No trim connection

APITrim_KeepInside 

Keep the inside part of the trimmed element

APITrim_KeepOutside 

Keep the outside part of the trimmed element

APITrim_KeepAll 

Keep all trimmed element

◆ API_VeneerTypeID

Describes the veneer type of a column.

Enumerator
APIVeneer_Core 

core veneer

APIVeneer_Finish 

finish veneer

APIVeneer_Other 

other veneer

◆ API_VerticalLinkID

Type of the vertical anchor.

Enumerator
API_NoLink 

Undefined vertical link type, not applicable for windows/doors and skylights

API_LinkSillToWallBottom 

Position the sill of the opening relative to the bottom of the containing wall

API_LinkSillToStory 

Position the sill of the opening relative to a given story

API_LinkHeaderToWallBottom 

Position the header of the opening relative to the bottom of the containing wall

API_LinkHeaderToStory 

Position the header of the opening relative to a given story

API_LinkSkylightToRoofPivot 

Position the skylight anchor vertically relative to the roof pivot lines

API_LinkSkylightToStory 

Position the skylight anchor vertically relative to a given story

API_LinkSkylightToShellBase 

Position the skylight anchor relative to ShellBase

API_LinkSillToWallTop 

Position the sill of the opening relative to the top of the containing wall

API_LinkHeaderToWallTop 

Position the header of the opening relative to the top of the containing wall

◆ API_WallReferenceLineLocationID

Distinguishes among the different wall reference line locations.

Remarks
These constants determine the location of the reference line in the wall. This - along with the new flipped member in API_WallType - replace the old API_WallDirID, and allow you to exactly position the reference line, instead of coding both this position and the 'flippedness' of the wall into one member. Imagine a horizontal unflipped composite wall drawn from left to right (as shown in the Composite Settings dialog): outside is the top, inside is the bottom.
Wall reference line location
Only composite walls may have a core-related reference line location; polygonal and complex walls always use @ref APIWallRefLine_Outside. Profiled walls don't use this member; their reference line always goes through their origin. When its value is APIWallRefLine_Center or @ref APIWallRefLine_CoreCenter, you cannot specify an offset in the API_WallType structure. The new offsetFromOutside output only member in API_WallType tells you the distance between the 'top' of the wall (as shown in the Composite Settings dialog) and the reference line's position.
Enumerator
APIWallRefLine_Outside 

The reference line location is on the outside face of the wall.

APIWallRefLine_Center 

The reference line location is on the center of the wall.

APIWallRefLine_Inside 

The reference line location is on the inside face of the wall.

APIWallRefLine_CoreOutside 

The reference line location is on the core outside skin of the composite structure.

APIWallRefLine_CoreCenter 

The reference line location is on the center of the core skin of the composite structure.

APIWallRefLine_CoreInside 

The reference line location is on the core inside skin of the composite structure.

◆ API_WallTypeID

Represents the different wall types.

Enumerator
APIWtyp_Normal 

Normal wall with parallel sides.

APIWtyp_Trapez 

Normal trapezoidal wall (vertical).

APIWtyp_Poly 

General polygon-based wall.

◆ API_WindowDoorDirectionTypes

Window Door Direction type.

Enumerator
API_WDAssociativeToWall 

The plane of the window follows the plane of the wall

API_WDVertical 

The window is placed vertically regardless of the plane of the wall it is placed into

◆ API_WindowDoorRevealDepthLocationID

Window Door Reveal Depth Location type.

Enumerator
APIWDRevealDepth_Side 

The reference line location is on the clicked side of the wall.

APIWDRevealDepth_Core 

The reference line location is on the core (clicked side) skin of the composite structure.

◆ API_WitnessID

Describes the various appearance options for witness lines.

Enumerator
APIWtn_None 

No witness line.

APIWtn_Small 

Small witness line.

APIWtn_Large 

Large witness line; the length of the witness line is given in the witnessValfield of API_DimElem.

APIWtn_Fix 

Dynamic witness line; the size of the gap between the witness line and the element is given in the witnessValfield of API_DimElem.

◆ API_ZoneRelID

Describes the relation of an element to a zone.

Enumerator
APIZRel_Boundary 

The element is a zone boundary.

APIZRel_ReduceArea 

The element reduces the area of the zone.

APIZRel_None 

The element has no relation to the wall.

APIZRel_SubtractFromZone 

The element is subtracted from the zone

◆ Constraint

enum class ACAPI::Element::Constraint
strong

Orientation of the opening in host element.

Since
Archicad 29
Enumerator
ForcedVertical 

The opening is oriented vertically, regardless of the host element's orientation.

ForcedHorizontal 

The opening is oriented horizontally, regardless of the host element's orientation.

Aligned 

The opening's orientation aligns with the host element's orientation.

Free 

The opening's orientation is not constrained and can be freely defined. Not usable for OpeningDefault

◆ DividedOpeningMode

Representation type of openings divided by air space.

Since
Archicad 29
Enumerator
Disconnected 

Divided opening is shown as separate openings - not displayed in air space.

Connected 

Divided opening is shown as a single opening - displayed in air space.

◆ LimitType

enum class ACAPI::Element::LimitType
strong

Type of the extrusion body.

Since
Archicad 29
Enumerator
Infinite 

The extrusion extends infinitely in both directions.

Finite 

The extrusion has a defined length, starting and ending within the host element.

HalfInfinite 

The extrusion starts within the host element and extends infinitely in one direction.

◆ LinkedStatus

enum class ACAPI::Element::LinkedStatus
strong

Relation between the width and height value.

Since
Archicad 29
Enumerator
Linked 

The width and height of the opening are linked, changing one will change the other.

NotLinked 

The width and height of the opening are independent, changing one does not affect the other.

◆ OpeningFloorPlanDisplayMode

Floor plan display mode type of openings.

Since
Archicad 29
Enumerator
Symbolic 

Opening displayed as per its vertical position in cut parts of the host element.

SymbolicCut 

Opening displayed as cut element in cut parts of the host element.

SymbolicOverhead 

Opening displayed as hidden / overhead in cut parts of the host element.

Projected 

Opening displayed as per its vertical position in all parts of the host element.

◆ OpeningOpenEdgeStyle

Type of contours on open edges of outlines.

Since
Archicad 29
Enumerator
Hide 

Hide contours on open edges.

ShowUncut 

Show contours on open edges as uncut edges.

ShowOverhead 

Show contours on open edges as overhead edges.

◆ ShapeType

enum class ACAPI::Element::ShapeType
strong

Type of The opening polygon.

Since
Archicad 29
Enumerator
Rectangular 

The base polygon of the opening is rectangular. Suitable for most door and window openings.

Circular 

The base polygon of the opening is circular. Commonly used for round windows or other circular openings.

Polygonal 

The base polygon of the opening is polygonal, allowing for custom shapes beyond simple rectangles and circles.

Function Documentation

◆ ACAPI_DisposeBeamRelationHdls()

void ACAPI_DisposeBeamRelationHdls ( API_BeamRelation * beamInfo)

Frees the memory occupied by all allocated beam relation handles.

Parameters
beamInfo[in] Points to an API_BeamRelation structure, which contains handles used for previous operations and are no longer needed.
Remarks
This is the recommended way of disposing of the beam relation handles for compatibility reasons, as the API_BeamRelation structure might change later in the API.

◆ ACAPI_DisposeBeamSegmentRelationHdls()

void ACAPI_DisposeBeamSegmentRelationHdls ( API_BeamSegmentRelation * segmentInfo)

Frees the memory occupied by all the allocated beam segment relation handles.

Parameters
segmentInfo[in] Points to an API_BeamSegmentRelation structure, which contains handles used for previous operations and are no longer needed.
Remarks
This is the recommended way of disposing of the beam segment relation handles for compatibility reasons, as the API_BeamSegmentRelation structure might change later in the API.

◆ ACAPI_DisposeElemMemoHdls()

GSErrCode ACAPI_DisposeElemMemoHdls ( API_ElementMemo * memo)

Frees the memory occupied by all of the allocated memo handles.

Parameters
memo[in] Points to an API_ElementMemo structure which contains handles used for previous operations and are no longer needed.
Returns
Remarks
This is the recommended way of disposing of the memo handles for compatibility reasons, as in a later version of the API, the API_ElementMemo structure might change.

◆ ACAPI_DisposeParagraphsHdl()

GSErrCode ACAPI_DisposeParagraphsHdl ( API_ParagraphType *** paragraphs)

Frees the memory occupied by a handle to an array of API_ParagraphType.

Parameters
paragraphs[in] A handle to an array of API_ParagraphType.
Returns
Remarks
This is the recommended way of disposing of the paragraph handles for compatibility reasons, as in a later version of the API, the API_ParagraphType structure might change.

◆ ACAPI_DisposeRoomRelationHdls()

GSErrCode ACAPI_DisposeRoomRelationHdls ( API_RoomRelation * roomInfo)

Frees the memory occupied by all allocated room relation handles.

Since
Archicad 26
Parameters
roomInfo[in] Points to an API_RoomRelation structure, which contains handles used for previous operations and are no longer needed.
Returns
  • NoError - The function has completed successfully.
Remarks
This is the recommended way of disposing of the room relation handles for compatibility reasons, as the API_RoomRelation structure might change later in the API.

◆ ACAPI_DisposeWallRelationHdls()

void ACAPI_DisposeWallRelationHdls ( API_WallRelation * wallInfo)

Frees the memory occupied by all allocated wall relation handles.

Parameters
wallInfo[in] Points to an API_WallRelation structure which contains handles used for previous operations and are no longer needed.
Remarks
This is the recommended way of disposing of the wall relation handles for compatibility reasons, as the API_WallRelation structure might change later in the API.

◆ ACAPI_Element_AddClassificationItem()

GSErrCode ACAPI_Element_AddClassificationItem ( const API_Guid & elemGuid,
const API_Guid & itemGuid )

Classifies an element.

Parameters
elemGuid[in] The identifier of the element which should receive the new classification.
itemGuid[in] The guid of the classification item, that should be added to the element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element or itemGuid did not refer to a valid classification item.
  • APIERR_READONLY - The element can not be modified (i.e. from a hotlink) or you do not have the right to classify elements in the current teamwork plan.
  • APIERR_BADCLASSIFICATION - The classification item is not available for the given element.

◆ ACAPI_Element_AddClassificationItemDefault()

GSErrCode ACAPI_Element_AddClassificationItemDefault ( const API_ElemType & type,
const API_Guid & itemGuid )

Classifies an element.

Since
Archicad 26
Parameters
type[in] Type of the default element.
itemGuid[in] The guid of the classification item, that should be added to the element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The type did not refer to a valid default element or itemGuid did not refer to a valid classification item.
  • APIERR_READONLY - The element can not be modified (i.e. from a hotlink) or you do not have the right to classify elements in the current teamwork plan.
  • APIERR_BADCLASSIFICATION - The classification item is not available for the given element.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.

◆ ACAPI_Element_AttachObserver()

GSErrCode ACAPI_Element_AttachObserver ( const API_Guid & elemGuid,
GSFlags notifyFlags = 0 )

Attaches an observer to the given element.

Parameters
elemGuid[in] Identifies the element to attach the observer to.
notifyFlags[in] Defines the behavior of the attached observer in certain database operations.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The referenced element cannot be found in the database.
Remarks
This function can be used to track changes in an element. After attaching the observer, the installed APIElementEventHandlerProc will be called with the appropriate notifications.

◆ ACAPI_Element_CalcBounds()

GSErrCode ACAPI_Element_CalcBounds ( const API_Elem_Head * elemHead,
API_Box3D * extent3D )

Returns the model extent of an element in the current database.

Parameters
elemHead[in] The element reference.
extent3D[out] The 3D enclosing box of the element.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - Any of the parameters are nullptr.
  • APIERR_BADID - elemHead->guid is invalid.
  • APIERR_DELETED - The element is deleted.
Remarks
This function determines the model extent of an element. It can be used for either construction or 2D elements. In the latter case, the vertical information will not be filled.

◆ ACAPI_Element_CalcCoreOffsetToSideOffset()

GSErrCode ACAPI_Element_CalcCoreOffsetToSideOffset ( const API_Guid * wallOpeningGuid,
const double * coreOffset,
double * sideOffset )

Converts the reveal depth offset from core skin to wall side for wall openings.

Parameters
wallOpeningGuid[in] Unique ID of the WallOpening element.
coreOffset[in] Reveal depth offset from core skin.
sideOffset[out] Reveal depth offset from wall side.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - wallOpeningGuid or coreOffset or sideOffset is nullptr.
  • APIERR_BADID - wallOpeningGuid does not refer to a valid element in the database.
  • APIERR_REFUSEDPAR - The element specified with wallOpeningGuid is not WallOpening type, or owner wall of opening is not exist.
Remarks
This function can be used for wall openings in composite walls (side offset and core offset is equal in walls with basic structure).

◆ ACAPI_Element_CalcSideOffsetToCoreOffset()

GSErrCode ACAPI_Element_CalcSideOffsetToCoreOffset ( const API_Guid * wallOpeningGuid,
const double * sideOffset,
double * coreOffset )

Converts the reveal depth offset from wall side to core skin for wall openings.

Parameters
wallOpeningGuid[in] Unique ID of the WallOpening element.
sideOffset[in] Reveal depth offset from wall side.
coreOffset[out] Reveal depth offset from core skin.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - wallOpeningGuid or sideOffset or coreOffset is nullptr.
  • APIERR_BADID - wallOpeningGuid does not refer to a valid element in the database.
  • APIERR_REFUSEDPAR - The element specified with wallOpeningGuid is not WallOpening type, or owner wall of opening is not exist.
Remarks
This function can be used for wall openings in composite walls (side offset and core offset is equal in walls with basic structure).

◆ ACAPI_Element_CatchChangeDefaults()

GSErrCode ACAPI_Element_CatchChangeDefaults ( const API_ToolBoxItem * elemType,
APIDefaultsChangeHandlerProc * handlerProc )

Register or unregister your add-on to be notified if the default settings of a given element type is modified.

Parameters
elemType[in] Specifies the type of element for which your add-on should be notified. In order to receive notification on changing the default settings of any type of element, you simply pass nullptr as this parameter.
handlerProc[in] The callback procedure to call when notifications are sent out on changing the default settings of this element type. Specifying nullptr here means you don't need the notifications any more.
Returns
  • NoError - The required operation finished successfully.
  • APIERR_BADID - The elemType parameter contains an invalid type.
Remarks
This function enables the API tool add-on catch the modification of the default settings of a certain element type. Each time when one of the default parameters of the element type is modified the server application calls the supplied callback procedure of the add-on provided that it has been registered for this event previously. If you do not need to catch the changes of default settings any longer, please remember to unregister by calling ACAPI_Element_CatchChangeDefaults for the required element type with nullptr in the handlerProc parameter.
Example
#define ELEMSTR_LEN 256
bool GetElementTypeString (const API_ElemType& type, char *elemStr)
{
GS::UniString ustr;
GSErrCode err = ACAPI_Element_GetElemTypeName (type, ustr);
if (err == NoError) {
CHTruncate (ustr.ToCStr (), elemStr, ELEMSTR_LEN - 1);
return true;
}
return false;
}
// -----------------------------------------------------------------------------
// Defaults change handler function
// -----------------------------------------------------------------------------
GSErrCode ChangeDefaultsHandler (const API_ToolBoxItem *defElemType)
{
char msgStr[256];
char elemStr[32];
if (GetElementTypeString (defElemType->type, elemStr))
sprintf (msgStr, "%s element type defaults changed", elemStr);
else
sprintf (msgStr, "Unknown element type defaults changed");
ACAPI_WriteReport (msgStr, false);
return NoError;
} // ChangeDefaultsHandler
// -----------------------------------------------------------------------------
// Called after the Add-On has been loaded into memory
// -----------------------------------------------------------------------------
GSErrCode Initialize ()
{
// catch changes in defaults for all element types
return ACAPI_Element_CatchChangeDefaults (nullptr, ChangeDefaultsHandler);
} // Initialize

◆ ACAPI_Element_CatchNewElement()

GSErrCode ACAPI_Element_CatchNewElement ( const API_ToolBoxItem * elemType,
APIElementEventHandlerProc * handlerProc )

Register or unregister your add-on to be notified if the given type of element is created.

Parameters
elemType[in] Specifies the type of element for which your add-on should be notified. In order to receive notification on the creation of any type of elements, you simply pass nullptr as this parameter.
handlerProc[in] The callback procedure to call when notifications are sent out on creating this type of element. Specifying nullptr here means you don't need the notifications any more.
Returns
  • NoError - The requested operation finished successfully.
  • APIERR_BADID - The elemType parameter contains an invalid type.
Remarks
This function enables the API tool add-on catch the event of creating a certain type of element. Each time when an element of this type is created the server application calls the supplied handlerProc of your those add-ons which have been registered for this event previously. If you do not need to catch the creation of new elements any longer, please remember to unregister by calling ACAPI_Element_CatchNewElement for the required element type with nullptr in the handlerProc parameter.
Example
#define ELEMSTR_LEN 256
bool GetElementTypeString (const API_ElemType& type, char *elemStr)
{
GS::UniString ustr;
GSErrCode err = ACAPI_Element_GetElemTypeName (type, ustr);
if (err == NoError) {
CHTruncate (ustr.ToCStr (), elemStr, ELEMSTR_LEN - 1);
return true;
}
return false;
}
// -----------------------------------------------------------------------------
// Element event handler function
// -----------------------------------------------------------------------------
GSErrCode ElementEventHandler (const API_NotifyElementType *elemType)
{
GSErrCode err = NoError;
char msgStr[256];
char elemStr[32];
API_Element parentElement {};
ACAPI_Notification_GetParentElement (&parentElement, nullptr, 0, nullptr);
switch (elemType->notifID) {
if (GetElementTypeString (elemType->elemHead.type, elemStr)) {
if (parentElement.header.guid != APINULLGuid)
sprintf (msgStr, "### API Notify Test: %s #%s created as a copy of #%s",
elemStr, APIGuidToString (elemType->elemHead.guid).ToCStr ().Get (),
APIGuidToString (parentElement.header.guid).ToCStr ().Get ());
else
sprintf (msgStr, "### API Notify Test: %s #%s created", elemStr,
APIGuidToString (elemType->elemHead.guid).ToCStr ().Get ());
} else
sprintf (msgStr, "### API Notify Test: Unknown element type created");
break;
default:
break;
}
if (err == NoError)
ACAPI_WriteReport (msgStr, false);
return NoError;
} // ElementEventHandler
// -----------------------------------------------------------------------------
// Called after the Add-On has been loaded into memory
// -----------------------------------------------------------------------------
GSErrCode Initialize ()
{
API_ToolBoxItem elemType_Wall = { API_WallID, { 0, 0 } };
// catch changes in defaults for all element types
return ACAPI_Element_CatchNewElement (&elemType_Wall, ElementEventHandler);
}

◆ ACAPI_Element_Change()

GSErrCode ACAPI_Element_Change ( API_Element * element,
const API_Element * mask,
const API_ElementMemo * memo,
UInt64 memoMask,
bool withdel )

Modifies an element in the current database.

Parameters
element[in/out] Reference to the element to be modified, filled with the appropriate new parameters
mask[in] Optional parameter for masking the relevant fields of the element
memo[in] The memo data to be changed. An optional parameter can be nullptr
memoMask[in] Specifies the relevant parts of the memo parameter
withdel[in] Delete the original instance of the element, or keep it and create a new one
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE - The current database should be the floor plan, a section/elevation, a detail, or a worksheet
  • APIERR_BADPARS - The passed element parameter is nullptr,
Remarks
With this function, not only can the setting type parameters of an element be modified, but geometry data too. Unlike ACAPI_Element_ChangeParameters and ACAPI_Element_Edit, it works only on one element at a time. On return, the guid field of the element header is filled in. Element connections and dimension chains are updated automatically. To change elements having associated markers, use the ACAPI_Element_ChangeExt function instead. To change the edge type of morph elements, use ACAPI_Element_ChangeMorphEdgeType function instead. ACAPI_DisposeElemMemoHdls The following element types are supported:
Element type Notes
API_WallID cannot switch between polygon-based and non-polygon-based wall types; type, begC, endC, and angle fields can be modified for non-polygonal walls only; the gables of the wall can be changed
API_ColumnID beside the setting parameters, the origoPos, axisRotationAngle fields can be accessed directly; the gables, columnSegments, assemblySegmentCuts, assemblySegmentSchemes, and assemblySegmentProfiles memos can be modified
API_BeamID beside the setting parameters, the begC, endC fields can be accessed directly; the beamHoles, gables, beamSegments, assemblySegmentCuts, assemblySegmentSchemes, and assemblySegmentProfiles memos can be modified
API_WindowID
API_DoorID
beside the setting parameters, the following fields can be edited: objLoc, reflected, oSide, refSide, wallCutUsing, libInd; the gables and params memos can also be modified
API_ObjectID
API_LampID
beside the setting parameters, the following fields can be edited: pos, libInd; the gables and params memos can also be modified
API_SlabID beside the setting parameters, the polygon of the slab can be modified directly (coords, pends, parcs, and vertexIDs memo handles)
API_RoofID beside the setting parameters, the baseLine field, the polygon of the roof and the roof sides can be modified directly (coords, pends, parcs, vertexIDs, and roofSides memo handles)
API_MeshID beside the setting parameters, the polygon and ridge levels of the mesh can be modified directly (coords, pends, parcs vertexIDs, meshPolyZ, meshLevelCoords, and meshLevelEndsmemo handles)
API_DimensionID beside the setting parameters, the dimElems memo handle can be modified
API_RadialDimensionID beside the setting parameters, the following fields can be edited: base, note
API_LevelDimensionID beside the setting parameters, the following fields can be edited: loc, note1, note2, parentType, parentGuid
API_AngleDimensionID beside the setting parameters, the note and base fields can be modified
API_TextID beside the setting parameters, the following fields can be edited: loc, width, nonBreaking; the content and the style of the text can also be modified (textContent, paragraphs memo)
API_LabelID beside the setting parameters the following fields can be edited: begC, midC, endC, u.text (the same as API_TextID), u.symbol (the same as API_ObjectID); for textual label the content and the style of the text can also be modified (textContent, paragraphs memo); an associative Label cannot be made independent, and an independent Label cannot be made associative.
API_ZoneID beside the setting parameters, the following fields can be edited: libInd, pos, and the polygon of the zone (coords, pends, parcs, vertexIDs memo handles)
API_HatchID beside the setting parameters, the following fields can be edited: note and the polygon of the hatch (coords, pends, parcs, vertexIDs memo handles)
API_LineID beside the setting parameters, the begC, endC fields can be accessed directly
API_ArcID
API_CircleID
both the setting and geometry parameters can be modified with ACAPI_Element_Change
API_PolyLineID beside the setting parameters the the polygon data (coords, pends, parcs, vertexIDs memo handles) can be accessed directly
API_SplineID only the setting parameters can be modified with ACAPI_Element_Change in this version; geometry data, autoSmooth, and closed fields cannot be accessed
API_HotspotID beside the setting parameters, the following fields can be edited: pos, height
API_CutPlaneID beside the setting parameters, the following fields can be edited: depth, leftDir
API_ChangeMarkerID beside the setting parameters, the following fields can be edited: pos. It has effect only when the changed ChangeMarker has no polygon, i.e., it points to a single coordinate marked by pos.
API_DetailID
API_WorksheetID
beside the setting parameters, the pos field and the polygon of the detail or worksheet (coords, pends, parcs, vertexIDs memo handles) can be accessed directly
API_SectElemID after modifying the parent element on the floor plan database, calling ACAPI_Element_Change for the section symbol element on the section database rebuilds the image of the modified element in the section window (use this to avoid unnecessary ACAPI_View_Rebuild and ACAPI_Database_RebuildCurrentDatabase calls). The function returns APIERR_DELETED if the parent element has been deleted or is out of the scope of the section; otherwise, it gives back the new index of the refreshed section element.
API_MorphID in some cases, changing the tranmat field affects the body points themselves and vice versa; the resulting body will be correct, but getting the tranmat field after setting might result in different values inside
API_HotlinkID the type and hotlinkGroupGuid fields can not be changed.
API_ExternalElemID beside the setting parameters in case of non-hierarchical external elements params memos can also be modified
You can modify more elements at once with a single call to the ACAPI_Element_ChangeMore function.
Example
GSErrCode FlipWall (const API_Guid& wallGuid)
{
API_Element element {}, mask;
API_Coord c1, c2;
GSErrCode err = NoError;
element.header.guid = wallGuid;
err = ACAPI_Element_Get (&element);
if (err != NoError)
return err;
c1 = element.wall.begC;
c2 = element.wall.endC;
if (err == NoError) {
ACAPI_ELEMENT_MASK_CLEAR (mask);
ACAPI_ELEMENT_MASK_SET (mask, API_WallType, begC);
ACAPI_ELEMENT_MASK_SET (mask, API_WallType, endC);
element.wall.begC = c2;
element.wall.endC = c1;
err = ACAPI_Element_Change (&element, &mask, nullptr, 0, true);
}
return err;
}

◆ ACAPI_Element_ChangeContent()

GSErrCode ACAPI_Element_ChangeContent ( API_ContentPars * contentPars)

Change the content of a text or a textual label element.

Parameters
contentPars[in/out] Parameters of the element and contents.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The input parameters are not given correctly.
  • APIERR_REFUSEDPAR - The passed element is not a text or a textual label.
  • APIERR_PAROVERLAP - The range overlaps two or more paragraphs.
  • APIERR_PAROVERFLOW - The beginning position (from) run over the content length.
  • APIERR_MEMFULL - Not enough memory.
Remarks
This function is used to modify the content of a multistyle text or textual label. The styles of the runs won't be lost. The new content piece will pick up the style (font, size, faceBits...) of the character on the from position in the original content. The content member of API_ContentPars should not contain line end characters and ranges may not overlap paragraphs. The another way to change the content is using ACAPI_Element_Change function. With it you can set the style of the text also by passing textContent and paragraphs handles in API_ElementMemo structure. Don't forget to free the allocated memory blocks. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Example
Changing the content of a text element:
The original element
GSErrCode err = NoError;
err = ACAPI_CallUndoableCommand ("Change the content of a text element",
[&] () -> GSErrCode {
API_ContentPars contPars;
Int32 numOfChanges = 2;
contPars.head.type.typeID = API_TextID;
contPars.from = reinterpret_cast<Int32 *> (BMAllocatePtr (numOfChanges * sizeof (Int32), ALLOCATE_CLEAR, 0));
contPars.range = reinterpret_cast<Int32 *> (BMAllocatePtr (numOfChanges * sizeof (Int32), ALLOCATE_CLEAR, 0));
contPars.content = BMAllocatePtr (256 * sizeof (char), ALLOCATE_CLEAR, 0);
contPars.separator = reinterpret_cast<Int32 *> (BMAllocatePtr (numOfChanges * sizeof (Int32), ALLOCATE_CLEAR, 0));
if (contPars.from == nullptr || contPars.range == nullptr || contPars.content == nullptr || contPars.separator == nullptr)
contPars.from[0] = 5; // byte position
contPars.range[0] = 16; // byte number
contPars.from[1] = 28;
contPars.range[1] = 13;
CHCopyC ("raw was modified too", contPars.content);
contPars.separator[0] = 16; // byte offset
contPars.separator[1] = 32;
GSErrCode err1 = ACAPI_Element_ChangeContent (&contPars);
BMKillPtr (reinterpret_cast<GSPtr *> (&contPars.from));
BMKillPtr (reinterpret_cast<GSPtr *> (&contPars.range));
BMKillPtr (reinterpret_cast<GSPtr *> (&contPars.content));
BMKillPtr (reinterpret_cast<GSPtr *> (&contPars.separator));
return err1;
});
return err;
The result element

◆ ACAPI_Element_ChangeDefaults()

GSErrCode ACAPI_Element_ChangeDefaults ( API_Element * element,
API_ElementMemo * memo,
const API_Element * mask )

Changes the default parameters of an element.

Parameters
element[in] Contains the general parameters to which you would like to change the defaults.
memo[in][ Contains the special parameters to which you would like to change the defaults.
mask[in] Contains a mask that specifies which parameters you would like to change. The memo fields are always used when they contain valid data.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The passed parameter is nullptr ; element
  • APIERR_BADID - The element type is invalid, or the element type is not supported by the server application
  • APIERR_REFUSEDCMD - The element type is not a valid target for the operation; API_SectElemID
  • APIERR_MEMFULL - Not enough memory to complete the operation
Remarks
This function is used to change the actual default settings for an element type. Only those parameters are changed where the corresponding field in the mask is not 0. The requested type is identified by the type field of the header. The memo parameter is used only in the case of API_WindowID, API_DoorID, API_ObjectID, API_LampID, API_RoomID, API_LabelID, API_PictureID and API_ExternalElemID. For library part-based elements, if memo is set to nullptr, the default parameters of the originating library part are used; otherwise, the values are taken from the params field of memo. To retrieve the actual setting defaults, use the ACAPI_Element_GetDefaults function. Only those parameters are required to fill in the element argument that are marked to be changed. There are macros to set up the mask values correctly. They are:
Example
API_Element element {}, mask {};
GSErrCode err;
err = ACAPI_Element_GetDefaults (&element, nullptr);
if (err == NoError) {
ACAPI_ELEMENT_MASK_CLEAR (mask);
ACAPI_ELEMENT_MASK_SET (mask, API_Elem_Head, layer);
element.header.layer = ACAPI_CreateAttributeIndex (27);
err = ACAPI_Element_ChangeDefaults (&element, nullptr, &mask);
}

◆ ACAPI_Element_ChangeDefaultsExt()

GSErrCode ACAPI_Element_ChangeDefaultsExt ( API_Element * element,
API_ElementMemo * memo,
const API_Element * mask,
UInt32 nSubElems,
API_SubElement * subElems )

Changes the default parameters of the Window, Door, Section, Elevation, Interior Elevation, ChangeMarker, Detail, Worksheet, or Stair default element and its marker(s). This function also allows you to change the default settings of the Curtain Wall and its subelem.

Since
Archicad 25
Parameters
element[in] Contains the general parameters to which you would like to change the defaults. The element->header.type can be API_WindowID, API_DoorID, API_CutPlaneID, API_ElevationID, API_InteriorElevationID, API_ChangeMarkerID, API_DetailID, API_WorksheetID, API_CurtainWallID, API_CurtainWallPanelID, API_CurtainWallFrameID, API_CurtainWallJunctionID, API_CurtainWallAccessoryID, API_StairID or API_ExternalElemID.
memo[in][ Contains the special parameters to which you would like to change the defaults.
mask[in] Contains a mask that specifies which parameters you would like to change. The memo fields are always used when they contain valid data.
nSubElems[in] The number of subelems passed (0-3)
subElems[in] Usually, the first marker contains the general marker parameters to which you would like to change the defaults. If this parameter is not nullptr, then the header.type must be API_ObjectID. The mask specifies which parameters of the marker you would like to change. These fields are always used when they contain valid data. The second marker element is the Story Handle Marker, where applicable. The third marker element is the common marker of the interior elevation element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The passed element parameter is nullptr.
  • APIERR_BADID - The element type should be API_WindowID, API_DoorID, API_CutPlaneID, API_ElevationID, API_InteriorElevationID, API_ChangeMarkerID, API_DetailID, API_WorksheetID, API_CurtainWallID, API_CurtainWallPanelID, API_CurtainWallFrameID, API_CurtainWallJunctionID, API_CurtainWallAccessoryID, API_StairID or API_ExternalElemID.
  • APIERR_MEMFULL - Not enough memory to complete the operation.
Remarks
This function is used to change the actual default settings for a Window, Door, Section, Elevation, Interior elevation, ChangeMarker, Detail, or Worksheet element type, as an alternative to ACAPI_Element_ChangeDefaults. The marker parameters are optional; pass nullptr to keep them unchanged. For the detailed interpretation of the parameters, refer to the ACAPI_Element_ChangeExt function. Only those parameters are changed where the corresponding field in the mask is not 0. The requested type is identified by the type field of the header. The memo parameter is used only in the case of API_WindowID and API_DoorID. For library part-based elements, if memo is set to nullptr, the default parameters of the originating library part are used; otherwise, the values are taken from the params field of memo. To retrieve the actual setting defaults, use the ACAPI_Element_GetDefaultsExt function. Only those parameters are required to fill in the element argument that are marked to be changed. There are macros to set up the mask values correctly. They are:
Mask function Behavior
ACAPI_ELEMENT_MASK_CLEAR Clear all the flags in the mask
ACAPI_ELEMENT_MASK_SETFULL Set all the flags in the mask
ACAPI_ELEMENT_MASK_SET Set only one flag in the mask according to one element parameter
ACAPI_ELEMENT_MASK_CHECK Check the mask for one element parameter
Remember to call ACAPI_DisposeElemMemoHdls to dispose of the passed handles.

◆ ACAPI_Element_ChangeElementInfoString()

GSErrCode ACAPI_Element_ChangeElementInfoString ( const API_Guid * elementGuid,
const GS::UniString * infoString )

Changes the compound info string of the given element.

Parameters
elementGuid[in] the Guid of the element
infoString[in] the info string of the element
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - any of the parameters is nullptr
  • APIERR_BADID - no element found by the specified Guid
  • APIERR_BADELEMENTTYPE - element has no info string

◆ ACAPI_Element_ChangeExt()

GSErrCode ACAPI_Element_ChangeExt ( API_Element * element,
const API_Element * mask,
API_ElementMemo * memo,
UInt64 memoMask,
UInt32 nSubElems,
API_SubElement * subElems,
bool withdel,
Int32 subIndex )

Modifies a Window, Door, Section, Elevation, Interior Elevation, ChangeMarker, Detail, Worksheet, Stair or External element in the current database.

Since
Archicad 25
Parameters
element[in/out] Reference to the element to be modified, filled with the appropriate new parameters
mask[in] Optional parameter for masking the relevant fields of the element
memo[in] The memo data to be changed. Optional parameter, can be nullptr
memoMask[in] Specifies the relevant parts of the memo parameter. You can use a special mask value (ACAPI_ELEMENT_CHANGEEXT_ALLSEGMENTS) to change all segments of an interior elevation element.
nSubElems[in] The number of subelems (markers) passed (0-3).
subElems[in] Contains the markers (default marker, story handle marker, interior elevation common marker) to be modified.
withdel[in] Delete the original instance of the element, or keep it and create a new one
subIndex[in] The index of the section segment to be modified (for interior elevations only). The value is between 0 and the (number of segments - 1).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE - The current database should be a floor plan, section/elevation, detail, or worksheet.
  • APIERR_BADPARS - The passed element parameter is nullptr,
Remarks
This function is an extension of ACAPI_Element_Change to modify elements with their linked sub-elements. With this function, not only can the setting type parameters of an element be modified, but geometry data too. Unlike ACAPI_Element_ChangeParameters and ACAPI_Element_Edit, it works only on one element at a time. On return, the guid field of the element and the elementMarker header are filled in. Element connections and dimension chains are updated automatically. Do not forget to call ACAPI_DisposeElemMemoHdls to dispose of the memo handles when they are not needed anymore. The following element types are supported:
element memo elementMarker memoMarker elementMarker2 memoMarker2
API_WindowType
API_DoorType
addpar window/door marker object marker object parameters - -
API_CutPlaneType cutplane coordinates section marker object on floorplan section marker object parameters story handle marker object on section story handle marker object parameters
API_ElevationType elevation coordinates elevation marker object on floorplan elevation marker object parameters story handle marker object on section story handle marker object parameters
API_ChangeMarkerType polygon data (optional) ChangeMarker marker object marker object parameters - -
API_WindowType
API_DoorType
addpar window/door marker object marker object parameters - -
|API_ExternalElemType | - | hierarchical subelement 1 | addpar | hierarchical subelement 2 | addpar | etc.

◆ ACAPI_Element_ChangeMemo()

GSErrCode ACAPI_Element_ChangeMemo ( API_Guid & guid,
UInt64 mask,
const API_ElementMemo * memo )

Changes the memo part of certain element types.

Parameters
guid[in] Guid of the element.
mask[in] Specifies which part of a memo should be changed. Currently, only APIMemoMask_Polygon is supported.
memo[in] The replacement memo. Don't forget to dispose of it with ACAPI_DisposeElemMemoHdls when you are done.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - You called the function for element types other than slabs or roofs.
  • APIERR_BADPARS - You called the function with a mask value other than APIMemoMask_Polygon, or you specified wrong parameters.
Remarks
This function is used to change the memo part of certain element types. Currently, you can change only the polygon data of polygonal elements. It is recommended to use the ACAPI_Element_Change function instead.

◆ ACAPI_Element_ChangeMore()

GSErrCode ACAPI_Element_ChangeMore ( GS::Array< API_Guid > & elemGuids,
const API_Element * defPars,
const API_ElementMemo * defMemo,
const API_Element * mask,
UInt64 memoMask,
bool withdel )

Modifies a number of elements in the current database.

Parameters
elemGuids[in/out] This parameter identifies the elements to be modified.
defPars[in] The parameters of the new element.
defMemo[in] The memo of the new element. (Only if needed.)
mask[in] The mask of the new element.
memoMask[in] The memo mask of the new element. (Only if needed.)
withdel[in] Delete the original instances of elements, or keep them and create new ones
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE—The current database should contain the floor plan, section/elevation, detail, layout, or master layout.
  • APIERR_BADPARS - The passed defParams parameter is nullptr,
Remarks
This function is an extension of ACAPI_Element_Change to modify more elements at the same time.

◆ ACAPI_Element_ChangeMorphEdgeType()

GSErrCode ACAPI_Element_ChangeMorphEdgeType ( const API_Guid & elemID,
API_MorphEdgeTypeID edgeType )

Modifies a morph element's edge type in the current database.

Parameters
elemID[in] GUID of the morph element to be modified
edgeType[in] Edge type ID
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The element is currently not editable either because it's in a group or a hotlink. Try to suspend the group or break the hotlink before calling this function.
  • APIERR_BADID - The passed element ID is invalid.
  • APIERR_BADELEMENTTYPE - The passed element ID is not a morph ID.
    Remarks
    Use this function to change all edge types of a morph element identified with the passed GUID. The ACAPI_Element_Change function does not offer such functionality.
    Example
    GSErrCode FlipWall (const API_Guid& wallGuid)
    {
    API_Element element {}, mask;
    API_Coord c1, c2;
    GSErrCode err = NoError;
    element.header.guid = wallGuid;
    err = ACAPI_Element_Get (&element);
    if (err != NoError)
    return err;
    c1 = element.wall.begC;
    c2 = element.wall.endC;
    if (err == NoError) {
    ACAPI_ELEMENT_MASK_CLEAR (mask);
    ACAPI_ELEMENT_MASK_SET (mask, API_WallType, begC);
    ACAPI_ELEMENT_MASK_SET (mask, API_WallType, endC);
    element.wall.begC = c2;
    element.wall.endC = c1;
    err = ACAPI_Element_Change (&element, &mask, nullptr, 0, true);
    }
    return err;
    }

◆ ACAPI_Element_ChangeParameters()

GSErrCode ACAPI_Element_ChangeParameters ( const GS::Array< API_Guid > & elemGuids,
const API_Element * defPars,
const API_ElementMemo * defMemo,
const API_Element * mask )

Changes the parameters of a number of elements.

Parameters
elemGuids[in] Identifies the element(s).
defPars[in] The parameters of the new element.
defMemo[in] The memo of the new element. (Only if needed.)
mask[in] The mask of the new element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - defPars is nullptr
  • APIERR_BADDATABASE - The current database is not proper for the operation
  • APIERR_MEMFULL - Not enough memory to complete the operation
Remarks
You can use this function to change the settings parameters of a number of elements identified by elemGuids. If elemGuids is empty, then this function works on the selection. Only those elements whose type is the same as that passed in the defPars argument are affected. Elements that are not allowed for editing for some reason are ignored. Such cases can be:
  • it is locked,
  • it is on a locked layer,
  • it is part of a group, and the suspend group is OFF
  • it is not in the user’s workspace, etc. This function can only be used to change the settings-type parameters of elements, but not their geometric parameters. Only those parameters are affected that are marked in the mask argument. Such elements, which refer to Library Parts, the params handle from the memo is interpreted. If it is nullptr, nothing will happen. If it is passed, the actual parameter list will be changed. Refer to the ACAPI_Element_Change and the ACAPI_Element_ChangeDefaults functions, which work similarly. The following notes are absolutely important:
  • the list of target elements will be automatically extended by the other group members; if there are a group member in the set, and suspend group is OFF
  • all the edited elements keep their unique ID
  • all the inter-element links will be adjusted, including dimensioning also. Do not forget to call ACAPI_DisposeElemMemoHdls to dispose of the handles when you're finished.

◆ ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_CLEAR()

void ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_CLEAR ( API_QuantitiesMask & mask)
inline

Clears the composites part of the mask for querying composite quantities.

Parameters
maskthe quantity mask to clear

◆ ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_SETFULL()

void ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_SETFULL ( API_QuantitiesMask & mask)
inline

Set the composites part of the mask to full (return all quantities) for querying composite quantities.

Parameters
maskthe quantity mask to fill the composite part fully

◆ ACAPI_Element_Create()

GSErrCode ACAPI_Element_Create ( API_Element * element,
API_ElementMemo * memo )

Places a new element into the current database.

Parameters
element[in/out] The desired element will be created in the pointed structure. The element->header.type must specify the type of the element to be created.
memo[in] The memo field of the desired element will be created from the pointed structure (if the memo field is needed).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE - The current database is not proper for the operation.
  • APIERR_BADPARS - The passed parameter is nullptr; element
  • APIERR_BADID - The element type is invalid, or the element type is not supported by the server application
  • APIERR_REFUSEDPAR - The element->header.type parameter was incorrect. It might happen if you want to create something in a window that is not capable of displaying it, for example, a wall in a section window.
  • APIERR_INVALFLOOR - The element->header.floorInd parameter is out of range.
  • APIERR_IRREGULARPOLY - Input polygon or polyline is irregular.
Remarks
The type of the element to be created is defined by type in the element header. On return, the guid field of the header is filled in. Don't forget to call ACAPI_DisposeElemMemoHdls to dispose of the handles when you're done. The meaning of the different parameters is explained in the table below:
element->header.type memo fields Notes
API_WallID optional/required The gables are optional, the coords, pends, and parcs are required only for walls of type APIWtyp_Poly (polygon-based walls)
API_ColumnID optional (gables, assemblySegmentProfiles) required (columnSegments, assemblySegmentCuts, assemblySegmentSchemes)
API_BeamID optional (gables, beam holes, assemblySegmentProfiles) required (beamSegments, assemblySegmentCuts, assemblySegmentSchemes)
API_WindowID API_DoorID required (params) See also ACAPI_Element_CreateExt.
API_SkylightID required (params) See also ACAPI_Element_CreateExt.
API_ObjectID API_LampID required
API_SlabID required/optional The slab polygon is required; the edgeTrims and sideMaterials are optional.
API_RoofID required/optional The roof polygon is required; the edgeTrims, roofEdgeTypes and sideMaterials are optional. Besides these parameters for Multi-plane roofs, the pivotPolyCoords, pivotPolyPends, and pivotPolyParcs are also required; the pivotPolyEdges are optional.
API_MeshID required/optional The mesh polygon is required; the meshPolyZ (mesh points' Z coordinates), the meshLevelCoords (level line coordinates), and the meshLevelEnds (level lines' endpoints) fields are optional.
API_ShellID required/optional Shell shape data is required (first record of shellShapes for extruded and revolved shells, both records for ruled shells; shellContours are optional.
API_MorphID required/optional The morphBody field is required, and the morphMaterialMapTable field is optional.
API_DimensionID required (dimension data)
API_RadialDimensionID
API_AngleDimensionID
API_LevelDimensionID If the ceilNum is set to 0, the level dimension's reference is the floor; otherwise, the given ceiling.
API_TextID required (content)
optional (paragraphs)
for multistyle content
API_LabelID optional (content) for textual labels
optional (paragraphs) for multistyle content
required (parameters) for symbol labels
API_ZoneID required (polygon and parameters)
API_HatchID required (fill polygon) If the hatchGlobal field is set to false (the fill is linked to an element), the refPos and refAngle fields are used to calculate the orientation; otherwise, the global origin is used for this. If the showArea field is set to true, the note and the noteC fields are used for the appearance of the area; otherwise, these fields are ignored.
API_LineID
API_ArcID
API_CircleID
API_PolyLineID required (polygon)
API_SplineID required/optional The curve point coordinates are required. If the bezierDirs field is nullptr (autoSmooth is true), the direction parameters are automatically calculated from the first two points' relative position (the autoSmooth field must be set to true in this case).
API_HotspotID
API_PictureID required (picture content)
API_DrawingID optional (polygon, drawing data)
API_CutPlaneID required The cutplane coordinates are required. See also ACAPI_Element_CreateExt.
API_ChangeMarkerID optional (polygon) See also ACAPI_Element_CreateExt.
API_DetailID API_WorksheetID optional (polygon) See also ACAPI_Element_CreateExt.
API_CameraID optional (linklist) Optional for panoramic cameras only.
API_CamSetID
API_SectElemID This type of element cannot be created.
API_StairID required (polyline)
API_RailingID required (polyline)
The creation process for elements follows the same process as the one you use for creating elements graphically in Archicad. This means, for example, that you have to create a wall for windows and doors, etc. The API always checks for the presence of the necessary information and returns with an error code if something is missing. The created element may be redirected into the 2D binary section of a Library Part. Refer to the ACAPI_LibraryPart_SetUpSect_2DDrawHdl function for details. In this case, no information is returned on which indices or guids were generated. In this environment, only 2D drawing elements can be generated. The element can also be clipped by a clipping region. Refer to the ACAPI_Database_StartClippingSession function for details. In this case, no information is returned on which indices or guids were generated, since more parts may be generated.

◆ ACAPI_Element_CreateExt()

GSErrCode ACAPI_Element_CreateExt ( API_Element * element,
API_ElementMemo * memo,
UInt32 nSubElems,
API_SubElement * subElems )

Places a new Window, Door, Skylight, Section, Elevation, Interior Elevation, ChangeMarker, Detail, or Worksheet element with the specified marker into the current database.

Since
Archicad 25
Parameters
element[in/out] The desired element will be created in the pointed structure. The element->header.type must specify the type of the element to be created. It can be API_WindowID, API_DoorID, API_CutPlaneID, API_ElevationID, API_InteriorElevationID, API_ChangeMarkerID, API_DetailID, API_WorksheetID, API_CurtainWallID or API_StairID.
memo[in] The memo field of the desired element will be created from the pointed structure (if the memo field is needed).
nSubElems[in] The number of subelems passed.
subElems[in] Subelem / marker related information.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE - The current database is not proper for the operation.
  • APIERR_BADPARS - The element parameter is nullptr, or the element type is invalid, or the element type is not supported by the server application. The elementMarker->header.type is not API_ObjectID.
  • APIERR_REFUSEDPAR - The element->header.type parameter was incorrect. It might happen if you want to create something in a window that is not capable of displaying it, for example, a cut plane in a section window.
  • APIERR_INVALFLOOR - The element->header.floorInd parameter is out of range.
Remarks
The type of the element to be created is defined by the type in the element header. On return, the guid field of the header is filled in. Don't forget to call ACAPI_DisposeElemMemoHdls to dispose of the handles when you don't need them anymore. The meaning of the different parameters is explained in the table below:
element memo elementMarker memoMarker elementMarker2 memoMarker2
API_WindowType
API_DoorType
addpar window/door marker object marker object parameters - -
API_SkylightType addpar window/door marker object marker object parameters - -
API_CutPlaneType cutplane coordinates section marker object on floorplan section marker object parameters story handle marker object on section story handle marker object parameters
API_ChangeMarkerType polygon data (optional) ChangeMarker marker object marker object parameters - -
API_DetailType
API_WorksheetType
polygon data (optional) detail drawing/worksheet marker object marker object parameters - -
For more details and instructions, see the description of ACAPI_Element_Create.

◆ ACAPI_Element_Decompose()

GSErrCode ACAPI_Element_Decompose ( const API_Guid & elemGuid,
API_ElementDecomposerInterface * elementDecomposer )

Enumerates the planes of a Multi-plane Roof.

Parameters
elemGuid[in] Identifier of the element to be decomposed. Currently this must be a PolyRoof element.
elementDecomposer[in] Interface pointer to an object implemented by the caller to be used during the decomposition.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The elementDecomposer pointer is nullptr or the element specified with elemGuid is not PolyRoof type.
  • APIERR_BADID - The elemGuid parameter does not identify a valid element.
Remarks
Use this function to enumerate the planes of a Multi-plane Roof as a set of Single-plane API_RoofType elements. First you need to implement a derived class of API_ElementDecomposerInterface. An object instance of this class should be passed to ACAPI_Element_Decompose to be called back by its GeneratePartElement method.
Example
class PolyRoofConverter : public API_ElementDecomposerInterface {
public:
PolyRoofConverter (const API_Guid& polyRoofGuid);
virtual GSErrCode GeneratePartElement (const API_Guid& guid, const API_ElemPartId& partId,
const API_Element& partElem, const API_ElementMemo& partMemo);
};
// Call decomposition for a given Roof element:
void DecomposeRoof (const API_Guid& roofGuid)
{
API_Element element {};
element.header.guid = roofGuid;
GSErrCode err = ACAPI_Element_Get (&element);
if (err == NoError && element.roof.roofClass == API_PolyRoofID) {
PolyRoofConverter polyRoofConverter (element.header.guid);
err = ACAPI_Element_Decompose (element.header.guid, &polyRoofConverter);
}
}

◆ ACAPI_Element_Delete()

GSErrCode ACAPI_Element_Delete ( const GS::Array< API_Guid > & elemGuids)

Deletes a number of elements.

Parameters
elemGuids[in] This parameter identifies the elements to be deleted.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE - The current database is not proper for the operation.
  • APIERR_MEMFULL - not enough memory to complete the operation
  • APIERR_NOTMINE - The operation attempted to delete an element that belongs to another user. Likely to occur in teamwork mode.
Remarks
You can use this function to delete elements identified by elemGuids. To delete the selected elements, use the ACAPI_Element_DeleteSelected function. In the case there is at least one element which are not allowed to be deleted for some reason, the whole command is terminated. Such cases can be:
  • it is locked,
  • it is on a locked layer,
  • it is part of a group, and the suspend group is OFF
  • it is a subelement of a composite element (Curtain Wall, Stair, or Railing)
  • it is not in the user’s workspace, etc. The following notes are absolutely important:
  • the list of target elements will be automatically extended by the other group members; if there is a group member in the set, and the suspend group is OFF
  • all the linked elements will be deleted; associative labels, dimensions etc. Note that this function is working on the Section/Elevation databases also, which may have references to the plan database; they are called virtual symbols identified by the API_SectElemID element type. From Archicad 6.50 R2/V2, these elements can be deleted directly from the section database, with the limitation that the section window must be the front window.
Example
GSErrCode Do_DeleteSelectedWalls ()
{
return ACAPI_CallUndoableCommand ("Delete selected walls",
[&] () -> GSErrCode {
API_SelectionInfo selectionInfo;
GS::Array<API_Neig> selNeigs;
ACAPI_Selection_Get (&selectionInfo, &selNeigs, true);
BMKillHandle ((GSHandle *)&selectionInfo.marquee.coords);
GS::Array<API_Guid> wallGuids;
for (const API_Neig& neig : selNeigs) {
API_Elem_Head head {};
head.guid = neig.guid;
if (ACAPI_Element_GetHeader (&head) == NoError && head.type == API_WallID)
wallGuids.Push (head.guid);
}
return ACAPI_Element_Delete (wallGuids);
});
}
GSErrCode Do_DeleteSelectedElements ()
{
return ACAPI_CallUndoableCommand ("Delete selected elements",
[&] () -> GSErrCode {
GSErrCode err = ACAPI_Element_DeleteSelected ();
if (err != NoError)
ErrorBeep ("ACAPI_Element_DeleteSelected", err);
return err;
});
}

◆ ACAPI_Element_DeleteSelected()

GSErrCode ACAPI_Element_DeleteSelected ( )

Deletes the selected elements.

Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE - The current database is not proper for the operation.
  • APIERR_MEMFULL - not enough memory to complete the operation
  • APIERR_NOTMINE - The operation attempted to delete an element that belongs to another user. Likely to occur in teamwork mode.
Remarks
You can use this function to delete selected elements. To delete specific elements, use the ACAPI_Element_Delete function. In the case there is at least one element which are not allowed to be deleted for some reason, the whole command is terminated. Such cases can be:
  • it is locked,
  • it is on a locked layer,
  • it is part of a group, and the suspend group is OFF
  • it is a subelement of a composite element (Curtain Wall, Stair, or Railing)
  • it is not in the user’s workspace, etc. The following notes are absolutely important:
  • the list of target elements will be automatically extended by the other group members; if there is a group member in the set, and the suspend group is OFF
  • all the linked elements will be deleted; associative labels, dimensions etc. Note that this function is working on the Section/Elevation databases also, which may have references to the plan database; they are called virtual symbols identified by the API_SectElemID element type. From Archicad 6.50 R2/V2, these elements can be deleted directly from the section database, with the limitation that the section window must be the front window.
Example
GSErrCode Do_DeleteSelectedElements ()
{
return ACAPI_CallUndoableCommand ("Delete selected elements",
[&] () -> GSErrCode {
GSErrCode err = ACAPI_Element_DeleteSelected ();
if (err != NoError)
ErrorBeep ("ACAPI_Element_DeleteSelected", err);
return err;
});
}
GSErrCode Do_DeleteSelectedWalls ()
{
return ACAPI_CallUndoableCommand ("Delete selected walls",
[&] () -> GSErrCode {
API_SelectionInfo selectionInfo;
GS::Array<API_Neig> selNeigs;
ACAPI_Selection_Get (&selectionInfo, &selNeigs, true);
BMKillHandle ((GSHandle *)&selectionInfo.marquee.coords);
GS::Array<API_Guid> wallGuids;
for (const API_Neig& neig : selNeigs) {
API_Elem_Head head {};
head.guid = neig.guid;
if (ACAPI_Element_GetHeader (&head) == NoError && head.type == API_WallID)
wallGuids.Push (head.guid);
}
return ACAPI_Element_Delete (wallGuids);
});
}

◆ ACAPI_Element_DetachObserver()

GSErrCode ACAPI_Element_DetachObserver ( const API_Guid & elemGuid)

Detaches the observer from the given element.

Parameters
elemGuid[in] Identifies the element to detach the observer from.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The referenced element cannot be found in the database.

◆ ACAPI_Element_DrawElement()

GSErrCode ACAPI_Element_DrawElement ( API_Elem_Head * elem_Head,
UInt32 mask )

Shows/draws an existing element.

Parameters
elem_Head[in] Identifies the element to draw/show.
mask[in] Element mask (from floor plan).
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - elem_Head is nullptr.
  • APIERR_BADID - The element is not present in the Archicad database.
  • APIERR_DELETED - The element is deleted.
Remarks
This function draws/shows an element identified by its element header on the floor plan or in the section or detail window. You should fill the guid field.

◆ ACAPI_Element_Edit()

GSErrCode ACAPI_Element_Edit ( GS::Array< API_Neig > * elemNeigs,
const API_EditPars & pars )

Transforms a set of elements.

Parameters
elemNeigs[in-out] An Array of API_Neig objects which enables you to work not only on an element as a whole, but on its internal parts too.
pars[in] The details of the editing operation.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE - The current database is not proper for the operation.
  • 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
  • APIERR_REFUSEDPAR - The edit parameters are incorrect.
  • APIERR_BADPARS - The edit parameters are incorrect.
Remarks
This function transforms a set of elements using the parameters passed in the API_EditPars structure. These parameters identify both the operation code (drag, rotate, mirror, etc.) and the transformation parameters. If elemNeigs is nullptr or empty, then this function works on the selection; otherwise, the set of elements passed will be the target. What elements are transformed in the last case? The elemNeigs array is an API_Neig list which enables you to work on not just a whole element, but on its internal parts as well. If you pass, for example, a neig to a slab hole, only the given hole will be transformed, without touching the base contour of the element. Elements that cannot be edited for some reason are ignored. Such causes can be:
  • it is locked,
  • it is on a locked layer,
  • it is part of a group, and suspend groups is OFF
  • it is not in the user’s workspace, etc. The following notes are absolutely important:
  • the list of target elements will be automatically extended with the other group members; if there is a group member in the set and the suspend groups is OFF
  • all the edited elements keep their unique ID
  • all the inter-element links will be adjusted, including dimensioning also The new element's GUID will be returned for each edited element in the guid field. Note that this function is working on Section/Elevation databases also, which may have references to the plan database; they are called virtual symbols identified by the API_SectElemID element type. From Archicad 6.50 R2/V2, these elements can be edited directly in the section database, with the limitation that the section window must be the front window. You can also change the geometry data of an element with the ACAPI_Element_Change function.

◆ ACAPI_Element_Elem2UIPriority()

GSErrCode ACAPI_Element_Elem2UIPriority ( GS::Int32 * elemPriority,
GS::Int32 * uiPriority )

Returns user interface priority for a building material connection priority.

Parameters
elemPriority[in] The building material's connection priority.
uiPriority[out] The priority as it appers on the user interface.
Returns
  • NoError - The function has completed with success.

◆ ACAPI_Element_ElemHasVisibleSkin()

GSErrCode ACAPI_Element_ElemHasVisibleSkin ( const API_Guid * elemGuid,
const API_StructureDisplay * structure,
bool * result )

Returns if elem has visible skin depending on Partial Structure Display.

Parameters
elemGuid[in] Unique ID of the element.
structure[in] The partial structure display.
result[out] Returns if elem has visible skin.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADID - elemGuid does not refer to a valid element in the database.
  • APIERR_BADPARS - elemGuid or structure or result is nullptr.
Remarks
This function tells if the element has any visible skin when the given partial structure display is in effect.

◆ ACAPI_Element_ElemTypeToNeigID()

GSErrCode ACAPI_Element_ElemTypeToNeigID ( const API_ElemType & elemType,
API_NeigID & neigID )

Returns a neig for the given element type.

Since
Archicad 26
Parameters
elemTypeThe element type.
neigIDOne neig ID for that element type.
Returns
  • NoError - The function has completed with success.
Remarks
This function return a neig ID (a special point) for the given element type. This is useful in some situations, for example element selection, where you have to pass the array of neig IDs of the elements you want to select, but it is not important, which point of the element is given. Note that the element type? neig ID mapping is not a one-to-one, but a one-to-many mapping.

◆ ACAPI_Element_Filter()

bool ACAPI_Element_Filter ( const API_Guid & guid,
API_ElemFilterFlags filterBits,
API_ElemVariationID variationID = APIVarId_Generic,
const API_Guid & renovationFilterGuid = APINULLGuid )

Tests an element by some given criteria.

Parameters
guid[in] Global unique identifier of the element to be tested
filterBits[in] The flags used for filtering (see the table below)
variationID[in] Optional variation ID for objects. Used in combination with APIFilt_IsOfVariation. The default value is APIVarId_Generic.
renovationFilterGuid[in] Optional global unique identifier of the renovation filter. Used in combination with APIFilt_IsVisibleByRenovation. The default value is APINULLGuid.
Returns
  • true - The given element (defined by guid) matches the criteria defined by filterbits
  • false - The referenced element does not pass the criteria
Remarks
Note that the 3D visibility of GDL-based elements can also be modified through GDL parameters, which work independently from the element settings. Due to this, there may be cases where the ACAPI_Element_Filter function shows that an element is visible in 3D, but its GDL script hides it in 3D-based views. Returns true, if the given element matches the criteria defined by filterbits :
filterbits value Checks whether the element Concerned elements
APIFilt_None not filtered
APIFilt_IsEditable is not on a locked/deleted/invisible layer all (for windows, doors and skylights, this tests the layer of the owner element)
APIFilt_OnVisLayer is on a visible layer all (for windows, doors, and skylights this tests the layer of the owner element)
APIFilt_OnActFloor is on the active floor all (always true for cut planes and groups)
APIFilt_In3D has 3D representation API_WallID, API_ColumnID, API_BeamID, API_WindowID, API_DoorID, API_SkylightID, API_ObjectID, API_LampID, API_SlabID, API_RoofID, API_MeshID, API_ShellID, API_CurtainWallID, API_MorphID
APIFilt_InMyWorkspace is in my workspace (in Teamwork mode) all element types
APIFilt_IsIndependent is independent (not a sub elem) API_ObjectID, API_TextID
APIFilt_OnActLayout is on the active layout drawing type elements
APIFilt_InCroppedView is visible inside the cropped part of a drawing database drawing type elements
APIFilt_IsOfVariation tells if the given element has the variation ID passed in the variationID parameter. object type elements
APIFilt_FromFloorplan additional flag; instructs the function to take the element from the floor plan database all element types
APIFilt_HasAccessRight additional flag; checks if the element is accessible for the current user all element types
APIFilt_IsVisibleByRenovation additional flag; checks if the element is visible by the renovation filter passed in the renovationFilterGuid parameter, defaulting to the current renovation filter. all element types
APIFilt_IsOverriddenByRenovation additional flag; checks if the attributes of the element are overridden by the current renovation filter all element types
APIFilt_IsInStructureDisplay additional flag; checks if the element is visible, taking into account the current structure display setting all element types
APIFilt_IsVisibleByDesignOption additional flag; checks if the element is visible by the current Design Options settings all element types
If the value of filterBits is 0, only the existence of the element is checked. This routine helps you quickly test different attributes without converting the whole model, for example, when you walk through all the elements and test for the existence of an element's 3D representation.
Example
GS::Array<API_Guid> elemList;
DBPrintf ("number of lines = %ld,", elemList.GetSize ());
short visible = 0;
short onStory = 0;
short inView = 0;
for (GS::Array<API_Guid>::ConstIterator it = elemList.Enumerate (); it != nullptr; ++it) {
if (ACAPI_Element_Filter (*it, APIFilt_OnVisLayer))
++visible;
if (ACAPI_Element_Filter (*it, APIFilt_OnActFloor))
++onStory;
if (ACAPI_Element_Filter (*it, APIFilt_InCroppedView))
++inView;
}
DBPrintf ("%d visible, %d on the view\'s floor, %d in the cropped view\n", visible, onStory, inView);

◆ ACAPI_Element_Get()

GSErrCode ACAPI_Element_Get ( API_Element * element,
UInt32 mask = 0 )

Returns information on the main parameters of a given element.

Parameters
element[in/out] The element participating in the operation.
mask[in] Optional mask. Currently valid values are 0 and APIElemMask_FloorPlan. In the latter case, the elements in the floor plan database are counted directly, without changing the database first.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The passed parameter is nullptr; element
  • APIERR_BADID - The element reference is invalid (guid). The element type is invalid, or the element type is not supported by the server application
  • APIERR_DELETED - The element does not exist in the database
Remarks
This function returns information on the main parameters of a given element in the API_Element structure, which is a union of the different element structures. There is only one way (from API 18 or later) to identify the element:
  • pass the guid of the element in the element header. The information returned is the main data of the element; further information can be obtained with the ACAPI_Element_GetMemo function, where applicable; the hasMemo field of the header indicates the existence of the extra information. Please use filtering with the ACAPI_Element_Filter function before calling this function; in this case, you can spare the conversion time in certain cases. Please note that the attributes referenced by the element may be invalid. The layer attribute is the only one that must exist. Other types of attributes may be deleted without editing the element database, resulting in elements that refer to missing attributes. In this case, the ACAPI_Attribute_Get function returns an error code.
Example
GSErrCode lastErr;
API_Element element;
GS::Array<API_Guid> columnList;
lastErr = ACAPI_Element_GetElemList (API_ColumnID, &columnList, APIFilt_OnVisLayer | APIFilt_OnActFloor);
if (lastErr != NoError)
return lastErr;
for (GS::Array<API_Guid>::ConstIterator it = columnList.Enumerate (); it != nullptr; ++it) {
element = {};
element.header.guid = *it;
lastErr = ACAPI_Element_Get (&element);
if (lastErr == NoError) {
/* Custom element processing */
}
}

◆ ACAPI_Element_GetActualOverrideStyle()

GSErrCode ACAPI_Element_GetActualOverrideStyle ( const API_Guid & guid_Element,
API_OverrideStyle & elemOverrideStyle )

Get actual (merged) visual override style for an element.

Parameters
guid_Element[in] GUID of the element
elemOverrideStyle[out] Returned actual (merged) visual override style
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The element reference is invalid (guid).

◆ ACAPI_Element_GetClassificationInSystem()

GSErrCode ACAPI_Element_GetClassificationInSystem ( const API_Guid & elemGuid,
const API_Guid & systemGuid,
API_ClassificationItem & item )

Retrieves a classification of an elem in a given classification system.

Parameters
elemGuid[in] The guid of the element.
systemGuid[in] The guid of the classification system in which the classification item should be retrieved.
item[out] The retrieved classification item (empty with null guid if the elem doesn't have a classification in the given system).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element or systemGuid did not refer to a valid classification system.

◆ ACAPI_Element_GetClassificationInSystemDefault()

GSErrCode ACAPI_Element_GetClassificationInSystemDefault ( const API_ElemType & type,
const API_Guid & systemGuid,
API_ClassificationItem & item )

Retrieves a classification of a default elem in a given classification system.

Since
Archicad 26
Parameters
type[in] Type of the default element.
systemGuid[in] The guid of the classification system in which the classification item should be retrieved.
item[out] The retrieved classification item (empty with null guid if the elem doesn't have a classification in the given system).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The type did not refer to a valid default element or systemGuid did not refer to a valid classification system.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.

◆ ACAPI_Element_GetClassificationItems()

GSErrCode ACAPI_Element_GetClassificationItems ( const API_Guid & elemGuid,
GS::Array< GS::Pair< API_Guid, API_Guid > > & systemItemPairs )

Retrieves all of the classifications of an element.

Parameters
elemGuid[in] The guid of the element.
systemItemPairs[out] A list of classification system and classification item guid pairs, that represent the element's classifications.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.

◆ ACAPI_Element_GetClassificationItemsDefault()

GSErrCode ACAPI_Element_GetClassificationItemsDefault ( const API_ElemType & type,
GS::Array< GS::Pair< API_Guid, API_Guid > > & systemItemPairs )

Retrieves all of the classifications of a default elem.

Since
Archicad 26
Parameters
type[in] Type of the default element.
systemItemPairs[out] A list of classification system and classification item guid pairs, that represent the element's classifications.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The type did not refer to a valid default element.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.

◆ ACAPI_Element_GetCollisions()

GSErrCode ACAPI_Element_GetCollisions ( const GS::Array< API_Guid > & guidSet1,
const GS::Array< API_Guid > & guidSet2,
GS::Array< GS::Pair< API_CollisionElem, API_CollisionElem > > & resultArray,
const API_CollisionDetectionSettings & apiColDetSettings )

Returns the collisions between two groups.

Parameters
guidSet1[in] The first group of the comparison.
guidSet2[in] The second group of the comparison.
resultArray[out] The result array of the detected collisions.
apiColDetSettings[in] Collisions detection settings.
Returns
  • APIERR_GENERAL - Couldn't get the collisions.
Remarks
This function is used to detect collisions between two groups. You can find an example for this function in the Element_Test addon.

◆ ACAPI_Element_GetComponents()

GSErrCode ACAPI_Element_GetComponents ( const API_Guid & elemGuid,
GS::Array< API_ElemComponentID > & elemComponents )

Retrieves the components of an element.

Parameters
elemGuid[in] Guid of the element whose components have to be retrieved.
elemComponents[out] The components of the specified element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.
Example
GSErrCode GetElemCompnentCount (const API_Guid& elemGuid, USize& componentCount)
{
GS::Array<API_ElemComponentID> components;
const GSErrCode error = ACAPI_Element_GetComponents (elemGuid, components);
if (error == NoError) {
componentCount = components.GetSize ();
}
return error;
}

◆ ACAPI_Element_GetComponents_Obsolete()

GSErrCode ACAPI_Element_GetComponents_Obsolete ( const API_Elem_Head * elemHead,
API_Obsolete_ComponentRefType *** compRefs,
Int32 * nComp )

Returns the components of the element.

Parameters
elemHead[in] The element whose components you want to obtain.
compRefs[out] List of the components.
nComp[out] Number of the components.
Returns
  • APIERR_BADPARS - compRefs is nullptr or nComp is nullptr.
  • APIERR_BADID - Incorrect elemHead was specified.
  • APIERR_MEMFULL - Not enough memory to get the components.
Remarks
This function is obsolete. Use the new component API instead. This function is used to get information for every component of an element. These components are in the property objects of the element. This applies to all the construction elements.
Example
void GetComponents (const API_Guid& guid)
{
API_Elem_Head elemHead {};
API_ListData listdata;
Int32 nComp, i;
char s[256];
GSErrCode err;
elemHead.guid = guid;
err = ACAPI_Element_GetComponents_Obsolete (&elemHead, &compRefs, &nComp);
if (err == NoError) {
for (i = 0; i < nComp; i++) {
if ((*compRefs)[i].status != APIDBRef_Deleted) {
listdata = {};
listdata.header.index = (*compRefs)[i].index;
listdata.header.setIndex = (*compRefs)[i].setIndex;
switch ((*compRefs)[i].status) {
case APIDBRef_Normal:
err = ACAPI_OldListing_Get (&listdata);
break;
case APIDBRef_Local:
err = ACAPI_OldListing_GetLocal ((*compRefs)[i].libIndex, &elemHead, &listdata);
break;
}
if (err != NoError)
break;
sprintf (s, "Keycode/code: \"%s\"/\"%s\" quantity: %.2f", listdata.component.keycode,
listdata.component.code, (*compRefs)[i].quantity);
ACAPI_WriteReport (s, false);
}
}
BMKillHandle ((GSHandle *) &compRefs);
}
}

◆ ACAPI_Element_GetCompoundInfoString()

GSErrCode ACAPI_Element_GetCompoundInfoString ( const API_Guid * elementGuid,
GS::UniString * infoString )

Returns the compound info string of the given element.

Parameters
elementGuid[in] the Guid of the element
infoString[out] the composite info string of the element
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - any of the parameters is nullptr
  • APIERR_BADID - no element found by the specified Guid
  • APIERR_BADELEMENTTYPE - element has no info string
Remarks
For hotlinked elements the info string is composed of the element's own info string and the hotlink element's info strings it placed via.

◆ ACAPI_Element_GetDefaults()

GSErrCode ACAPI_Element_GetDefaults ( API_Element * element,
API_ElementMemo * memo )

Retrieves the actual default settings for the element of type.

Parameters
element[in/out] The desired element for which the defaults are needed.
memo[out] This is needed only for library part-based elements (including zone stamps).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The passed parameter is nullptr ; element
  • APIERR_BADID - The element type is invalid, or the element type is not supported by the server application
  • APIERR_REFUSEDCMD - The element type is not a valid target for the operation; API_SectElemID
Remarks
This function is used to obtain the actual default settings for an element. The requested type is identified by the type field of the header. The function fills the central part of the API_Element structure with values from the Settings dialog. You have to fill in the geometric information yourself; if you need it. The memo parameter is used only for library part-based elements (including zone stamps), where the params field is filled with the actual parameter values of the referenced Library Part. Do not forget to call the ACAPI_DisposeElemMemoHdls function to dispose of the handles that were obtained. To change the default settings, use the ACAPI_Element_ChangeDefaults function. You can use the returned values to initialize the element attributes and parameters to create a new instance. Refer to the ACAPI_Element_Create function for more details. In order to get the default settings of markered element types (API_WindowType, API_DoorType, API_CutPlaneType, API_ChangeMarkerType, API_DetailType, and API_WorksheetType), use the ACAPI_Element_GetDefaultsExt function instead.
Example
API_Element element {};
GSErrCode err;
element.header.type = API_ObjectID;
element.header.type.variationID = APIVarId_WallEnd;
err = ACAPI_Element_GetDefaults (&element, &memo);
if (err == NoError) {
/* do what you want */
}

◆ ACAPI_Element_GetDefaultsExt()

GSErrCode ACAPI_Element_GetDefaultsExt ( API_Element * element,
API_ElementMemo * memo,
UInt32 nSubElems,
API_SubElement * subElems )

Retrieves the actual default settings for the Window, Door, Section, Elevation, Interior Elevation, ChangeMarker, Detail, Worksheet, or Stair element with its marker(s). You are also able to obtain the Curtain Wall and its sub-element default settings via this function.

Since
Archicad 25
Parameters
element[in/out] The desired element for which the defaults are needed. The element->header.type can be API_WindowID, API_DoorID, API_CutPlaneID, API_ElevationID, API_InteriorElevationID, API_ChangeMarkerID, API_DetailID, API_WorksheetID, API_CurtainWallID, API_CurtainWallPanelID, API_CurtainWallFrameID, API_CurtainWallJunctionID, API_CurtainWallAccessoryID, API_StairID or API_ExternalElemID.
memo[out] This is needed only for library part-based elements (including zone stamps).
nSubElems[out] The subelem of the desired element for which the defaults are needed.
subElems[out] The subelem(s) (normal, story handle, interior elevation common marker) of the desired element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The passed element parameter is nullptr.
  • APIERR_BADID - The element type should be API_WindowID, API_DoorID, API_CutPlaneID, API_ElevationID, API_InteriorElevationID, API_ChangeMarkerID, API_DetailID, API_WorksheetID, API_CurtainWallID, API_CurtainWallFrameID, API_CurtainWallPanelID, API_CurtainWallJunctionID, API_CurtainWallAccessoryID, API_StairID or API_ExternalElemID.
  • APIERR_BADID can be returned in case of API_ExternalElemID, when the function is unsupported for the specified classID.
Remarks
This function is used to obtain the actual default settings for a Window, Door, Section, Elevation, Interior Elevation, ChangeMarker, Detail or Worksheet element, as an alternative of ACAPI_Element_GetDefaults. The requested type is identified by the type field of the header. The function fills the central part of the API_Element structure with values from the Settings dialog. You have to fill in the geometric information yourself if you need it. The memo parameter is used only for library part-based elements (including zone stamps), where the params field is filled with the actual parameter values of the referenced Library Part. Do not forget to call the ACAPI_DisposeElemMemoHdls function to dispose of the handles that were obtained. To change the default settings use the ACAPI_Element_ChangeDefaultsExt function. You can use the returned values to initialize the element attributes and parameters to create a new instance. Refer to the ACAPI_Element_CreateExt function for more details.
Example
API_Element element {};
API_SubElement markers[2] = {{}, {}};
GSErrCode err;
element.header.type = API_CutPlaneID;
markers[0].subType = static_cast<API_SubElementType> (APISubElement_MainMarker | APISubElement_NoParams); // only the element is needed
markers[1].subType = static_cast<API_SubElementType> (APISubElement_SHMarker | APISubElement_NoElem); // only the memo is needed
err = ACAPI_Element_GetDefaultsExt (&element, &memo, 2UL, markers);
if (err == NoError) {
if (markers[1].memo.params != nullptr) {
DBPrintf ("Cut Plane Default: Show Story Level Marker head is %s\n",
((*markers[1].memo.params)[3].value.real > 0.0) ? "ON" : "OFF"); // "marker_head" parameter
}
API_LibPart libPart {};
libPart.index = markers[0].subElem.object.libInd;
if (ACAPI_LibraryPart_Get (&libPart) == NoError) {
DBPrintf ("Section Marker currently selected for Cut Plane Default: \"%s\"\n", (const char *) GS::UniString (libPart.docu_UName).ToCStr ());
}
if (libPart.location != nullptr)
delete libPart.location;
}
ACAPI_DisposeElemMemoHdls (&markers[1].memo);

◆ ACAPI_Element_GetDescriptors()

GSErrCode ACAPI_Element_GetDescriptors ( const API_Elem_Head * elemHead,
API_DescriptorRefType *** descRef,
Int32 * nDesc )

Returns the descriptors of an element.

Parameters
elemHead[in] The element you want to get the descriptors for.
descRef[out] List of the descriptors.
nDesc[out] Number of the descriptors in the list.
Returns
  • APIERR_BADPARS - descRef is nullptr or nDesc is nullptr.
  • APIERR_BADID - Incorrect elemHead was specified.
  • APIERR_MEMFULL - Not enough memory to get the descriptors.
Remarks
This function is used to get information for every descriptor of an element. These descriptors are in the property objects of the element. This applies to all the construction elements.
Example
void GetDiscriptors (const API_Guid& guid)
{
API_Elem_Head elemHead {};
API_ListData listdata;
Int32 nDesc, i;
char s[256];
GSErrCode err;
elemHead.guid = guid;
err = ACAPI_Element_GetDescriptors (&elemHead, &descRefs, &nDesc);
if (err == NoError) {
for (i = 0; i < nDesc; i++) {
listdata.header.index = (*descRefs)[i].index;
listdata.header.setIndex = (*descRefs)[i].setIndex;
if ((*descRefs)[i].status != APIDBRef_Deleted) {
listdata = {};
listdata.header.setIndex = (*descRefs)[i].setIndex;
listdata.header.index = (*descRefs)[i].index;
switch ((*descRefs)[i].status) {
case APIDBRef_Normal:
err = ACAPI_OldListing_Get (&listdata);
break;
case APIDBRef_Local:
err = ACAPI_OldListing_GetLocal ((*descRefs)[i].libIndex, &elemHead, &listdata);
break;
}
}
if (err == NoError) {
sprintf (s, "Keycode/code: \"%s\"/\"%s\"", listdata.descriptor.keycode, listdata.descriptor.code);
ACAPI_WriteReport (s, false);
ACAPI_WriteReport (*(listdata.descriptor.name), false);
}
BMKillHandle (&listdata.descriptor.name);
}
BMKillHandle ((GSHandle *) &descRefs);
}
}

◆ ACAPI_Element_GetElemCreatorToolUnId()

GSErrCode ACAPI_Element_GetElemCreatorToolUnId ( API_Elem_Head * elemHead,
char * unIDStr )

Returns the unique ID of the creator tool of the specified object.

Parameters
elemHead[in] the header or the element (only the guid field is required).
unIDStr[out] the unique ID of the creator tool subtype.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - any of the parameters are nullptr, or the passed handles have wrong sizes.
  • APIERR_BADID - Not a Window, Door, Light or Symbol header was passed, or no element with the specified guid was found.
Remarks
This function is used to get the creator tool of an element. Only elements of type window, door, symbol or light are accepted. The returned string is the unique ID of the template object of the creator tool.

◆ ACAPI_Element_GetElementFromAnywhere()

GSErrCode ACAPI_Element_GetElementFromAnywhere ( const API_Guid * guid,
API_Element * element )

Returns the element referred by guid irrespectively of the current database.

Parameters
guid[in] The referred element.
element[out] The element.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - The guid or element parameter is nullptr.
  • APIERR_NOPLAN - There is no open project.
Remarks
This function is used to get an element irrespectively of the current database. This is a useful function because you don't have to enumerate all database to find the element, switch to it and get the element.

◆ ACAPI_Element_GetElementInfoString()

GSErrCode ACAPI_Element_GetElementInfoString ( const API_Guid * elementGuid,
GS::UniString * infoString )

Returns the compound info string of the given element.

Parameters
elementGuid[in] the Guid of the element
infoString[out] the info string of the element
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - any of the parameters is nullptr
  • APIERR_BADID - no element found by the specified Guid
  • APIERR_BADELEMENTTYPE - element has no info string

◆ ACAPI_Element_GetElementsWithClassification()

GSErrCode ACAPI_Element_GetElementsWithClassification ( const API_Guid & classificationItemGuid,
GS::Array< API_Guid > & elemGuids )

Query elements with the given classification.

Parameters
classificationItemGuid[in] The identifier of the classification item.
elemGuids[out] The identifiers of the elements with the given classification.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The classificationItemGuid did not refer to a valid classification item.

◆ ACAPI_Element_GetElementURLRef()

GSErrCode ACAPI_Element_GetElementURLRef ( API_Elem_Head * elem_Head,
API_ElemURLRef * elemURLRef )

Retrieves the URL reference assigned to an element.

Parameters
elem_Head[in] The element the URL was assigned to.
elemURLRef[out] The URL reference of the element.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - Any of the parameters are nullptr.
  • APIERR_BADINDEX - The element is not present in the Archicad database.
  • APIERR_BADID - The element cannot hold a URL reference.
  • APIERR_DELETED - The element is deleted.
  • APIERR_NOUSERDATA - The element does not hold a URL reference.
Remarks
This function retrieves the URL reference assigned to an element. The same group of elements can hold a URL reference as user data.

◆ ACAPI_Element_GetElemList()

GSErrCode ACAPI_Element_GetElemList ( const API_ElemType & type,
GS::Array< API_Guid > * elemList,
API_ElemFilterFlags filterBits = APIFilt_None,
const API_Guid & renovationFilterGuid = APINULLGuid )

Returns an array of guids of the elements of the given type.

Since
Archicad 26
Parameters
type[in] Element type identifier
elemList[out] List of element Guids collected by the function
filterBits[in] The flags used for filtering (see ACAPI_Element_Filter). The default value is APIFilt_None.
renovationFilterGuid[in] Optional global unique identifier of the renovation filter. Used in combination with APIFilt_IsVisibleByRenovation. The default value is APINULLGuid.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The elemList pointer is nullptr.
Remarks
This function can be used to iterate through elements of the given type and variation that match the criteria defined by filterbits (see the filterbits flag values described in the table of ACAPI_Element_Filter). You may pass API_ZombieElemID as type in order to retrieve all the elements regardless of type. The variationID member in type is used in combination with APIFilt_IsOfVariation From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GS::Array<API_Guid> elemList;
ACAPI_Element_GetElemList (API_LineID, &elemList, APIFilt_OnActFloor);
DBPrintf ("number of lines on the active floor: %ld", elemList.GetSize ());

◆ ACAPI_Element_GetElemTypeName()

GSErrCode ACAPI_Element_GetElemTypeName ( const API_ElemType & elemType,
GS::UniString & elemName )

Returns the localized name of the built-in element types.

Since
Archicad 26
Parameters
elemType[in] The element type
elemName[out] The name of the element type in the language of the Archicad version currently running
Returns
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid element type value.
Remarks
This function retrieves the name of the specified element type in the language the currently running program is localized for.
Example
GS::UniString elemName;
if (ACAPI_Element_GetElemTypeName (elemType, elemName) == NoError)
DBPrintf ("Angle Dimension is called \"%s\"\n", (const char*) elemName.ToCStr ());

◆ ACAPI_Element_GetExtent()

GSErrCode ACAPI_Element_GetExtent ( API_Box * extent,
API_DatabaseUnId * databaseUnId = nullptr )

Returns the drawing extent of the current database.

Parameters
extent[out] The extent box.
databaseUnId[in] Optional parameter; if nullptr, the extent box is returned for the current database considering only the visible elements. If a valid database unique ID is given, then the bounding box of that database is returned, including hidden elements.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - extent is nullptr.
  • APIERR_NOPLAN - No open project.
Remarks
This function gets the drawing extent of the current database. The extent depends on different settings (hidden layers, current story, etc.), and always returns the region that would be shown in case of a "Fit in Window" command.

◆ ACAPI_Element_GetExtent3D()

GSErrCode ACAPI_Element_GetExtent3D ( API_Box3D * extent3D)

Returns the model extent of the current database.

Parameters
extent3D[out] The extent box.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - extent3D is nullptr.
  • APIERR_NOPLAN - No open project.
Remarks
This function returns the model extent of the current database, including the vertical range. The extent depends on different settings (hidden layers, current story, etc.), and always returns the region that would be shown in case of a "Fit in Window" command.

◆ ACAPI_Element_GetHeader()

GSErrCode ACAPI_Element_GetHeader ( API_Elem_Head * elementHead,
UInt32 mask = 0 )

Returns general information on the given element.

Parameters
elementHead[in/out] On input, it identifies the element based on its GUID. On return, the other fields are filled.
mask[in] Optional mask. Currently valid values are 0 and APIElemMask_FloorPlan. In the latter case, the elements in the floor plan database are counted directly, without changing the database first.
Returns
  • NoError - The function has completed successfully.
Remarks
This is a fast version of ACAPI_Element_Get, where only the header fields are returned. There are many cases when you only need information (e.g., layer, story) contained in the element header, but in the past, the server application had to convert the whole element.

◆ ACAPI_Element_GetHotspots()

GSErrCode ACAPI_Element_GetHotspots ( const API_Guid & guid,
GS::Array< API_ElementHotspot > * hotspotArray )

Retrieves the hotspots of the given element.

Parameters
guid[in] Identifier of the element.
hotspotArray[out] Array that contains hotspots (neig and coordinate pairs).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - hotspotArray parameter is nullptr.
  • APIERR_BADID - Invalid guid.
Remarks
This function is used to retrieve the hotspots of the given element. The hotspots return in an array of API_ElementHotspot objects which contain neig and coordinate pairs (GS::Pair < API_Neig, API_Coord3D >).
Example
GS::Array<API_ElementHotspot> hotspotArray;
API_Guid guid = element.header.guid; /* GUID of an element placed on the floorplan */
GSErrCode err = ACAPI_Element_GetHotspots (guid, &hotspotArray);
if (err == NoError && !hotspotArray.IsEmpty ()) {
err = ACAPI_Element_GetDefaults (&element, nullptr);
if (err != NoError)
return;
short ind;
for (ind = 0; ind < (short) hotspotArray.GetSize (); ind++) {
API_Neig neig;
API_Coord3D coord;
hotspotArray[ind].Get (neig, coord);
element.hotspot.pen = ind;
element.hotspot.pos.x = coord.x;
element.hotspot.pos.y = coord.y;
ACAPI_Element_Create (&element, nullptr);
}
}

◆ ACAPI_Element_GetMemo()

GSErrCode ACAPI_Element_GetMemo ( const API_Guid & guid,
API_ElementMemo * memo,
UInt64 mask = APIMemoMask_All )

Retrieves all additional information attached to elements.

Since
Archicad 25
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.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The passed memo parameter is nullptr
  • 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
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_WallID (API_Gable **) gables
(API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(UInt32 **) vertexIDs
(ProfileVectorImage*) customOrigProfile
(ProfileVectorImage*) stretchedProfile
(API_Guid **) wallWindows
(API_Guid **) wallDoors
Returns the gable 1 and the polygon data 2 and the vector image data of the complex cross-section profile 5. May also return the windows and doors in this wall.
API_ColumnID (API_Gable **) gables
(ProfileVectorImage*) customOrigProfile
(ProfileVectorImage*) stretchedProfile
(API_ColumnSegmentType*) columnSegments
(API_AssemblySegmentCutData*) assemblySegmentCuts
(API_AssemblySegmentSchemeData*) assemblySegmentSchemes
(API_AssemblySegmentProfileData*) assemblySegmentProfiles
Returns the gable data 1, the vector image data of the complex cross-section profile 5 and segment related information.
API_BeamID (API_Gable **) gables
(API_Beam_Hole **) beamHoles
(ProfileVectorImage*) customOrigProfile
(ProfileVectorImage*) stretchedProfile
(API_BeamSegmentType*) beamSegments
(API_AssemblySegmentCutData*) assemblySegmentCuts
(API_AssemblySegmentSchemeData*) assemblySegmentSchemes
(API_AssemblySegmentProfileData*) assemblySegmentProfiles
Returns the gable data 1, the vector image data of the complex cross-section profile 5, the holes of the beam, and segment related information.
API_WindowID API_DoorID (API_Gable **) gables
(char **) textContent
(API_AddParType **) params
Returns the gable data 1 and the parameters of the instance of a library part 4, also the window / door orientation text in textContent.
API_ObjectID API_LampID (API_Gable **) gables
(API_AddParType **) params
Returns the gable data 1 and the parameters of the instance of a library part 4
API_SkylightID (API_AddParType **) params Returns the parameters of the instance of a library part 4
API_SlabID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(UInt32 **) vertexIDs
(UInt32 **) edgeIDs
(UInt32 **) contourIDs
(API_EdgeTrim **) edgeTrims
(API_OverriddenAttribute *) sideMaterials
Returns the polygon 2, the edge trim data 3 and the side materials 6 of the slab.
API_RoofID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(UInt32 **) vertexIDs
(API_EdgeTrim **) edgeTrims
(API_RoofEdgeTypeID *) roofEdgeTypes
(API_OverriddenAttribute *) sideMaterials
(API_Coord **) pivotPolyCoords
(Int32 **) pivotPolyPends
(API_PolyArc **) pivotPolyParcs
(UInt32 ** *) pivotPolyVertexIDs
(API_PivotPolyEdgeData *) pivotPolyEdges
- API_PlaneRoofID: Returns the polygon 2, the edge trim data 3 and the side materials 6 of the roof.
- API_PolyRoofID: Returns the contour and pivot polygons 2, the edge trim data 3, the side materials 6 and the data of the pivot polygon edges 9 of the roof.
API_MeshID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(UInt32 **) vertexIDs
(double **) meshPolyZ
(API_MeshLevelCoord **) meshLevelCoords
(Int32 **) meshLevelEnds
Returns the polygon 2 of the mesh, and the level lines
API_ShellID API_ShellShapeData shellShapes[2]
(API_ShellContourData*) shellContours
Returns the profile shape polygon(s) 7 and the clipping and hole contour data 8 of the shell
API_MorphID (Modeler::Body*) morphBody
(API_OverriddenAttribute*) morphMaterialMapTable
Returns the body and the material override map table of the morph
API_DimensionID (API_DimElem **) dimElems Returns the coordinates, the neig information, the text, and the witness line information of the dimension
API_LabelID (char **) textContent
(short **) textLineStarts
(API_ParagraphType **) paragraphs
(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_SplineID (API_Coord **) coords
(API_SplineDir **) bezierDirs
Returns the Bezier curve parameters
API_TextID (char **) textContent
(short **) textLineStarts
(API_ParagraphType **) paragraphs
Returns the content the line starts
(offsets into textContent) and the style information of the text. The content can be either in UTF-8 or UTF-16 encoding, depending on the text element's charCode member and the memo mask.
API_HatchID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(UInt32 **) vertexIDs
Returns the polygon of the hatch
API_ZoneID (API_Gable **) gables
(API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(API_AddParType **) params
Returns the polygon of the room 2
API_CameraID (API_LinkType **) linkList Returns the data of the camera
API_CutPlaneID (API_Coord **) sectionSegmentMainCoords
(API_Coord **) sectionSegmentDistCoords
(API_Coord **) sectionSegmentDepthCoords
Returns the coordinates of the main, amrked distant area, and depth line of the section segment.
API_ElevationID (API_Coord **) sectionSegmentMainCoords
(API_Coord **) sectionSegmentDistCoords
(API_Coord **) sectionSegmentDepthCoords
Returns the coordinates of the main, amrked distant area, and depth line of the section segment.
API_InteriorElevationID (API_SectionSegment **) intElevSegments
(API_Coord **) sectionSegmentMainCoords
(API_Coord **) sectionSegmentDistCoords
(API_Coord **) sectionSegmentDepthCoord
(API_AddParType **) params
Returns the coordinates of the main, marked distant area, and depth line of the section segment, and also the parameters of the common marker.
API_ChangeMarkerID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
Returns the polygon of the ChangeMarker 2, if it has a polygon.
API_DetailID API_WorksheetID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
Returns the polygon of the detail or worksheet 2
API_PolyLineID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
Returns the polygon of the polyline 2
API_PictureID (char **) pictHdl Returns the picture
API_DrawingID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(GSPtr) drawingData
Returns the polygon and drawing data of a drawing element
API_CurtainWallID (API_Coord **) coords
(Int32 **) pends
(API_PolyArc **) parcs
(UInt32 **) vertexIDs
(API_CWSegmentPatternData) cWSegPrimaryPattern
(API_CWSegmentPatternData) cWSegSecondaryPattern
(API_CWSegmentPatternCellData*) cWSegPatternCells
(API_CWSegmentType*) cWallSegments
(API_CWFrameType*) cWallFrames
(API_CWFrameType*) cWallFrameDefaults
(API_CWPanelType*) cWallPanels
(API_CWPanelGridIDTable*) cWallPanelGridIDTable
(API_CWPanelType*) cWallPanelDefaults
(API_CWPanelType*) cWallPanelDefaultSymbs
(API_CWJunctionType*) cWallJunctions
(API_CWAccessoryType*) cWallAccessories
Returns the polygon and all CW related data. cWSegPrimaryPattern, cWSegSecondaryPattern and cWSegPatternCells members will contain the default segment scheme of the curtain wall.
API_CurtainWallSegmentID (API_GridMesh*) cWSegGridMesh
(API_CWContourData*) cWSegContour
(API_CWSegmentPatternData) cWSegPrimaryPattern
(API_CWSegmentPatternData) cWSegSecondaryPattern
(API_CWSegmentPatternCellData*) cWSegPatternCells
Returns the CW segment related data.
API_CurtainWallPanelID (API_Coord **) coords Returns the coordinates of the panel's polygon. Please note that a curtain wall panel cannot contain holes.
API_StairID (API_StairRiserType*) stairRisers
(API_StairTreadType*) stairTreads
(API_StairStructureType*) stairStructures
(API_StairBoundaryData[2]) stairBoundary
Returns the Stair related data.
API_RailingID (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.
API_ExternalElemID (API_AddParType **) params Returns the parameters of the instance of a library part 4

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 the sideMaterials memo array is (poly.nCoords+1)*sizeof(API_OverriddenAttribute) ; the first and the last record are not used, filled with zero.
7 Fixed size array of two API_ShellShapeData records. The members of API_ShellShapeData are handled similarly to the members of API_Polygon.
8 The number of API_ShellContourData records in the shellContours memo array can be calculated from the API_ShellType parameters: numHoles+(hasContour?1:0).
9 The length of the pivotPolyEdges memo array is (pivotPolygon.nCoords+1)*sizeof(API_PivotPolyEdgeData); the first and the last record are not used, filled with zero. The mask parameter allows you to select which data is needed to improve performance. This feature provides filtered access to the attached data; instead of converting all the attached data, the function returns only those that are relevant. 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 an ANSI string for textual elements (Text, Label). (This is the default.)
APIMemoMask_Paragraph Returns paragraph information for textual elements (Text, Label). The paragraphs handle contains byte offsets. Use with APIMemoMask_TextContent mask. (This is the default.)
APIMemoMask_TextContentUni Returns the content as a Unicode string for textual elements (Text, Label). You should cast the textContent handle to unsigned short **
APIMemoMask_ParagraphUni Returns paragraph information for textual elements (Text, Label). The paragraphs handle contains character offsets. Use with APIMemoMask_TextContentUni mask.
APIMemoMask_DrawingData Returns the drawing data of a drawing element (API_DrawingType) in internal format. See also ACAPI_Drawing_StopDrawingData.
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 the curtain wall segment.
APIMemoMask_CWSegContour Returns the contour of the curtain wall segment.
APIMemoMask_CWallSegments Returns the segments of the curtain wall element.
APIMemoMask_CWallFrames Returns the frames of the curtain wall element.
APIMemoMask_CWallPanels Returns the panels of the curtain wall element.
APIMemoMask_CWallJunctions Returns the junctions of the curtain wall element.
APIMemoMask_CWallAccessories Returns the accessories of the 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 Top rails 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 {};
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_Element_GetMemo_ExternalHierarchical()

GSErrCode ACAPI_Element_GetMemo_ExternalHierarchical ( const API_Guid & guid,
std::vector< API_SubElement > & subElems,
UInt64 mask = APIMemoMask_All )

Retrieves all additional information of the sub-elements of an external hierarchical element.

Since
Archicad 27
Parameters
guid[in] Guid of the external hierarchical element.
subElems[out] The subelem(s) of the desired element.
mask[in] Specifies which part of the memo you are interested in.
Returns
  • NoError - The function has completed successfully.
  • 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

◆ ACAPI_Element_GetMoreQuantities()

GSErrCode ACAPI_Element_GetMoreQuantities ( const GS::Array< API_Guid > * elemGuids,
const API_QuantityPar * params,
GS::Array< API_Quantities > * quantities,
const API_QuantitiesMask * mask = nullptr )

Returns information on the quantities parameters of multiple elements of the same type.

Parameters
elemGuids[in] Guids of the elements.
params[in] Input parameters.
quantities[Out] Optional quantity parameters, one in the array for each Guid.
mask[In] Optional parameter for masking the relevant fields of quantities (by default it is nullptr).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - Either elemGuids or quantities is nullptr, quantities does not have the same size as elemGuids, or mask is nullptr and either elements or composites field is nullptr in quantities.
  • APIERR_BADID - Incorrect elemGuids was specified.
Remarks
This function is used to get the quantity parameters of multiple elements of the same type. The quantities are: surface, volume, perimeter, length, and several other parameters. This applies to all construction elements. The elemGuids and the quantities arrays need to have the same size.
Example
API_ElementQuantity quantity {};
GS::Array<API_Quantities> quantities;
GS::Array<API_Guid> elemGuids;
char s[256] = { '\0' };
GSErrCode err;
ACAPI_ELEMENT_QUANTITY_MASK_SET (mask, wall, surface1);
ACAPI_ELEMENT_QUANTITY_MASK_SET (mask, wall, volume);
quantities.SetSize (1);
quantities[0].elements = &quantity;
elemGuids.Push (elemGuid);
params.minOpeningSize = EPS;
err = ACAPI_Element_GetMoreQuantities (&elemGuids, &params, &quantities, &mask);
if (!err) {
sprintf (s, "surface1: %.2lf volume: %.2lf", quantity.wall.surface1, quantity.wall.volume);
ACAPI_WriteReport (s, true);
}

◆ ACAPI_Element_GetOpeningTransformation()

GSErrCode ACAPI_Element_GetOpeningTransformation ( const API_Guid * elemGuid,
API_Tranmat * openingTranMat )

Returns the position and the normal vector of the given opening.

Parameters
elemGuid[in] The opening element's GUID.
openingTranMat[out] The global → local transformation matrix of the opening.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The openingTranMat parameter is nullptr.
  • APIERR_DELETED - The elemGuid doesn't point to a valid element.
  • APIERR_BADID - The elemGuid doesn't point to a valid opening.
  • APIERR_GENERAL - The transformation matrix cannot be calculated.
Remarks
The transformation matrix may result in a left-handed coordinate system if the opening is mirrored.

◆ ACAPI_Element_GetPropertyDefinitions() [1/2]

GSErrCode ACAPI_Element_GetPropertyDefinitions ( const API_ElemComponentID & elemComponent,
API_PropertyDefinitionFilter filter,
GS::Array< API_PropertyDefinition > & propertyDefinitions )

Retrieves all of the property definitions that are available for a component of an element.

Parameters
elemComponent[in] The identifier of the element's component to search for.
filter[in] Filter the list of property definitions (API_PropertyDefinitionFilter_UserDefined, API_PropertyDefinitionFilter_BuiltIn, API_PropertyDefinitionFilter_All).
propertyDefinitions[out] Array of property definitions that are available for the given component.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The value of elemComponent did not refer to a valid component.
Example
GSErrCode GetPropertyDefinitionNames (const API_ElemComponentID& elemComponent, GS::Array<GS::UniString>& names)
{
GS::Array<API_PropertyDefinition> definitions;
const GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemComponent, API_PropertyDefinitionFilter_All, definitions);
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
names.Push (definitions[i].name);
}
}
return error;
}

◆ ACAPI_Element_GetPropertyDefinitions() [2/2]

GSErrCode ACAPI_Element_GetPropertyDefinitions ( const API_Guid & elemGuid,
API_PropertyDefinitionFilter filter,
GS::Array< API_PropertyDefinition > & propertyDefinitions )

Retrieves all of the property definitions that are available for an element.

Parameters
elemGuid[in] The element's identifier to search for.
filter[in] Filter the list of property definitions (API_PropertyDefinitionFilter_UserDefined, API_PropertyDefinitionFilter_BuiltIn, API_PropertyDefinitionFilter_All).
propertyDefinitions[out] Array of property definitions that are available for a classification of the given element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.
Example
GSErrCode GetPropertyDefinitionNames (const API_Guid& elemGuid, GS::Array<GS::UniString>& names)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
names.Push (definitions[i].name);
}
}
return error;
}

◆ ACAPI_Element_GetPropertyDefinitionsOfDefaultElem()

GSErrCode ACAPI_Element_GetPropertyDefinitionsOfDefaultElem ( const API_ElemType & type,
API_PropertyDefinitionFilter filter,
GS::Array< API_PropertyDefinition > & definitions )

Retrieves all of the property definitions that are available for an element default.

Since
Archicad 26
Parameters
type[in] Type of the default element.
filter[in] The property definition type to filter for.
definitions[out] Array of property definitions that are available for a classification of the given element default.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - Incorrect type was specified.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetPropertyDefinitionNames (const API_ElemType& type, GS::Array<GS::UniString>& names)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); i++) {
names.Push(definitions[i].name);
}
}
return error;
}

◆ ACAPI_Element_GetPropertyObjects() [1/2]

GSErrCode ACAPI_Element_GetPropertyObjects ( const API_Elem_Head & elemHead,
std::vector< API_PropertyObjectRefType > & propRefs )

Returns property objects of the element.

Parameters
elemHead[in] The element to get the properties for.
propRefs[out] List of property objects.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - Incorrect elemHead was specified
  • APIERR_MEMFULL - Not enough memory to get the properties
Remarks
This function is used to get the list of property objects for a linked element. The properties can be associated with construction elements by criteria or by individual direct assignment. This applies to all construction elements. From Archicad 9 the linked properties of both an element instance and the element defaults can be accessed with two new functions: ACAPI_ElementLink_GetLinkedPropertyObjects and ACAPI_ElementLink_SetLinkedPropertyObjects.
Example
void GetProperties (const API_Guid& guid)
{
API_Elem_Head elemHead {};
std::vector<API_PropertyObjectRefType> propRefs;
API_LibPart libPart;
char s[256];
GSErrCode err;
elemHead.guid = guid;
err = ACAPI_Element_GetPropertyObjects (elemHead, propRefs);
if (err == NoError) {
for (const API_PropertyObjectRefType& elem : propRefs) {
libPart = {};
libPart.index = elem.libIndex;
err = ACAPI_LibraryPart_Get (&libPart);
if (err == NoError) {
if (elem.assign)
sprintf (s, "Associated property:");
else
sprintf (s, "Property by criteria:");
sprintf (s, "%s %s", s, (const char *) GS::UniString (libPart.docu_UName).ToCStr ());
ACAPI_WriteReport (s, false);
}
}
}
}

◆ ACAPI_Element_GetPropertyObjects() [2/2]

GSErrCode ACAPI_Element_GetPropertyObjects ( const API_Elem_Head * elemHead,
API_PropertyObjectRefType *** propRefs,
Int32 * nProp )

Returns property objects of the element.

Deprecated
This function is deprecated and will be removed in future versions. Use ACAPI_Element_GetPropertyObjects(const API_Elem_Head&, std::vector<API_PropertyObjectRefType>&) instead.
Parameters
elemHead[in] The element to get the properties for.
propRefs[out] List of property objects.
nProp[out] Number of the property objects.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - propRefs or nProp is nullptr
  • APIERR_BADID - Incorrect elemHead was specified
  • APIERR_MEMFULL - Not enough memory to get the properties
Remarks
This function is used to get the list of property objects for a linked element. The properties can be associated with construction elements by criteria or by individual direct assignment. This applies to all construction elements. From Archicad 9 the linked properties of both an element instance and the element defaults can be accessed with two new functions: ACAPI_ElementLink_GetLinkedPropertyObjects and ACAPI_ElementLink_SetLinkedPropertyObjects.

◆ ACAPI_Element_GetPropertyValue() [1/2]

GSErrCode ACAPI_Element_GetPropertyValue ( const API_ElemComponentID & elemComponent,
const API_Guid & propertyDefinitionGuid,
API_Property & property )

Retrieves the specified property definition's value from the component.

Parameters
elemComponent[in] The identifier of the element's component to search for.
propertyDefinitionGuid[in] The property definition to get the values for.
property[out] The value of the requested property.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemComponent did not refer to a valid component.
  • APIERR_GENERAL - The propertyDefinitionGuid did not refer to a valid property definition.
Example
GSErrCode GetPropertyValue (const API_ElemComponentID& elemComponent, API_PropertyValue& value)
{
GS::Array<API_PropertyDefinition> definitions;
GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemComponent, API_PropertyDefinitionFilter_All, definitions);
if (error == NoError && !definitions.IsEmpty ()) {
API_Property property {};
error = ACAPI_Element_GetPropertyValue (elemComponent, definitions[0].guid, property);
if (error == NoError) {
value = property.value;
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValue() [2/2]

GSErrCode ACAPI_Element_GetPropertyValue ( const API_Guid & elemGuid,
const API_Guid & propertyDefinitionGuid,
API_Property & property )

Retrieves the specified property definition's value from the element.

Parameters
elemGuid[in] The element GUID to search for.
propertyDefinitionGuid[in] The property definition to get the values for.
property[out] The value of the requested property.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.
  • APIERR_GENERAL - The propertyDefinitionGuid did not refer to a valid property definition.
Example
GSErrCode GetPropertyValue (const API_Guid& elemGuid, API_PropertyValue& value)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
API_Property property {};
error = ACAPI_Element_GetPropertyValue (elemGuid, definitions[0].guid, property);
if (error == NoError) {
value = property.value;
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValueOfDefaultElem()

GSErrCode ACAPI_Element_GetPropertyValueOfDefaultElem ( const API_ElemType & type,
const API_Guid & propertyDefinitionGuid,
API_Property & property )

Retrieves the value of the specified property definition.

Since
Archicad 26
Parameters
type[in] Type of the default element.
propertyDefinitionGuid[in] The property definition's GUID to get the value for.
property[out] The value of the requested property.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - Incorrect type was specified.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetPropertyValue (const API_ElemType& type, API_PropertyValue& value)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError && definitions.GetSize () > 0) {
API_Property property {};
error = ACAPI_Element_GetPropertyValueOfDefaultElem (type, definitions[0].guid, property);
if (error == NoError) {
value = property.value;
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValues() [1/2]

GSErrCode ACAPI_Element_GetPropertyValues ( const API_ElemComponentID & elemComponent,
const GS::Array< API_PropertyDefinition > & propertyDefinitions,
GS::Array< API_Property > & properties )

Retrieves the values of the specified property definitions from the component.

Parameters
elemComponent[in] The identifier of the element's component to search for.
propertyDefinitions[in] The property definitions to get the values for.
properties[out] The definitions and values of the requested properties.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemComponent did not refer to a valid element.
Example
GSErrCode GetAllPropertyValues (const API_ElemComponentID& elemComponent, GS::Array<API_PropertyValue>& values)
{
GS::Array<API_PropertyDefinition> definitions;
GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemComponent, API_PropertyDefinitionFilter_All, definitions);
if (error == NoError) {
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValues (elemComponent, definitions, properties);
if (error == NoError) {
for (UInt32 i = 0; i < properties.GetSize (); i++) {
if (properties[i].isDefault) {
values.Push (properties[i].definition.defaultValue.basicValue);
} else {
values.Push (properties[i].value);
}
}
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValues() [2/2]

GSErrCode ACAPI_Element_GetPropertyValues ( const API_Guid & elemGuid,
const GS::Array< API_PropertyDefinition > & propertyDefinitions,
GS::Array< API_Property > & properties )

Retrieves the specified property definitions with values.

Parameters
elemGuid[in] The element GUID to search for.
propertyDefinitions[in] The property definitions to get the values for. They are identified through definition.guid.
properties[out] The definitions and values of the requested properties.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.
Example
GSErrCode GetAllPropertyValues (const API_Guid& elemGuid, GS::Array<API_PropertyValue>& values)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValues (elemGuid, definitions, properties);
if (error == NoError) {
for (UInt32 i = 0; i < properties.GetSize (); i++) {
if (properties[i].isDefault) {
values.Push (properties[i].definition.defaultValue.basicValue);
} else {
values.Push (properties[i].value);
}
}
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValuesByGuid() [1/2]

GSErrCode ACAPI_Element_GetPropertyValuesByGuid ( const API_ElemComponentID & elemComponent,
const GS::Array< API_Guid > & propertyDefinitions,
GS::Array< API_Property > & properties )

Retrieves the specified property definitions (defined by their GUIDs) with values from the component.

Parameters
elemComponent[in] The identifier of the element's component to search for.
propertyDefinitions[in] The property definition GUIDs to get the values for.
properties[out] The definitions and values of the requested properties.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemComponent did not refer to a valid element.
Example
GSErrCode GetAllPropertyValues (const API_ElemComponentID& elemComponent, GS::Array<API_PropertyValue>& values)
{
GS::Array<API_PropertyDefinition> definitions;
GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemComponent, API_PropertyDefinitionFilter_UserDefined, definitions);
if (error == NoError) {
GS::Array<API_Guid> propertyDefinitionGuids;
for (UInt32 i = 0; i < definitions.GetSize (); i++) {
propertyDefinitionGuids.Push (definitions[i].guid);
}
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValuesByGuid (elemComponent, propertyDefinitionGuids, properties);
if (error == NoError) {
for (UInt32 i = 0; i < properties.GetSize (); i++) {
if (properties[i].isDefault) {
values.Push (properties[i].definition.defaultValue.basicValue);
} else {
values.Push (properties[i].value);
}
}
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValuesByGuid() [2/2]

GSErrCode ACAPI_Element_GetPropertyValuesByGuid ( const API_Guid & elemGuid,
const GS::Array< API_Guid > & propertyDefinitions,
GS::Array< API_Property > & properties )

Retrieves the specified property definitions (defined by their GUIDs) with values.

Parameters
elemGuid[in] The element GUID to search for.
propertyDefinitions[in] The property definition GUIDs to get the values for.
properties[out] The definitions and values of the requested properties.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.
Example
GSErrCode GetAllPropertyValues (const API_Guid& elemGuid, GS::Array<API_PropertyValue>& values)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
GS::Array<API_Guid> propertyDefinitionList;
for (const API_PropertyDefinition& definition : definitions) {
if (ACAPI_Element_IsPropertyDefinitionVisible (elemGuid, definition.guid)) {
propertyDefinitionList.Push (definition.guid);
}
}
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValuesByGuid (elemGuid, propertyDefinitionList, properties);
if (error == NoError) {
for (const API_Property& property : properties) {
if (property.isDefault) {
values.Push (property.definition.defaultValue.basicValue);
} else {
values.Push (property.value);
}
}
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValuesOfDefaultElem()

GSErrCode ACAPI_Element_GetPropertyValuesOfDefaultElem ( const API_ElemType & type,
const GS::Array< API_PropertyDefinition > & propertyDefinitions,
GS::Array< API_Property > & properties )

Retrieves the values of the specified property definitions.

Since
Archicad 26
Parameters
type[in] Type of the default element.
propertyDefinitions[in] The property definitions (identified by definition.guid) to get the values for.
properties[out] The definitions and values of the requested properties.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - Incorrect type was specified.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetAllPropertyValues (const API_ElemType& type, GS::Array<API_PropertyValue>& values)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValuesOfDefaultElem (type, definitions, properties);
if (error == NoError) {
for (UInt32 i = 0; i < properties.GetSize (); i++) {
if (properties[i].isDefault) {
values.Push (properties[i].definition.defaultValue.basicValue);
} else {
values.Push (properties[i].value);
}
}
}
}
return error;
}

◆ ACAPI_Element_GetPropertyValuesOfDefaultElemByGuid()

GSErrCode ACAPI_Element_GetPropertyValuesOfDefaultElemByGuid ( const API_ElemType & type,
const GS::Array< API_Guid > & propertyDefinitionGuids,
GS::Array< API_Property > & properties )

Retrieves the values of the specified property definitions.

Since
Archicad 26
Parameters
type[in] Type of the default element.
propertyDefinitionGuids[in] The property definition GUIDs to get the values for.
properties[out] The definitions and values of the requested properties.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - Incorrect type was specified.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetAllPropertyValuesByGuid (const API_ElemType& type, GS::Array<API_PropertyValue>& values)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
GS::Array<API_Guid> propGuids;
for (UInt32 i = 0; i < definitions.GetSize (); i++) {
propGuids.Push (definitions[i].guid);
}
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValuesOfDefaultElemByGuid (type, propGuids, properties);
if (error == NoError) {
for (UInt32 i = 0; i < properties.GetSize (); i++) {
if (properties[i].isDefault) {
values.Push (properties[i].definition.defaultValue.basicValue);
} else {
values.Push (properties[i].value);
}
}
}
}
return error;
}

◆ ACAPI_Element_GetQuantities()

GSErrCode ACAPI_Element_GetQuantities ( API_Guid elemGuid,
const API_QuantityPar * params,
API_Quantities * quantities,
const API_QuantitiesMask * mask = nullptr )

Returns information on the quantities parameters of an element.

Parameters
elemGuid[in] Guid of the element.
params[in] Input parameters.
quantities[Out] Optional quantity parameters.
mask[In] Optional parameter for masking the relevant fields of quantities (by default it is nullptr).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - quantities is nullptr, or mask is nullptr and either elements or composites field is nullptr in quantities.
  • APIERR_BADID - Incorrect elemGuid was specified.
Remarks
This function is used to get the quantity parameters of an element. The quantities are: surface, volume, perimeter, length, and several other parameters. This applies to all construction elements.
Example
API_Quantities quantities;
char s[256] = { '\0' };
GSErrCode err;
ACAPI_ELEMENT_QUANTITY_MASK_SET (mask, wall, surface1);
ACAPI_ELEMENT_QUANTITY_MASK_SET (mask, wall, volume);
quantities.elements = &quantity;
params.minOpeningSize = EPS;
err = ACAPI_Element_GetQuantities (elemGuid, &params, &quantities, &mask);
if (!err) {
sprintf (s, "surface1: %.2lf volume: %.2lf", quantity.wall.surface1, quantity.wall.volume);
ACAPI_WriteReport (s, true);
}

◆ ACAPI_Element_GetRelations()

GSErrCode ACAPI_Element_GetRelations ( const API_Guid & guid,
const API_ElemType & otherType,
void * relData,
UInt32 mask = 0 )

Returns information on objects connected to walls, beams, beam segments, rooms, shells, roofs, curtain wall panels, skylights, windows, and doors.

Since
Archicad 26
Parameters
guid[in] Guid of the element.
otherType[in] Type of the requested element.
relData[out] The relation data returned by the function. This pointer must refer to an API_WallRelation, API_BeamRelation, API_BeamSegmentRelation, API_RoomRelation, API_RoofRelation, API_ShellRelation, API_SkylightRelation, API_WindowRelation, or an API_DoorRelation structure according to the type of the requested element given by the guid parameter.
mask[in] Optional mask. Currently valid values are 0 and APIElemMask_FromFloorplan. In the latter case, the element referred to by guid is searched in the floor plan database.
Returns
  • NoError - The operation was successful.
  • APIERR_BADPARS - The relData parameter was nullptr, or the otherID parameter is incorrect.
  • APIERR_BADID - Incorrect guid was specified.
  • APIERR_DELETED - The element does not exist in the database
Remarks
This function returns information on elements connected to the element identified by the given guid. The requested object type is given in otherType.
Type of the given element otherID Comment
walls API_ZombieElemID, API_WallID For walls, the connected elements and the modified polygon are put into relData. Positive indices mean that the beginning point of the other object is connected to the wall, while negative indices mean the end point. Five types of connections are returned: walls which are connected to the beginning point, to the end point, and to the reference line of the wall, walls to the reference line of whose the wall you requested information on is connected, and cross connections.
rooms API_ZombieElemID, API_WallID, API_ColumnID, API_ObjectID, API_LampID, API_WindowID API_DoorID, API_BeamID, API_CurtainWallID, API_CurtainWallFrameID, API_CurtainWallPanelID, API_CurtainWallJunctionID, API_CurtainWallAccessoryID, API_CurtainWallSegmentID, API_SkylightID, API_RoofID, API_ShellID, API_MorphID, API_StairID, API_RiserID, API_TreadID, API_StairStructureID, API_RailingID, API_RailingToprailID, API_RailingHandrailID, API_RailingRailID, API_RailingPostID, API_RailingInnerPostID, API_RailingBalusterID, API_RailingPanelID, API_RailingSegmentID, API_RailingToprailEndID, API_RailingHandrailEndID, API_RailingRailEndID, API_RailingToprailConnectionID, API_RailingHandrailConnectionID, API_RailingRailConnectionID, API_RailingNodeID or API_SlabID For rooms, the walls, columns, objects, lamps, windows, doors, beams, curtain walls, skylights, roofs, shells, morphs, stairs, risers, treads, railings and slabs are returned. For walls, beams, and curtain wall segments, the returned information contains that segment of the wall which is inside the room (see API_WallPart / API_CWSegmentPart and API_BeamPart).
beams API_ZombieElemID or API_BeamID For beams, the connected elements and the modified polygon are put into relData. Positive indices mean that the beginning point of the other object is connected to the beam, while negative indices mean the end point. Five types of connections are returned: beams which are connected to the beginning point, to the end point, and to the reference line of the beam, beams to the reference line of whose beam you requested information on is connected, and cross connections.
beam segments API_ZombieElemID or API_BeamSegmentID For beam segments, the connected elements and the modified polygon are put into relData. Positive indices mean that the beginning point of the other object is connected to the beam segment, while negative indices mean the end point. Five types of connections are returned: beam segments that are connected to the beginning point, to the end point, and to the reference line of the beam segment, beam segments to the reference line of which the beam segment you requested information on is connected, and cross connections.
curtain wall panels and skylights API_ZombieElemID or API_ZoneID For curtain wall panels and skylights, the connected rooms are put into relData.
windows and doors API_ZombieElemID or API_ZoneID For windows and doors, the connected rooms are put into relData.
roof and shell API_ZombieElemID or API_ZoneID For roof and shell, the connected rooms are put into rooms.
Don't forget to call the appropriate ACAPI_DisposeRoomRelationHdls, ACAPI_DisposeWallRelationHdls, ACAPI_DisposeBeamRelationHdls, or ACAPI_DisposeBeamSegmentRelationHdls function to dispose the handles. From version 26 the otherTypeID parameter was changed into an API_ElemType parameter.
Example
// API_WallRelation example
GS::Array<API_Guid> elemList;
for (const API_Guid& wallGuid : elemList) {
if (ACAPI_Element_GetRelations (wallGuid, API_WallID, (void*)& relData) != NoError)
continue;
ACAPI_WriteReport ("Connected walls to the wall %s", false, APIGuidToString (wallGuid).ToCStr ().Get ());
if (relData.conBeg != nullptr) {
ACAPI_WriteReport ("\tat the begin point:", false);
for (Int32 ind = 0; ind < relData.nConBeg; ind++) {
ACAPI_WriteReport ("\t\t#%ld ", false, (*(relData.conBeg))[ind]);
}
}
if (relData.conEnd != nullptr) {
ACAPI_WriteReport ("\tat the end point:", false);
for (Int32 ind = 0; ind < relData.nConEnd; ind++) {
ACAPI_WriteReport ("\t\t#%d", false, (*(relData.conEnd))[ind]);
}
}
if (relData.conRef != nullptr) {
ACAPI_WriteReport ("\ton the reference line not at the end points:", false);
for (Int32 ind = 0; ind < relData.nConRef; ind++) {
ACAPI_WriteReport ("\t\t#%d", false, (*(relData.conRef))[ind]);
}
}
if (relData.con != nullptr) {
ACAPI_WriteReport ("\ton the reference line:", false);
for (Int32 ind = 0; ind < relData.nCon; ind++) {
ACAPI_WriteReport ("\t\t#%d", false, (*(relData.con))[ind]);
}
}
if (relData.conX != nullptr) {
ACAPI_WriteReport ("\thaving intersection with:", false);
for (Int32 ind = 0; ind < relData.nConX; ind++) {
ACAPI_WriteReport ("\t\t#%d", false, (*(relData.conX))[ind]);
}
}
}
// API_RoomRelation example
elemList.Clear ();
for (const API_Guid& roomGuid : elemList) {
if (ACAPI_Element_GetRelations (roomGuid, API_ZombieElemID, (void*)& roomData) != NoError)
continue;
ACAPI_WriteReport ("Connected elems to the room %s", false, APIGuidToString (roomGuid).ToCStr ().Get ());
ACAPI_WriteReport ("\tWalls:", false);
if (roomData.elementsGroupedByType.ContainsKey (API_WallID)) {
for (const API_Guid& wallGuid : roomData.elementsGroupedByType[API_WallID]) {
ACAPI_WriteReport ("\t\t%s", false, APIGuidToString (wallGuid).ToCStr ().Get ());
}
}
ACAPI_WriteReport ("\tSlabs:", false);
if (roomData.elementsGroupedByType.ContainsKey (API_SlabID)) {
for (const API_Guid& slabGuid : roomData.elementsGroupedByType[API_SlabID]) {
ACAPI_WriteReport ("\t\t%s", false, APIGuidToString (slabGuid).ToCStr ().Get ());
}
}
}

◆ ACAPI_Element_GetRoomImage()

GSErrCode ACAPI_Element_GetRoomImage ( API_RoomImage * roomImage)

Returns the image of the given room.

Parameters
roomImage[in/out] The API_RoomImage object containing the parameters for the image and the output generated image.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - The roomImage parameter or the contained (roomImage->nativeImagePtr) is nullptr.
  • APIERR_BADID - The given GUID (roomImage->roomGuid) is invalid.
Remarks
For example code please see the Goodie_Functions example Add-On.

◆ ACAPI_Element_GetSkylightHolePolygon()

GSErrCode ACAPI_Element_GetSkylightHolePolygon ( const API_Guid * skylightGuid,
Geometry::Polygon2D * holePoly )

Returns the polygon data of a Skylight hole contour.

Parameters
skylightGuid[in] Identifier of the Skylight element.
holePoly[out] Polygon data of the hole contour.
Returns
  • NoError - The function has completed with success.
  • APIERR_NOPLAN - There is no active plan database.
  • APIERR_BADPARS - skylightGuid or holePoly is nullptr.
  • APIERR_BADINDEX - skylightGuid does not refer to a valid element in the database.
  • APIERR_REFUSEDPAR - The element specified with skylightGuid is not Skylight type.
Remarks
This function is used to get the contour polygon of a Skylight hole in absolute coordinates, projected to the horizontal plane. (Note that currently this is not the actual hole contour but the four corner points of the Skylight element). No need to dispose the allocated data of the Geometry::Polygon2D nor the Geometry::MultiPolygon2D.
Example
static GSErrCode AddSkylightHolesToRoofPolygon (Geometry::Polygon2DData& polygon2DData, const GS::Array<API_Guid>& skylights)
{
Geometry::MultiPolygon2D multi;
Geometry::ConvertPolygon2DDataToPolygon2D (multi, polygon2DData);
Geometry::Polygon2D polygon2D = multi.PopLargest ();
for (UIndex i = 0; i < skylights.GetSize (); i++) {
Geometry::Polygon2D holePoly;
if (ACAPI_Element_GetSkylightHolePolygon (&skylights[i], &holePoly) == NoError) {
Geometry::MultiPolygon2D resultPolys = polygon2D.Substract (holePoly);
if (!resultPolys.IsEmpty ()) {
polygon2D = resultPolys.PopLargest ();
}
}
}
Geometry::FreePolygon2DData (&polygon2DData);
Geometry::ConvertPolygon2DToPolygon2DData (polygon2DData, polygon2D);
return NoError;
} // AddSkylightHolesToRoofPolygon

◆ ACAPI_Element_GetSurfaceQuantities()

GSErrCode ACAPI_Element_GetSurfaceQuantities ( const GS::Array< API_Guid > * elemGuids,
const GS::Array< API_Guid > * coverElemGuids,
GS::Array< API_ElemPartSurfaceQuantity > * quantities )

Returns information of the given elements surfaces.

Parameters
elemGuids[in] Array of elem guids, to calculate surface information.
coverElemGuids[in] Array of elem guids to consider as cover elems, when calculating visible surfaces areas.
quantities[out] Calculated surface information will be pushed into this array, in the same order as in elemGuids.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - Either elemGuids or coverElemGuids or quantities is nullptr
Remarks
This function is used to get surface information for one or more elements, mainly surface area. When calculating the surface area, you can specify which elements are considered as cover elements. The area where a cover element overlaps the given element will be reduced from the whole surface of the element.
Example
char s[256] = { '\0' };
GS::Array<API_Guid> elemGuids = GetWallGuids ();
GS::Array<API_Guid> coverElemGuids = GetSlabGuids ();
GS::Array<API_ElemPartSurfaceQuantity> elemPartSurfaces;
GSErrCode err = ACAPI_Element_GetSurfaceQuantities (&elemGuids, &coverElemGuids, &elemPartSurfaces);
if (err == NoError) {
for (UInt32 i = 0; i < elemPartSurfaces.GetSize (); i++) {
sprintf (s, "Visible area of %s without the parts covered by slabs is %.2lf", APIGuidToString (elemGuids[i]).ToCStr ().Get (), elemPartSurfaces[i].exposedSurface);
ACAPI_WriteReport (s, true);
}
}

◆ ACAPI_Element_GetSyTran()

GSErrCode ACAPI_Element_GetSyTran ( const API_Elem_Head * elemHead,
API_SyTran * syTran )

Obtains the transformation parameters of an actual instance of a library part.

Parameters
elemHead[in] Identifies the element. Its type should be API_WindowID, API_DoorID, API_ObjectID, API_LampID, or API_ZoneID.
syTran[out] The function returns the transformation parameters here.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The syTran parameter was nullptr.
  • APIERR_BADID - The element reference is invalid; elemHead->guid.
  • APIERR_DELETED - The element does not exist in the database
  • APIERR_GENERAL - The element reference is invalid; elemHead->guid.
Remarks
This function can get the transformation parameters of an actual instance of a library part (the type should be API_WindowID, API_DoorID, API_ObjectID, API_LampID, or API_ZoneID). The transformation parameters are not easy to calculate and keep up-to-date, so this function helps you obtain this information.

◆ ACAPI_Element_GetTextLineLength()

GSErrCode ACAPI_Element_GetTextLineLength ( API_TextLinePars * textLinePars,
double * length )

Returns the length of a line of text in mms.

Parameters
textLinePars[in] parameters of the text to be measured
length[out] the length of the text
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - one or both of the parameters are nullptr
Remarks
The index field of textLinePars determines the behavior of the function.
index Behavior
-1 No line terminator; this is the last line of the text.
0 Line terminators are in the text; measure the whole string in textLinePars->lineStr.
> 0 Length of the line with the specified index.

The textLinePars->drvScaleCorr field determines whether any drawing scale correction is applied.

◆ ACAPI_Element_GetTextSizeFactor()

GSErrCode ACAPI_Element_GetTextSizeFactor ( short * api_fontID,
double * textSizeFactor )

Returns the ratio of the font capital size and typography size.

Parameters
api_fontID[in] Font attribute index.
textSizeFactor[out] The ratio of the font capital size and typographical size.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Any of the parameters are nullptr.
Remarks
Archicad uses the capital font size. This function is used to determine the ratio of the font capital size and typographical size.

◆ ACAPI_Element_GetUserData()

GSErrCode ACAPI_Element_GetUserData ( API_Elem_Head * elemHead,
API_ElementUserData * userData,
UInt32 mask = 0 )

Obtains the user data attached to an element or an element default.

Parameters
elemHead[in] Identifies the element or element default (only the type field and guid are used).
userData[in/out] Pointer to the user data.
mask[in] Optional mask. Currently valid values are 0 and APIElemMask_FloorPlan. In the latter case, the elements in the floor plan database are counted directly, without changing the database first.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - The passed parameter is nullptr; userData
  • APIERR_BADID - The elemHead is incorrect.
  • APIERR_NOUSERDATA - No user data attached to the given signature
Remarks
This function is used to get the user's attached data from an element or from an element's default. To obtain data from the element default, only elemHead->type is necessary, and elemHead->guid should be APINULLGuid. To obtain data from an element, only elemHead->guid is necessary, and it should be set to the element's guid. Use the ACAPI_Element_SetUserData functions to push data into the element record. You can read more about this topic in the Save data into Element records paper.
Example
//------------------------------------------------------------
// Obtain user data from wall default element
//------------------------------------------------------------
GSErrCode GetUserDataFromWallDefaultElem (CustomData** data)
{
API_Elem_Head wallDefault {};
wallDefault.type = API_WallID;
API_ElementUserData userData {};
GSErrCode err = ACAPI_Element_GetUserData (&wallDefault, &userData);
if (err == NoError && userData.dataHdl != nullptr && userData.platformSign == GS::Act_Platform_Sign)
*data = reinterpret_cast<CustomData*>(*userData.dataHdl);
BMKillHandle (&userData.dataHdl);
return NoError;
}
//------------------------------------------------------------
// Obtain user data from an element identified by guid
//------------------------------------------------------------
GSErrCode GetUserDataFromElem (const API_Guid selectedElemGuid, CustomData** data)
{
API_Elem_Head element {};
element.guid = selectedElemGuid;
API_ElementUserData userData {};
GSErrCode err = ACAPI_Element_GetUserData (&element, &userData);
if (err == NoError && userData.dataHdl != nullptr && userData.platformSign == GS::Act_Platform_Sign)
*data = reinterpret_cast<CustomData*>(*userData.dataHdl);
BMKillHandle (&userData.dataHdl);
return NoError;
}

◆ ACAPI_Element_InstallElementObserver()

GSErrCode ACAPI_Element_InstallElementObserver ( APIElementEventHandlerProc * handlerProc)

Installs an element observer function which receives notifications on elements' changes.

Parameters
handlerProc[in] The callback procedure to call when notifications are sent out on changes of elements. Specifying nullptr here means you don't need the notifications any more.
Returns
  • NoError - The function completed successfully.
Remarks
This function is used to register/unregister an add-on which wants to monitor the changes in elements. This is a common callback for all the different element observers which can be attached to an element with ACAPI_Element_AttachObserver. After registration your add-on's handlerProc you will be called when any of the monitored elements change. For more details see also the Element related notifications paragraph of the Notification Manager.
Example
#define ELEMSTR_LEN 256
bool GetElementTypeString (const API_ElemType& type, char *elemStr)
{
GS::UniString ustr;
GSErrCode err = ACAPI_Element_GetElemTypeName (type, ustr);
if (err == NoError) {
CHTruncate (ustr.ToCStr (), elemStr, ELEMSTR_LEN - 1);
return true;
}
return false;
}
// -----------------------------------------------------------------------------
// Element observer callback function
// -----------------------------------------------------------------------------
static GSErrCode ElementEventHandler (const API_NotifyElementType *elemType)
{
GSErrCode err = NoError;
char msgStr[256];
char elemStr[32];
API_Element parentElement {};
ACAPI_Notification_GetParentElement (&parentElement, nullptr, 0, nullptr);
switch (elemType->notifID) {
if (parentElement.header.guid != APINULLGuid && GetElementTypeString (elemType->elemHead.type, elemStr)) {
sprintf (msgStr, "### Element_Manager: %s #%s copied from #%s",
elemStr, APIGuidToString (elemType->elemHead.guid).ToCStr ().Get (),
APIGuidToString (parentElement.header.guid).ToCStr ().Get ());
}
break;
default:
break;
}
if (err == NoError)
ACAPI_WriteReport (msgStr, false);
return err;
}
// -----------------------------------------------------------------------------
// Called after the Add-On has been loaded into memory
// -----------------------------------------------------------------------------
GSErrCode Initialize ()
{
// catch changes in the selection
return ACAPI_Element_InstallElementObserver (ElementEventHandler);
}

◆ ACAPI_Element_IsClassificationItemVisible()

bool ACAPI_Element_IsClassificationItemVisible ( const API_Guid & elemGuid,
const API_Guid & classificationGuid )

Tells whether a classification item is visible for an element.

Parameters
elemGuid[in] The element GUID to search for.
classificationGuid[in] The classification item GUID to search for.
Returns
  • true - The given classification item is visible for the element. It can return true even if the parent of the classification item is hidden.
  • false - The given classification item is not visible for the element or invalid parameters.
Example
GSErrCode GetVisibleClassificationItems (const API_Guid& elemGuid, GS::Array<GS::Pair<API_Guid, API_Guid>>& visibleClassifications)
{
GS::Array<GS::Pair<API_Guid, API_Guid>> systemItemPairs;
GSErrCode error = ACAPI_Element_GetClassificationItems (APINULLGuid, systemItemPairs);
if (error == NoError) {
for (UInt32 i = 0; i < systemItemPairs.GetSize (); ++i) {
if (ACAPI_Element_IsClassificationItemVisible (elemGuid, systemItemPairs[i].second)) {
visibleClassifications.Push (systemItemPairs[i]);
}
}
}
return error;
}

◆ ACAPI_Element_IsClassificationItemVisibleDefault()

bool ACAPI_Element_IsClassificationItemVisibleDefault ( const API_ElemType & type,
const API_Guid & classificationGuid )

Tells whether a classification item is visible for an element default.

Since
Archicad 26
Parameters
type[in] Type of the default element.
classificationGuid[in] The classification item GUID to search for.
Returns
  • true - The given classification item is visible for the element default. It can return true even if the parent of the classification item is hidden.
  • false - The given classification item is not visible for the element default or invalid parameters.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetVisibleClassificationItems (const API_ElemType& type, GS::Array<GS::Pair<API_Guid, API_Guid>>& visibleClassifications)
{
GS::Array<GS::Pair<API_Guid, API_Guid>> systemItemPairs;
GSErrCode error = ACAPI_Element_GetClassificationItems (APINULLGuid, systemItemPairs);
if (error == NoError) {
for (UInt32 i = 0; i < systemItemPairs.GetSize (); ++i) {
if (ACAPI_Element_IsClassificationItemVisibleDefault (type, systemItemPairs[i].second)) {
visibleClassifications.Push (systemItemPairs[i]);
}
}
}
return error;
}

◆ ACAPI_Element_IsPropertyDefinitionAvailable()

bool ACAPI_Element_IsPropertyDefinitionAvailable ( const API_Guid & elemGuid,
const API_Guid & propertyGuid )

Tells whether a property definition is available for an element.

Parameters
elemGuid[in] The element GUID to search for.
propertyGuid[in] The property definition GUID to search for.
Returns
  • true - The given property definition is available for the element.
  • false - The given property definition is not available for the element.
Example
GSErrCode GetAvailablePropertyDefinitions (const API_Guid& elemGuid, GS::Array<API_PropertyDefinition>& availableProperties)
{
GS::Array<API_PropertyDefinition> definitions;
GSErrCode error = ACAPI_Property_GetPropertyDefinitions (APINULLGuid, definitions);
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
if (ACAPI_Element_IsPropertyDefinitionAvailable (elemGuid, definitions[i].guid)) {
availableProperties.Push (definitions[i]);
}
}
}
return error;
}

◆ ACAPI_Element_IsPropertyDefinitionAvailableDefault()

bool ACAPI_Element_IsPropertyDefinitionAvailableDefault ( const API_ElemType & type,
const API_Guid & propertyGuid )

Tells whether a property definition is available for an element default.

Since
Archicad 26
Parameters
type[in] Type of the default element.
propertyGuid[in] The property definition GUID to search for.
Returns
  • true - The given property definition is available for the element default.
  • false - The given property definition is not available for the element default.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetAvailablePropertyDefinitions (const API_ElemType& type, GS::Array<API_PropertyDefinition>& availableProperties)
{
GS::Array<API_PropertyDefinition> definitions;
GSErrCode error = ACAPI_Property_GetPropertyDefinitions (APINULLGuid, definitions);
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
if (ACAPI_Element_IsPropertyDefinitionAvailableDefault (type, definitions[i].guid)) {
availableProperties.Push (definitions[i]);
}
}
}
return error;
}

◆ ACAPI_Element_IsPropertyDefinitionValueEditable()

bool ACAPI_Element_IsPropertyDefinitionValueEditable ( const API_Guid & elemGuid,
const API_Guid & propertyGuid )

Tells whether the value of the property can be modified for the specified element. If the elemGuid argument is APINULLGuid, it tells whether the property definition's default value is editable.

Parameters
elemGuid[in] The element GUID to search for. It can be APINULLGuid; in this case, the property definition's default value is checked.
propertyGuid[in] The property definition GUID to search for.
Returns
  • true - The value of the property, or the property definition's default value can be modified.
  • false - The value of the property, or the property definition's default value cannot be modified. For example, it is a read-only property, or a User Defined property with expression, which has cyclic property references.
Example
GSErrCode GetEditablePropertyDefinitions (const API_Guid& elemGuid, GS::Array<API_PropertyDefinition>& editableProperties)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
if (ACAPI_Element_IsPropertyDefinitionValueEditable (elemGuid, definitions[i].guid)) {
editableProperties.Push (definitions[i]);
}
}
}
return error;
}

◆ ACAPI_Element_IsPropertyDefinitionValueEditableDefault()

bool ACAPI_Element_IsPropertyDefinitionValueEditableDefault ( const API_ElemType & type,
const API_Guid & propertyGuid )

Tells whether the value of the property can be modified for the specified tool default.

Since
Archicad 26
Parameters
type[in] Type of the default element.
propertyGuid[in] The property definition GUID to search for.
Returns
  • true - The value of the property can be modified.
  • false - The value of the property cannot be modified. For example, it is a read-only property, or a User Defined property with expression, which has cyclic property references.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetAvailablePropertyDefinitions (const API_ElemType& type, GS::Array<API_PropertyDefinition>& editableProperties)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
if (ACAPI_Element_IsPropertyDefinitionValueEditableDefault (type, definitions[i].guid)) {
editableProperties.Push (definitions[i]);
}
}
}
return error;
}

◆ ACAPI_Element_IsPropertyDefinitionVisible()

bool ACAPI_Element_IsPropertyDefinitionVisible ( const API_Guid & elemGuid,
const API_Guid & propertyGuid )

Tells whether a property definition is visible for an element.

Parameters
elemGuid[in] The element GUID to search for.
propertyGuid[in] The property definition GUID to search for.
Returns
  • true - The given property definition is visible for the element.
  • false - The given property definition is not visible for the element.
Example
GSErrCode GetVisiblePropertyDefinitions (const API_Guid& elemGuid, GS::Array<API_PropertyDefinition>& visibleProperties)
{
GS::Array<API_PropertyDefinition> definitions;
GSErrCode error = ACAPI_Property_GetPropertyDefinitions (APINULLGuid, definitions);
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
if (ACAPI_Element_IsPropertyDefinitionVisible (elemGuid, definitions[i].guid)) {
visibleProperties.Push (definitions[i]);
}
}
}
return error;
}

◆ ACAPI_Element_IsPropertyDefinitionVisibleDefault()

bool ACAPI_Element_IsPropertyDefinitionVisibleDefault ( const API_ElemType & type,
const API_Guid & propertyGuid )

Tells whether a property definition is visible for an element default.

Since
Archicad 26
Parameters
type[in] Type of the default element.
propertyGuid[in] The property definition GUID to search for.
Returns
  • true - The given property definition is visible for the element default.
  • false - The given property definition is not visible for the element default.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode GetVisiblePropertyDefinitions (const API_ElemType& type, GS::Array<API_PropertyDefinition>& visibleProperties)
{
GS::Array<API_PropertyDefinition> definitions;
GSErrCode error = ACAPI_Property_GetPropertyDefinitions (APINULLGuid, definitions);
if (error == NoError) {
for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
if (ACAPI_Element_IsPropertyDefinitionVisibleDefault (type, definitions[i].guid)) {
visibleProperties.Push (definitions[i]);
}
}
}
return error;
}

◆ ACAPI_Element_Merge_Elements()

GSErrCode ACAPI_Element_Merge_Elements ( const GS::Array< API_Guid > & guid_ElementsToMerge)

Merge elements given in the array.

Parameters
guid_ElementsToMerge[in] Array of GUIDs of the elements to merge.
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADPARS - Invalid value passed in the guid_ElementsToMerge parameter.
  • APIERR_BADELEMENTTYPE - There is element in the array, which is not construction element type.
Remarks
This function merges elements given in the array.
Example
void Do_Merge_Elements (void)
{
API_SelectionInfo selectionInfo;
GS::Array<API_Neig> selNeig;
API_Element element;
// Get selection
GSErrCode err = ACAPI_Selection_Get (&selectionInfo, &selNeig, true);
if (err != NoError && err != APIERR_NOSEL) {
ErrorBeep ("ACAPI_Selection_GetInfo", err);
return;
}
BMKillHandle ((GSHandle *) &selectionInfo.marquee.coords);
GS::Array<API_Guid> guid_ElementsToMerge;
for (Int32 i = 0; i < selectionInfo.sel_nElemEdit; i++) {
// Get selected element
element = {};
element.header.guid = selNeig[i].guid;
if (ACAPI_Element_Get (&element) != NoError)
continue;
API_ElemType tmpType = element.header.type;
API_Guid tmpGuid = element.header.guid;
if (tmpType == API_SectElemID) {
tmpType = element.sectElem.parentType;
tmpGuid = element.sectElem.parentGuid;
}
guid_ElementsToMerge.Push (tmpGuid);
}
BMKillHandle ((GSHandle *) &selNeig);
if (!guid_ElementsToMerge.IsEmpty ()) {
GSErrCode err = ACAPI_Element_Merge_Elements (guid_ElementsToMerge);
if (err != NoError) {
if (err == APIERR_NO3D)
WriteReport_Alert ("Elements To Merge can be construction elements only.");
else
WriteReport_Alert ("ACAPI_Element_Merge_Elements failed: %d", err);
}
} else {
WriteReport_Alert ("There are no selected construction elements!\n");
}
return;
}

◆ ACAPI_Element_Merge_GetMergedElements()

GSErrCode ACAPI_Element_Merge_GetMergedElements ( const API_Guid & guid_Element,
GS::Array< API_Guid > * guid_MergedElements )

Get the merged elements of the given element in the array.

Parameters
guid_Element[in] The element GUID.
guid_MergedElements[out] Array of GUIDs of the elements are merged with the given element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADPARS - Invalid value passed in the guid_Element parameter.
  • APIERR_BADELEMENTTYPE - The given element is not construction element.
Remarks
This function gets elements are merged with the given element.
Example
GSErrCode Do_GetMergedElements (const API_Guid& guid_Element)
{
GSErrCode err = NoError;
GS::Array<API_Guid> guid_MergedElements;
err = ACAPI_Element_Merge_GetMergedElements (guid_Element, &guid_MergedElements);
if (err != NoError)
return err;
for (UIndex i = 0; i < guid_MergedElements.GetSize (); i++) {
char str[256];
sprintf (str, " Element: %s is merged with Element: %s",
(const char *) APIGuid2GSGuid (guid_Element).ToUniString ().ToCStr (),
(const char *) APIGuid2GSGuid (guid_MergedElements [i]).ToUniString ().ToCStr ());
WriteReport (str);
}
return err;
}

◆ ACAPI_Element_Merge_Remove()

GSErrCode ACAPI_Element_Merge_Remove ( const API_Guid & guid_Element1,
const API_Guid & guid_Element2 )

Remove the merge connection from the given elements.

Parameters
guid_Element1[in] The first element GUID.
guid_Element2[in] The second element GUID.
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADELEMENTTYPE - One of the elements is not construction element type.
Remarks
This function removes merge connection between the elements.
Example
void Do_Merge_Remove (void)
{
API_ElemType typeID1;
API_Guid guid_Element1;
if (!ClickAnElem ("Click on a construction element to remove the connection!", API_ZombieElemID, nullptr, &typeID1, &guid_Element1)) {
WriteReport_Alert ("No element was clicked.");
return;
}
API_Element tmpElement {};
tmpElement.header.guid = guid_Element1;
if (ACAPI_Element_Get (&tmpElement) != NoError) {
WriteReport_Alert ("No element was clicked.");
return;
}
typeID1 = tmpElement.header.type;
guid_Element1 = tmpElement.header.guid;
if (typeID1 == API_SectElemID) {
typeID1 = tmpElement.sectElem.parentType;
guid_Element1 = tmpElement.sectElem.parentGuid;
}
API_ElemType typeID2;
API_Guid guid_Element2;
if (!ClickAnElem ("Click on a second construction element to remove the connection with the first!", API_ZombieElemID, nullptr, &typeID2, &guid_Element2)) {
WriteReport_Alert ("No element was clicked.");
return;
}
tmpElement = {};
tmpElement.header.guid = guid_Element2;
if (ACAPI_Element_Get (&tmpElement) != NoError) {
WriteReport_Alert ("No element was clicked.");
return;
}
typeID2 = tmpElement.header.type;
guid_Element2 = tmpElement.header.guid;
if (typeID2 == API_SectElemID) {
typeID2 = tmpElement.sectElem.parentType;
guid_Element2 = tmpElement.sectElem.parentGuid;
}
GSErrCode err = ACAPI_Element_Merge_Remove (guid_Element1, guid_Element2);
if (err != NoError) {
if (err == APIERR_NO3D)
WriteReport_Alert ("Only construction elements have merge connection!");
else
WriteReport_Alert ("ACAPI_Element_Merge_Remove failed: %d", err);
}
return;
}

◆ ACAPI_Element_NeigIDToElemType()

GSErrCode ACAPI_Element_NeigIDToElemType ( API_NeigID neigID,
API_ElemType & elemType )

Returns the element type assigned to a neig.

Since
Archicad 26
Parameters
neigID[in] neig identifier
elemType[out] element type identifier
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - any of the parameters are nullptr
  • APIERR_BADID - Invalid neigID has been passed
Remarks
This function is used to convert a neig identifier to element type. Refer to the API_NeigID structure to get information how neigs are assigned to elements.

◆ ACAPI_Element_NeigToCoord()

GSErrCode ACAPI_Element_NeigToCoord ( API_Neig * neig,
API_Coord3D * coord3D,
API_Coord3D * coord3DDocument = nullptr )

Returns the coordinate of a neig.

Parameters
neig[in] neig data
coord3D[out] coordinate assigned to the passed neig
coord3DDocument[out] coordinate over a 3D Document window
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - any of the parameters are nullptr
  • APIERR_BADID - Invalid neigID has been passed
Remarks
This function is used to convert neig to coordinate. Refer to the API_NeigID structure to get information how neigs are assigned to the element geometry.

◆ ACAPI_ELEMENT_QUANTITIES_MASK_CLEAR()

void ACAPI_ELEMENT_QUANTITIES_MASK_CLEAR ( API_QuantitiesMask & mask)
inline

Clears the mask for querying quantities.

Parameters
maskthe quantity mask to clear

◆ ACAPI_ELEMENT_QUANTITIES_MASK_SETFULL()

void ACAPI_ELEMENT_QUANTITIES_MASK_SETFULL ( API_QuantitiesMask & mask)
inline

Set the mask to full (return all quantities) for querying quantities.

Parameters
maskthe quantity mask to fill fully

◆ ACAPI_ELEMENT_QUANTITY_MASK_CLEAR()

void ACAPI_ELEMENT_QUANTITY_MASK_CLEAR ( API_QuantitiesMask & mask)
inline

Clears the element part of the mask for querying element quantities.

Parameters
maskthe quantity mask to clear

◆ ACAPI_ELEMENT_QUANTITY_MASK_SETFULL()

void ACAPI_ELEMENT_QUANTITY_MASK_SETFULL ( API_QuantitiesMask & mask)
inline

Set the element part of the mask to full (return all quantities) for querying element quantities.

Parameters
maskthe quantity mask to fill the element part fully

◆ ACAPI_Element_RefreshElement()

GSErrCode ACAPI_Element_RefreshElement ( API_Elem_Head * elemHead,
bool * force )

Rebuilds (refreshes) a library part instance.

Parameters
elemHead[in] Identifies the element to refresh.
force[in] Force rebuild for GDL-based elements (run parameter script).
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - elemHead is nullptr.
  • APIERR_BADINDEX - The element is not present in the Archicad database.
  • APIERR_DELETED - The element is deleted.
Remarks
This function refreshes (rebuilds) a library part instance identified by its element header on the floor plan or in the section or detail window. This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

◆ ACAPI_Element_RemoveClassificationItem()

GSErrCode ACAPI_Element_RemoveClassificationItem ( const API_Guid & elemGuid,
const API_Guid & itemGuid )

Removes a classification from an element.

Parameters
elemGuid[in] The identifier of the element whose classification should be removed.
itemGuid[in] The guid of the classification item, that should be removed from the element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element or itemGuid did not refer to a valid classification item.
  • APIERR_BADPARS - The element did not have the specified classification.
  • APIERR_READONLY - The element can not be modified (i.e. from a hotlink) or you do not have the right to remove classifications from elements in the current teamwork plan.

◆ ACAPI_Element_RemoveClassificationItemDefault()

GSErrCode ACAPI_Element_RemoveClassificationItemDefault ( const API_ElemType & type,
const API_Guid & itemGuid )

Removes a classification from an element.

Since
Archicad 26
Parameters
type[in] Type of the default element.
itemGuid[in] The guid of the classification item, that should be removed from the element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The type did not refer to a valid default element or itemGuid did not refer to a valid classification item.
  • APIERR_BADPARS - The element did not have the specified classification.
  • APIERR_READONLY - The element can not be modified (i.e. from a hotlink) or you do not have the right to remove classifications from elements in the current teamwork plan.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.

◆ ACAPI_Element_RoomReductions()

GSErrCode ACAPI_Element_RoomReductions ( const API_Guid * guid,
RoomReductionPolyProc * roomReductionPolyProc )

Returns reduction data assigned to a room in the current database.

Parameters
guid[in] The referenced zone GUID identifier.
roomReductionPolyProc[in] Callback function to export reduction information.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - Any of the parameters are nullptr.
  • APIERR_NESTING - The function is called from the body of a RoomReductionPolyProc.
  • APIERR_BADID - The zone reference is invalid.
  • APIERR_DELETED - The zone is deleted.
Remarks
Zones have very complex relationships to other elements. This function makes it easy to find which elements may reduce the zone area and how. These elements may be walls, columns, hatches, gables, and others. Overlapping areas are returned by only one of them (see image below).
Room reduction polygon
The reduction polygons can be obtained by the RoomReductionPolyProc callback function.
Example
static void RoomRedCallBack (const API_RoomReductionPolyType *roomRed)
{
char s[32];
switch (roomRed->type) {
case APIRoomReduction_Rest: sprintf (s, "Rest"); break;
case APIRoomReduction_Wall: sprintf (s, "Wall"); break;
case APIRoomReduction_Column: sprintf (s, "Column"); break;
case APIRoomReduction_Hatch: sprintf (s, "Hatch"); break;
case APIRoomReduction_Gable: sprintf (s, "Gable"); break;
}
ACAPI_WriteReport (s, false);
/* draw polygon by roomRed->nCoords, roomRed->coords, ... */
BMKillHandle ((GSHandle*) &roomRed->coords);
BMKillHandle ((GSHandle*) &roomRed->subPolys);
BMKillHandle ((GSHandle*) &roomRed->arcs);
return;
}
GSErrCode err = ACAPI_Element_RoomReductions (&element.header.guid, RoomRedCallBack);

◆ ACAPI_Element_SearchElementByCoord()

GSErrCode ACAPI_Element_SearchElementByCoord ( const API_ElemSearchPars * elemSearchPars,
API_Guid * foundElement )

Searches for an element by coordinate.

Parameters
elemSearchPars[in] Parameters for searching.
foundElement[out] GUID of the found element.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - elemSearchPars is nullptr or foundElement is nullptr, or no element is found matching the given parameters.
  • APIERR_REFUSEDPAR - The element to be searched is not a polygonal element.
Remarks
This function searches for a polygonal element by coordinate. Refer to the API_ElemSearchPars for parameterization and more details. The GUID was moved from the third parameter to the second.
Example
API_Guid guid;
API_ElemSearchPars searchPars {};
searchPars.type = API_MeshID;
searchPars.filterBits = APIFilt_OnVisLayer | APIFilt_OnActFloor;
searchPars.loc.x = 1.0;
searchPars.loc.y = 3.0;
searchPars.z = BiggestDouble;

◆ ACAPI_Element_SetElementURLRef()

GSErrCode ACAPI_Element_SetElementURLRef ( API_Elem_Head * elemHead,
API_ElemURLRef * elemURLRef )

Assigns a URL reference to an element.

Parameters
elemHead[in] The element to assign the URL to.
elemURLRef[in] The URL reference of the element.
Returns
  • NoError - The function completed successfully.
  • APIERR_BADPARS - Any of the parameters are nullptr.
  • APIERR_BADINDEX - The element is not present in the Archicad database.
  • APIERR_BADID - The element cannot hold a URL reference.
  • APIERR_DELETED - The element is deleted.
  • APIERR_MOREUSER - The element already holds a URL reference.
Remarks
This function assigns a URL reference to an Archicad database element. The same group of elements can hold a URL reference as user data.

◆ ACAPI_Element_SetEmptyHoleUnId()

GSErrCode ACAPI_Element_SetEmptyHoleUnId ( GSType * signature,
const char * emptyHoleUnIdStr,
const char * emptyOpeningSubtypeUnIDStr )

Sets the unique ID of the empty hole.

Parameters
signature[in] A four-character identifier of this library part subtype.
emptyHoleUnIdStr[in] The unique ID string of this library part subtype.
emptyOpeningSubtypeUnIDStr...
Returns
  • NoError - The function has completed with success.
  • APIERR_NOTSUPPORTED - The root type is not window or door.
Remarks
This function is used to set the unique ID of the empty hole. It works only on window or door subtype.
Example
//------------------------------------------------------
// Called after the Add-On has been loaded into memory
//------------------------------------------------------
GSErrCode Initialize (void)
{
GSErrCode err;
GSType signature = APIVarId_CornerWindow;
char emptyHoleUnIdStr[128];
err = ACAPI_LibraryPart_GetBuiltInLibpartUnId ((short) 133, emptyHoleUnIdStr);
char openingUnIdStr[128];
err = ACAPI_LibraryPart_GetBuiltInLibpartUnId ((short) 134, openingUnIdStr);
err = ACAPI_Element_SetEmptyHoleUnId (&signature, emptyHoleUnIdStr, openingUnIdStr);
return err;
}

◆ ACAPI_Element_SetProperties()

GSErrCode ACAPI_Element_SetProperties ( const API_Guid & elemGuid,
const GS::Array< API_Property > & properties )

Sets the specified properties for the given values on an element.

Parameters
elemGuid[in] The element GUID to search for.
properties[in] Specifies the properties to be set.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.
  • APIERR_NOACCESSRIGHT - The current user does not have the right to modify the properties of the specified element on a teamwork server.
  • APIERR_READONLY - Tried to modify a read-only property (for example a property coming from a hotlink).
  • APIERR_BADPROPERTY - The property definition is not available for the given element.
Example
GSErrCode SetAllPropertyValuesToDefault (const API_Guid& elemGuid)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValues (elemGuid, definitions, properties);
if (error == NoError) {
for (UInt32 i = 0; i < properties.GetSize (); i++) {
properties[i].isDefault = true;
}
error = ACAPI_Element_SetProperties (elemGuid, properties);
}
}
return error;
}

◆ ACAPI_Element_SetPropertiesOfDefaultElem()

GSErrCode ACAPI_Element_SetPropertiesOfDefaultElem ( const API_ElemType & type,
const GS::Array< API_Property > & properties )

Sets the specified properties for the given values on an element default.

Since
Archicad 26
Parameters
type[in] Type of the default element.
properties[in] Specifies the properties to be set.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - Incorrect type was specified or one of the property definitions' guid did not refer to a valid object.
  • APIERR_NOACCESSRIGHT - The current user does not have the right to modify the properties of the specified element on a teamwork server.
  • APIERR_READONLY - Tried to modify a read-only property (for example a property coming from a hotlink).
  • APIERR_BADPROPERTY - The property definition is not available for the given element.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode SetAllPropertyValuesToDefault (const API_ElemType& type)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValuesOfDefaultElem (type, definitions, properties);
if (error == NoError) {
for (UInt32 i = 0; i < properties.GetSize (); i++) {
properties[i].isDefault = true;
}
error = ACAPI_Element_SetPropertiesOfDefaultElem (type, properties);
}
}
return error;
}

◆ ACAPI_Element_SetProperty()

GSErrCode ACAPI_Element_SetProperty ( const API_Guid & elemGuid,
const API_Property & property )

Sets the specified property for the given values on an element.

Parameters
elemGuid[in] The element GUID to search for.
property[in] Specifies the property to be set.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - The elemGuid did not refer to a valid element.
  • APIERR_NOACCESSRIGHT - The current user does not have the right to modify the properties of the specified element on a teamwork server.
  • APIERR_READONLY - Tried to modify a read-only property (for example a property coming from a hotlink).
  • APIERR_BADPROPERTY - The property definition is not available for the given element.
Example
GSErrCode SetFirstPropertyValueToDefault (const API_Guid& elemGuid)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError && definitions.GetSize () > 0) {
API_Property property {};
error = ACAPI_Element_GetPropertyValue (elemGuid, definitions[0].guid, property);
if (error == NoError) {
property.isDefault = true;
error = ACAPI_Element_SetProperty (elemGuid, property);
}
}
return error;
}

◆ ACAPI_Element_SetPropertyOfDefaultElem()

GSErrCode ACAPI_Element_SetPropertyOfDefaultElem ( const API_ElemType & type,
const API_Property & property )

Sets the specified property to the given value on an element default.

Since
Archicad 26
Parameters
type[in] Type of the default element.
property[in] Specifies the property to be set.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADID - Incorrect type was specified or one of the property definitions' guid did not refer to a valid object.
  • APIERR_NOACCESSRIGHT - The current user does not have the right to modify the properties of the specified element on a teamwork server.
  • APIERR_READONLY - Tried to modify a read-only property (for example a property coming from a hotlink).
  • APIERR_BADPROPERTY - The property definition is not available for the given element.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
GSErrCode SetFirstPropertyValueToDefault (const API_ElemType& type)
{
GS::Array<API_PropertyDefinition> definitions;
if (error == NoError) {
GS::Array<API_Property> properties;
error = ACAPI_Element_GetPropertyValuesOfDefaultElem (type, definitions, properties);
if (error == NoError) {
API_Property property = properties[0];
property.isDefault = true;
error = ACAPI_Element_SetPropertyOfDefaultElem (type, property);
}
}
return error;
}

◆ ACAPI_Element_SetUserData()

GSErrCode ACAPI_Element_SetUserData ( API_Elem_Head * elemHead,
const API_ElementUserData * userData )

Attaches the user data to an element or an element default.

Parameters
elemHead[in] Header of the element (only fields type and guid are used).
userData[in] Pointer to the new user data.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADPARS - Any of the passed parameters is nullptr
  • APIERR_BADPLATFORMSIGN - The given platform sign is invalid (out of range)
  • APIERR_MEMFULL - Out of memory
Remarks
This function is used to push the user-attached data into the default element or into an element. To set data to the element default only, elemHead->type is necessary, and elemHead->guid should be APINULLGuid. To set data to an element, only elemHead->guid is necessary, and it should be set to the element's guid. Use the ACAPI_Element_GetUserData function to get data from the element record. Note that this function is not undoable in case of the element default setting. The caller should allocate and deallocate the userData->dataHdl handle.
Example
//------------------------------------------------------------
// Set user data to wall default element
//------------------------------------------------------------
GSErrCode SetUserDataToWallDefaultElem (const CustomData& data)
{
API_Elem_Head wallDefault {};
wallDefault.type = API_WallID;
API_ElementUserData userData {};
userData.dataVersion = 1;
userData.platformSign = GS::Act_Platform_Sign;
userData.flags = APIUserDataFlag_FillWith | APIUserDataFlag_Pickup;
userData.dataHdl = BMAllocateHandle (sizeof (data), ALLOCATE_CLEAR, 0);
*reinterpret_cast<CustomData*> (*userData.dataHdl) = data;
GSErrCode err = ACAPI_Element_SetUserData (&wallDefault, &userData);
BMKillHandle (&userData.dataHdl);
return err;
}
//------------------------------------------------------------
// Set user data to an element identified by guid
//------------------------------------------------------------
GSErrCode SetUserDataToElem (const API_Guid& selectedElemGuid, const CustomData& data)
{
API_Elem_Head element {};
element.guid = selectedElemGuid;
API_ElementUserData userData {};
userData.dataVersion = 1;
userData.platformSign = GS::Act_Platform_Sign;
userData.flags = APIUserDataFlag_FillWith | APIUserDataFlag_Pickup;
userData.dataHdl = BMAllocateHandle (sizeof (data), ALLOCATE_CLEAR, 0);
*reinterpret_cast<CustomData*> (*userData.dataHdl) = data;
GSErrCode err = ACAPI_CallUndoableCommand ("Set user data to an elem",
[&userData, &element] () -> GSErrCode {
return ACAPI_Element_SetUserData (&element, &userData);
}
);
BMKillHandle (&userData.dataHdl);
return err;
}

◆ ACAPI_Element_SolidLink_Create()

GSErrCode ACAPI_Element_SolidLink_Create ( API_Guid guid_Target,
API_Guid guid_Operator,
API_SolidOperationID operation,
GSFlags linkFlags )

Defines a new Solid Operation Link.

Parameters
guid_Target[in] Identifies the target element.
guid_Operator[in] Identifies the operator element.
operation[in] The operation type
linkFlags[in] Linking options (see ACAPI_Element_SolidLink_GetFlags)
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or both of the passed IDs are invalid, or the two IDs are equal.
  • APIERR_BADPARS - Invalid value passed in the operation parameter.
  • APIERR_REFUSEDPAR - Linking together of hotlinked elements is not allowed.
  • APIERR_LINKEXIST - The elements have already been linked together.
Remarks
This function defines a new Solid Operation Link between two construction elements.
Example
Subtract the first slab from the first wall, and the new surfaces inherit the attributes of the slab:
GSErrCode SolidLink (const API_Guid& guid_Target, const API_Guid& guid_Operator)
{
return ACAPI_CallUndoableCommand ("Substract Slab from Wall",
[&] () -> GSErrCode {
GSErrCode err = ACAPI_Element_SolidLink_Create (guid_Target, guid_Operator, APISolid_Substract, APISolidFlag_OperatorAttrib);
if (err == APIERR_LINKEXIST)
ACAPI_WriteReport ("Solid Link already exists between the elements", true);
else if (err != NoError)
ACAPI_WriteReport ("ACAPI_Element_SolidLink_Create has failed", true);
return err;
});
}

◆ ACAPI_Element_SolidLink_GetFlags()

GSErrCode ACAPI_Element_SolidLink_GetFlags ( API_Guid guid_Target,
API_Guid guid_Operator,
GSFlags * linkFlags )

Retrieves the flag of a Solid Operation Link.

Parameters
guid_Target[in] Identifies the target element.
guid_Operator[in] Identifies the operator element.
linkFlags[out] Linking options (see Remarks).
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADPARS - The linkFlags parameter is nullptr.
  • APIERR_LINKNOTEXIST - There is no Solid Link in the database between elements specified by guid_Target and guid_Operator.
Remarks
This function retrieves the attribute flag of a Solid Operation Link identified by the Target and the Operator element. The meaning of the flag bits:
Flag Meaning
APISolidFlag_OperatorAttrib The new surfaces inherit the attributes of the operator
APISolidFlag_SkipPolygonHoles Use operator (roof or slab) without holes

◆ ACAPI_Element_SolidLink_GetOperation()

GSErrCode ACAPI_Element_SolidLink_GetOperation ( API_Guid guid_Target,
API_Guid guid_Operator,
API_SolidOperationID * operation )

Retrieves the operation code of a Solid Operation Link.

Parameters
guid_Target[in] Identifies the target element.
guid_Operator[in] Identifies the operator element.
operation[out] The type of the Solid Operation.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADPARS - The operation parameter is nullptr.
  • APIERR_LINKNOTEXIST - There is no Solid Link in the database between elements specified by guid_Target and guid_Operator.
Remarks
This function retrieves the operation code of a Solid Operation Link defined between two construction elements.

◆ ACAPI_Element_SolidLink_GetOperators()

GSErrCode ACAPI_Element_SolidLink_GetOperators ( API_Guid guid_Target,
GS::Array< API_Guid > * guid_Operators )

Retrieves the operator elements linked to a target element.

Parameters
guid_Target[in] The GUID of the target element.
guid_Operators[out] GUID list of the operator elements linked to the target element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADPARS - The guid_Operators parameter is nullptr.
Remarks
This function retrieves a list of operator elements associated with a given target element with Solid Operation Link.

◆ ACAPI_Element_SolidLink_GetTargets()

GSErrCode ACAPI_Element_SolidLink_GetTargets ( API_Guid guid_Operator,
GS::Array< API_Guid > * guid_Targets )

Retrieves the target elements linked to an operator element.

Parameters
guid_Operator[in] The GUID of the operator element.
guid_Targets[out] GUID list of the target elements linked to the operator element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADPARS - The guid_Targets parameter is nullptr.
Remarks
This function retrieves a list of target elements associated with a given operator element with Solid Operation Link.

◆ ACAPI_Element_SolidLink_GetTime()

GSErrCode ACAPI_Element_SolidLink_GetTime ( API_Guid guid_Target,
API_Guid guid_Operator,
GSTime * linkTime,
UInt32 * linkSubTime )

Retrieves the creation time of a Solid Operation Link.

Parameters
guid_Target[in] Identifies the target element.
guid_Operator[in] Identifies the operator element.
linkTime[out] Time of the link creation.
linkSubTime[out] Auxiliary time parameter of the link creation.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADPARS - The linkTime or the linkSubTime parameter is nullptr.
  • APIERR_LINKNOTEXIST - There is no Solid Link in the database between elements specified by guid_Target and guid_Operator.
Remarks
This function retrieves the creation time of a Solid Operation Link defined between two construction elements. Since GSTime is a second-precise date-time format, the linkTime parameter of that type is not enough to order the Solid Operation Links by their creation time. However, it is important to know which operation should be performed before another when there is more than one Solid Operation defined for a given element. The auxiliary linkSubTime serves this purpose, distinguishing link creation times within one second.

◆ ACAPI_Element_SolidLink_Remove()

GSErrCode ACAPI_Element_SolidLink_Remove ( API_Guid guid_Target,
API_Guid guid_Operator )

Discontinues a Solid Operation Link.

Parameters
guid_Target[in] Identifies the target element.
guid_Operator[in] Identifies the operator element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or both of the passed IDs are invalid, or the two IDs are equal.
  • APIERR_LINKNOTEXIST - There is no Solid Link in the database between elements specified by guid_Target and guid_Operator.
  • APIERR_REFUSEDPAR - Hotlinked Solid Links cannot be removed.
Remarks
This function removes the Solid Operation Link defined between two construction elements.

◆ ACAPI_Element_SolidOperation_Create()

GSErrCode ACAPI_Element_SolidOperation_Create ( API_Guid guid_Target,
API_Guid guid_Operator,
API_SolidOperationID operation,
GS::Array< API_Guid > * guid_Results = nullptr )

Creates a new Solid Operation.

Parameters
guid_Target[in] Identifies the target element.
guid_Operator[in] Identifies the operator element.
operation[in] The operation type
guid_Results[out] The result elements after the operation (in case of successfull operation, the target and operator elements will be deleted).
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or both of the passed IDs are invalid, or the two IDs are equal.
  • APIERR_BADPARS - Invalid value passed in the operation parameter.
  • APIERR_NO3D - Solid operation targets and operators can be freeshape elements only.
Remarks
This function defines a new Solid Operation between two morph elements. In case of successfull operation, the target and operator elements will be deleted. The result elements will be returned in the guid_Results parameter.
Example
Substract and add morphs:
GSErrCode SolidOperation (const API_Guid& guid_Target, const API_Guid& guid_OperatorSubstract, const API_Guid& guid_OperatorAdd)
{
return ACAPI_CallUndoableCommand ("Solid Operation",
[&] () -> GSErrCode {
GS::Array<API_Guid> guid_Results;
GSErrCode err = ACAPI_Element_SolidOperation_Create (guid_Target, guid_OperatorSubstract, APISolid_Substract, &guid_Results);
if (err != NoError) {
if (err == APIERR_NO3D)
ACAPI_WriteReport ("Solid operation targets and operators can be freeshape elements only.", true);
else
WriteReport_Alert ("ACAPI_Element_SolidOperation_Create failed: %d", err);
} else {
if (!guid_Results.IsEmpty ()) {
err = ACAPI_Element_SolidOperation_Create (guid_Results[0], guid_OperatorAdd, APISolid_Add);
if (err != NoError) {
if (err == APIERR_NO3D)
ACAPI_WriteReport ("Solid operation targets and operators can be freeshape elements only.", true);
else
WriteReport_Alert ("ACAPI_Element_SolidOperation_Create failed: %d", err);
}
}
}
return err;
});
}

◆ ACAPI_Element_Trim_Elements()

GSErrCode ACAPI_Element_Trim_Elements ( const GS::Array< API_Guid > & guid_ElementsToTrim)

Trim elements given in the array with Roof(s) and/or Shell(s) are contained in the array.

Parameters
guid_ElementsToTrim[in] Array of GUIDs of the elements to trim with shells and roofs are contained in this array.
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADPARS - Invalid value passed in the guid_ElementsToTrim parameter.
  • APIERR_BADELEMENTTYPE - There is element in the array, which is not construction element type, or there is no Roof or Shell element in the array to trim with.
Remarks
This function trims elements given in the array with Roof(s) and/or Shell(s) are contained in the array.

◆ ACAPI_Element_Trim_ElementsWith()

GSErrCode ACAPI_Element_Trim_ElementsWith ( const GS::Array< API_Guid > & guid_ElementsToTrim,
const API_Guid & guid_Element,
API_TrimTypeID trimType )

Trim elements given in the array with the given Roof or Shell with the type of trim.

Parameters
guid_ElementsToTrim[in] Array of GUIDs of the elements to trim with the given Shell or Roof.
guid_Element[in] The trimming element GUID.
trimType[in] The type of the trimming.
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADPARS - Invalid value passed in the guid_ElementsToTrim parameter or invalid value passed in the trimType parameter.
  • APIERR_BADELEMENTTYPE - There is element in the array, which is not construction element type or the trimming element is not Roof or Shell.
Remarks
This function trims elements given in the array with the given Roof or Shell.

◆ ACAPI_Element_Trim_GetTrimmedElements()

GSErrCode ACAPI_Element_Trim_GetTrimmedElements ( const API_Guid & guid_Element,
GS::Array< API_Guid > * guid_TrimmedElements )

Get the trimmed elements with the given Roof or Shell in the array.

Parameters
guid_Element[in] The element GUID.
guid_TrimmedElements[out] Array of GUIDs of the elements are trimmed with the given Shell or Roof.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADPARS - Invalid value passed in the guid_Element parameter.
  • APIERR_BADELEMENTTYPE - The given element is not Roof or Shell element.
Remarks
This function gets elements are trimmed with the given Roof or Shell.

◆ ACAPI_Element_Trim_GetTrimmingElements()

GSErrCode ACAPI_Element_Trim_GetTrimmingElements ( const API_Guid & guid_Element,
GS::Array< API_Guid > * guid_TrimmingElements )

Get the trimming elements of the given element in the array.

Parameters
guid_Element[in] The element GUID.
guid_TrimmingElements[out] Array of GUIDs of the elements are trimming the given element.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADPARS - Invalid value passed in the guid_Element parameter.
  • APIERR_BADELEMENTTYPE - The given element is not construction element.
Remarks
This function gets elements are trimming the given element.

◆ ACAPI_Element_Trim_GetTrimType()

GSErrCode ACAPI_Element_Trim_GetTrimType ( const API_Guid & guid_Element1,
const API_Guid & guid_Element2,
API_TrimTypeID * trimType )

Get the type of trimming connection between the given elements.

Parameters
guid_Element1[in] The first element GUID.
guid_Element2[in] The second element GUID.
trimType[out] The type of the trimming.
Returns
  • NoError - The function has completed successfully.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADELEMENTTYPE - One of the elements is not construction element type or there is no given Roof or Shell.
Remarks
This function gets the type of trimming connection between the elements.

◆ ACAPI_Element_Trim_Remove()

GSErrCode ACAPI_Element_Trim_Remove ( const API_Guid & guid_Element1,
const API_Guid & guid_Element2 )

Remove the trimming connection from the given elements.

Parameters
guid_Element1[in] The first element GUID.
guid_Element2[in] The second element GUID.
Returns
  • NoError - The function has completed successfully.
  • APIERR_NEEDSUNDOSCOPE - The function must be undoable, it wasn't called from an undoable command scope.
  • APIERR_BADDATABASE, APIERR_NOTMINE - The function cannot operate on the current database.
  • APIERR_BADINDEX - One or more of the passed IDs are invalid.
  • APIERR_BADELEMENTTYPE - One of the elements is not construction element type or there is no given Roof or Shell.
Remarks
This function removes trimming connection between the elements.

◆ ACAPI_Element_UI2ElemPriority()

GSErrCode ACAPI_Element_UI2ElemPriority ( GS::Int32 * uiPriority,
GS::Int32 * elemPriority )

Returns user building material connection priority for a interface priority.

Parameters
uiPriority[in] The priority as it appers on the user interface.
elemPriority[out] The building material's connection priority.
Returns
  • NoError - The function has completed with success.

◆ CreateOpeningDefault() [1/2]

Result< OpeningDefault > ACAPI::Element::CreateOpeningDefault ( )
inline

Creates an OpeningDefault.

Since
Archicad 29
Returns
If able, returns a copy of Archicad's current Opening of the Opening tool, otherwise Error.

◆ CreateOpeningDefault() [2/2]

ARCHICADAPI_EXPORT Result< OpeningDefault > ACAPI::Element::CreateOpeningDefault ( const ACAPI::ElementDefault & defaultElem)

Creates an OpeningDefault from the given base element default.

Parameters
defaultElemThe base element default which will be converted to an OpeningDefault.
Since
Archicad 29
Returns
If the given base element default refers to an Opening, returns a copy of the OpeningDefault, otherwise Error.

◆ CreateZoneBoundaryQuery()

ZoneBoundaryQuery ACAPI::CreateZoneBoundaryQuery ( )
inline
Since
Archicad 27
Returns
Creates a ZoneBoundaryQuery object.