Represents a drawing element.
typedef struct { API_Elem_Head head; char name[256]; API_NameTypeValues nameType; API_NumberingTypeValues numberingType; char customNumber[256]; bool isInNumbering; bool manualUpdate; bool storedInProject; bool isScheduleAdjusted; bool isMultiPageDrawing; bool includeInAutoTextsAndIES; bool filler_1[2]; double angle; double ratio; double rasterizeDPI; double drawingScale; double parentOriginalScale; API_AnchorID anchorPoint; API_ColorModeValues colorMode; API_PenTableUsageModeValues penTableUsageMode; API_AttributeIndex penTableIndex; bool useOwnOrigoAsAnchor; bool isTransparentBk; bool isCutWithFrame; bool hasBorderLine; API_AttributeIndex borderLineType; short borderPen; bool filler_2[2]; double borderSize; API_DrawingTitle title; API_Box bounds; API_Coord pos; API_Polygon poly; UInt32 sortIndex; Int32 linkUId; API_Guid drawingGuid; API_Coord modelOffset; API_Vector offset; API_Coord pageOffset; UInt32 pageNumberX; UInt32 pageNumberY; } API_DrawingType;
Members
- head
- General element header.
- name
- Custom drawing name if
nameType
is set toAPIName_CustomName
. - nameType
- Type of the drawing name (see API_NameTypeValues).
- numberingType
- Numbering options (see API_NumberingTypeValues).
- customNumber
- Custom drawing number if
numberingType
is set toAPINumbering_CustomNum
. - isInNumbering
- The drawing is included in the numbering sequence.
- manualUpdate
- Updating method: manual or automatic.
- storedInProject
- Drawing is stored in the project file – output only.
- isScheduleAdjusted
- Internal parameter used by the Interactive Element Schedule add-on – output only.
- isMultiPageDrawing
- Drawing is splitted to more layout (page). It can be true when the source is an Interactive Shedule view.
- includeInAutoTextsAndIES
- When
true
, the Scale of this Drawing will be included- in “Drawing Scale” and “Original Scale” AutoTexts,
- in “Drawing Scales” field of Layout type Project Indexes,
- in “Drawing Scale” field of Drawing type Project Indexes.
- angle
- Angle of the placed drawing in radian.
- ratio
- Ratio of drawing size and original size.
- rasterizeDPI
- Rasterize PDF at this dpi.
- drawingScale
- Scale of the view (e.g. 0.002 for 1:500) – output only.
- parentOriginalScale
- Parent scale while drawing creation (used in updating image and pdf type drawings) – output only.
- anchorPoint
- Placement reference by bounding box node (relevant only if not
useOwnOrigoAsAnchor
). - colorMode
- Produce B&W or grayscale output (see API_ColorModeValues).
- penTableUsageMode
- Determines which pen table will be used by the drawing (see API_PenTableUsageModeValues)
- penTableIndex
- Index of the pen table to use (if
penTableUsageMode
is set toAPIPenTableUsageMode_UsePenTableIndex
. - useOwnOrigoAsAnchor
- Use drawing’s own origo as placement reference point.
- isTransparentBk
- The background of the drawing should be transparent.
- isCutWithFrame
- Drawing is clipped with frame polygon.
- hasBorderLine
- Show drawing border?
- borderLineType
- Line type of the border.
- borderPen
- Pen attribute index of the border.
- borderSize
- Thickness of the border in ‘m’.
- title
- Drawing title.
- bounds
- Boundary box.
- pos
- Coordinate of the placed drawing’s origin on the layout.
- poly
- Polygon on the layout: the clip polygon if
isCutWithFrame
istrue
else the bounding box in polygon format - sortIndex
- Sort index.
- linkUId
- Not used yet.
- drawingGuid
- GUID of the drawing for identification by autotext.
- modelOffset
- If
isCutWithFrame
istrue
than it is the offset of the model. It will modify also thepos
of the drawing. - offset
- If the drawing is clipped with frame polygon
offset
is equal topos
else the subvector ofpos
and the coordinate of anchor. Output only parameter. - pageOffset
- Offset of the next page’s position, when isMultiPageDrawing set.
- pageNumberX
- Number of pages in x direction, when isMultiPageDrawing set.
- pageNumberY
- Number of pages in y direction, when isMultiPageDrawing set.
Remarks
Drawing elements can be placed both in the model space (except which come from an internal view) and onto layouts.
The 2D elements which appear in the drawing are stored in the drawingData
field in the API_ElementMemo.
This data structure has been rewritten from scratch; it has very little resemblance to the original data structure in PlotMaker.
Requirements
- Version: API 10 or later
- Header: APIdefs_Elements.h
See Also
API_AttributeIndex
API_Elem_Head
API_NameTypeValues
API_NumberingTypeValues
API_AnchorID
API_PenTableUsageModeValues
API_ColorModeValues
API_Coord
API_Polygon
API_Element
API_ElementMemo
Element Manager
API Types