Represents a textual or a symbol label.

    typedef struct {
        union {
             API_Elem_Head       head;
             API_TextType        text;
             API_ObjectType      symbol;
        } u;
        API_LblClassID       labelClass;
        Int32                filler_1;
        API_DirID            textWay;
        Int32                filler_2[5];
        bool                 filler_3[2];
        short                font;
        unsigned short       faceBits;
        bool                 flipEnabled;
        bool                 nonBreaking;
        double               textSize;
        bool                 filler_4;
        bool                 useBgFill;
        short                fillBgPen;
        Int32                effectsBits;
        short                pen;
        short                filler_5;
        API_AttributeIndex   ltypeInd;
        double               contourOffset;
        bool                 framed;
        bool                 hasLeaderLine;
        char                 filler_6[6];
        API_ArrowData        arrowData;
        API_LblAnchorID      anchorPoint;
        API_LeaderLineShapeID  leaderShape;
        double               squareRootAngle;
        Int32                filler_7[4];
        API_ElemType         parentType;
        bool                 filler_8[4];
        API_Guid             parent;
        API_Coord            begC;
        API_Coord            midC;
        API_Coord            endC;
        bool                 createAtDefaultPosition;
        char                 filler_9[23];
    } API_LabelType;



General element header.
Describes the details of the textual label. The typeID field of the head should be set to API_LabelID (!).
Describes the details of the symbol label. The typeID field of the head should be set to API_LabelID (!).
Type (class) of the label (see API_LblClassID).
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.
Font attribute index (for symbol labels only).
Style (face) of text (for symbol labels only):


Plain text








Outlined (Macintosh only)


Shadow (Macintosh only)

flipEnabled New in API 19
True, if the Label is set to be “Always Readable”.
nonBreaking New in API 19
True, if “Wrap Text” is turned off for this Label.
Size of the text in mm (for symbol labels only).
useBgFill New in API 16
Switches opaque background for symbol labels.
fillBgPen New in API 16
Defines the background pen for symbol labels; effective only if useBgFill is true.
effectsBits New in API 16
Text effects to be applied for symbol labels:
APIEffect_StrikeOut Strikethrough text
APIEffect_SuperScript Superscript
APIEffect_SubScript Subscript
APIEffect_Fractional Fractional text (not used)
APIEffect_Protected Protected text (autotext reference)  Featuring API 10
Pen attribute index of the leader line.
Line type attribute index of the leader line.
Put a frame around the content? (For both Symbol and Text Labels.)
contourOffset New in API 19
The padding of the Label’s frame (i.e. the distance between the frame and the text).
hasLeaderLine New in API 19
Add a Leader Line (i.e. pointer line) to the Label? (For both Symbol and Text Labels.)
The arrow type.
Anchor point the label pointer line is connected to. See API_LblAnchorID.
leaderShape New in API 19
Leader line shape. For the list of available shapes see API_LeaderLineShapeID.
squareRootAngle New in API 19
Used only if leaderShape == API_SquareRoot. Valid range: 1° <= squareRootAngle <= 179°, in radians. For the meaning of the angle see the picture under Remarks.
The type of the parent element is returned in it, or API_ZombieElemID if the Label is independent. At Label creation it is ignored.
When getting the Label defaults the labelable element type can be given in it. ACAPI_Element_GetDefaults will return the Label default for the given element type.
parent Changed in API 12
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. It is not allowed to make an existing associative Label independent, or make an existing independent Label associative.
Beginning coordinate of the leader line.
Middle coordinate of the leader line.
End coordinate of the leader line.
createAtDefaultPosition New in API 19
When creating associative Labels,
  • if set to true, the Label will be created at its default position (begC, midC, endC is ignored);
  • if set to false, the Label will be created at begC, midC, endC.



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.

New in API 26 From version 26 the type of the parentType member was changed into API_ElemType.



Version: API 2.1 or later
Header: APIdefs_Elements.h


See Also

API_AttributeIndex, API_Elem_Head, API_LblClassID, API_TextType, API_ObjectType,
API_DirID, API_ArrowData, API_ElemType, API_Coord, API_Element,
Element Manager, API Types