Archicad 27 C++ API
Loading...
Searching...
No Matches
API_LabelType Struct Reference

Represents a textual or a symbol label. More...

#include <APIdefs_Elements.h>

Public Attributes

union { 
 
   API_Elem_Head   head 
 General element header.
 
   API_TextType   text 
 Contains the details of the textual label. The typeID field of the head should be set to API_LabelID (!).
 
   API_ObjectType   symbol 
 Contains the details of the symbol label. The typeID field of the head should be set to API_LabelID (!).
 
u 
 
API_LblClassID labelClass
 Type (class) of the label.
 
API_DirID textWay
 Direction of text for textual labels (see API_DirID and the picture under Remarks). For labels only APIDir_Parallel, APIDir_Horizontal, APIDir_Vertical, and APIDir_General can be used.
 
short font
 Font attribute index (for symbol labels only).
 
unsigned short faceBits
 Style (face) of text (for symbol labels only):
 
bool flipEnabled
 True if the Label is set to be "Always Readable".
 
bool nonBreaking
 True if "Wrap Text" is turned off for this Label.
 
double textSize
 Size of the text in mm (for symbol labels only).
 
bool useBgFill
 Switches opaque background for symbol labels.
 
short fillBgPen
 Defines the background pen for symbol labels; effective only if useBgFill is true.
 
Int32 effectsBits
 Text effects to be applied for symbol labels:
 
short pen
 Pen attribute index of the leader line.
 
API_AttributeIndex ltypeInd
 Line type attribute index of the leader line.
 
double contourOffset
 The padding of the Label's frame (i.e. the distance between the frame and the text).
 
bool framed
 Put a frame around the content? (For both Symbol and Text Labels).
 
bool hasLeaderLine
 Add a Leader Line (i.e. pointer line) to the Label? (For both Symbol and Text Labels.)
 
API_ArrowData arrowData
 The arrow type.
 
API_LblAnchorID anchorPoint
 Anchor point the label pointer line is connected to.
 
API_LeaderLineShapeID leaderShape
 Leader line shape. For the list of available shapes see API_LeaderLineShapeID.
 
double squareRootAngle
 Used only if leaderShape == API_SquareRoot. Valid range: 1° <= squareRootAngle <= 179°, in radians. See picture under Remarks.
 
API_ElemType parentType
 Font attribute index (for symbol labels only).
 
API_Guid parent
 Contains the type of the parent element, or API_ZombieElemID if the Label is independent. When getting the Label defaults the labelable element type can be passed here. ACAPI_Element_GetDefaults will return the Label default for the given element type. When creating new Labels,.
 
API_Coord begC
 Beginning coordinate of the leader line.
 
API_Coord midC
 Middle coordinate of the leader line.
 
API_Coord endC
 End coordinate of the leader line.
 
bool createAtDefaultPosition
 When creating associative Labels:
 
bool hideWithBaseElem
 Hide the label with its base element?
 

Detailed Description

Represents a textual or a symbol label.

Remarks
For label related memo data (e.g. content, additional parameters) see the ACAPI_Element_GetMemo function. The interpretation of the textWay field is:
Label direction
The squareRootAngle is marked with β on the following picture:
Square root angle
The titleTyp field has been removed in API 21. From version 26 the type of the parentType member was changed to API_ElemType.

Member Data Documentation

◆ createAtDefaultPosition

API_LabelType::createAtDefaultPosition

When creating associative Labels:

  • if set to true, the Label will be created at its default position (begC, midC, and endC are ignored);
  • if set to false, the Label will be created using begC, midC, and endC.

◆ effectsBits

API_LabelType::effectsBits

Text effects to be applied for symbol labels:

Effect bit Effect
APIEffect_StrikeOut Strikethrough text
APIEffect_SuperScript Superscript
APIEffect_SubScript Subscript
APIEffect_Fractional Fractional text (not used)
APIEffect_Protected Protected text (autotext reference)

◆ faceBits

API_LabelType::faceBits

Style (face) of text (for symbol labels only):

Face bit Meaning
APIFace_Plain Plain text
APIFace_Bold Bold
APIFace_Italic Italic
APIFace_Underline Underline
APIFace_Outline Outlined (Macintosh only)
APIFace_Shadow Shadow (Macintosh only)

◆ parent

API_LabelType::parent

Contains the type of the parent element, or API_ZombieElemID if the Label is independent. When getting the Label defaults the labelable element type can be passed here. ACAPI_Element_GetDefaults will return the Label default for the given element type. When creating new Labels,.

  • set this to APINULLGuid to create an independent Label; or
  • set this to the GUID of the owner element (a labelable element) to create an associative Label. When getting or changing a Label, this member will be filled with the GUID of the owner element, or APINULLGuid, if the Label is independent. You cannot change an existing associative Label to independent, or an existing independent Label to associative.