API_​TextType

Represents a text, or a textual label.

    typedef struct {
        API_Elem_Head      head;
        short              pen;
        unsigned short     faceBits;
        short              font;
        bool               fixedAngle;
        bool               filler_1;
        API_AnchorID       anchor;
        API_JustID         just;
        double             size;
        double             spacing;
        double             angle;
        double             filler_2;
        Int32              charCode;
        Int32              effectsBits;
        double             widthFactor;
        double             charSpaceFactor;
        bool               fixedSize;
        bool               usedContour;
        bool               usedFill;
        bool               filler_3;
        short              contourPen;
        short              fillPen;
        API_Coord          loc;
        double             width;
        double             height;
        bool               nonBreaking;
        bool               multiStyle;
        bool               useEolPos;
        bool               filler_4;
        Int32              nLine;
        API_Guid           owner;
        double             contourOffset;
        bool               flipEnabled;
        char               filler_5[3];
        Int32              filler_6[5];
    } API_TextType;

 

Members

head
General element header.
pen
Pen attribute index.
faceBits
Style (face) of text:

APIFace_Plain

Plain text

APIFace_Bold

Bold

APIFace_Italic

Italic

APIFace_Underline

Underline

font
Font attribute index.
fixedAngle
The rotation angle will not change when the element is rotated and this flag is true. 6.1
anchor
Anchor point of the text (see API_AnchorID).
just
Justification of the text (see API_JustID).
size
Character height in mm.
spacing
Spacing factor between text lines (it should be between -10.0 and -1.0).
angle
Rotation angle [radian].
charCode
GSCharCode type character code used in the unicode-ANSI string conversion routines of the GSRoot String Manager. Do not use it for string encoding, only for font handling!  21
effectsBits
Special text effects:  6.1
APIEffect_StrikeOut Strikethrough text
APIEffect_SuperScript Superscript
APIEffect_SubScript Subscript
APIEffect_Protected Protected text (autotext reference)  Featuring API 10
widthFactor
Width scale of the text (it should be between 0.75 and 10.0). 6.1
charSpaceFactor
Spacing scale of the text (it should be between 0.75 and 10.0). 6.1
fixedSize
Size not depends on output scale if this flag is true. 6.1
usedContour
Draw the frame of the textblock. 6.1
usedFill
Draw a solid fill to the background of the textblock. 6.1
contourPen
Pen index of the frame of the textblock. 6.1
fillPen
Pen index of the background of the textblock. 6.1
loc
Coordinates of text anchor point.
width
Horizontal size of text box in mm.
height
Vertical size of text box in mm.
nonBreaking
If false then wrap around at the boundary of the destination rectangle.
multiStyle
Multistyle text (input only). 6.1
useEolPos
Use the array of line end positions by creating the element (input only). Only available for multistyle text. (see API_ParagraphType)  6.1
nLine
Number of text lines.
owner Changed in API 12
Belongs to something else e.g. a label.
contourOffset
The offset value of the frame or opaque background to the bounding box of the text block.  6.1
flipEnabled 17
The text should always be readable.

 

Remarks

From ARCHICAD 9 you are able to create multistyle text or textual label. In this case the pen, faceBits, font, just, size, spacing, effectBits members are not used. These members are used only by default element setting and monostyle textual element creating. The paragraphs handle of API_ElementMemo structure contains these informations for each paragraphs of the text. For text related memo data (e.g. content, paragraphs) see the ACAPI_Element_GetMemo function. For more details examine Element Manager example project.

 

Requirements

Version: API 2.1 or later
Header: APIdefs_Elements.h

 

See Also

API_Elem_Head, API_AnchorID, API_JustID, API_Coord, API_TabType, API_RunType, API_ParagraphType, API_Guid, API_Element, API_LabelType,
API_ElementMemo,
Element Manager, API Types