Linetype Home

A linetype defines a line's characteristics. A line can consist of combinations of dashes, dots, spaces and symbols. New entities are added to a drawing using the current linetype. When you create a new drawing it already has linetypes named "ByLayer", "ByBlock", and, "Continuous".

These are the functions used to manage linetypes in a drawing:

Function Meaning
lcDrwAddLinetype Adds a new linetype into a drawing
lcDrwAddLinetypeF Adds a new linetype into a drawing
lcDrwDeleteObject Deletes an object from a drawing
lcDrwCountObjects Counts a number of objects, by type
lcDrwSortObjects Sorts objects by LC_PROP_TABLE_PRIORITY
lcDrwGetFirstObject
lcDrwGetNextObject
Used to sequentially retrieve all objects
lcDrwGetObjectByName Retrieves an object by its name
lcDrwGetObjectByID
lcDrwGetObjectByIDH
Retrieves object by its identifier

Layer object has the following properties:

Property Type Access Meaning
LC_PROP_TABLE_...    Base class properties
LC_PROP_LINETYPE_ID int
string
R Unique Identifier
Hexadecimal string (up to 16 characters)
LC_PROP_LINETYPE_NAME string RW Linetype Name
LC_PROP_LINETYPE_DESCR string RW Linetype description
LC_PROP_LINETYPE_DRW handle R Handle to owner drawing
LC_PROP_LINETYPE_DATA string RW Linetype definition in a text form
LC_PROP_LINETYPE_SCALE float RW Global scale for this linetype
LC_PROP_LINETYPE_CONTINUOUS bool R "Continuous" flag
LC_PROP_LINETYPE_BYLAYER bool R "By Layer" flag
LC_PROP_LINETYPE_BYBLOCK bool R "By Block" flag
LC_PROP_LINETYPE_PATLEN float R Pattern length
LC_PROP_LINETYPE_NELEM int R Number of elements
LC_PROP_LINETYPE_IELEM int W Set index of active element (for LC_PROP_LTELEM_...)
For active linetype element
LC_PROP_LTELEM_LEN float R Length of linetype element
LC_PROP_LTELEM_COMPLEX bool R TRUE - element has a shape or text, FALSE - element has only a dash
LC_PROP_LTELEM_SHAPE bool R TRUE - text style is used, FALSE - draw only szText[0] and fontfile is used
LC_PROP_LTELEM_TEXT string R Text
LC_PROP_LTELEM_STYLE handle R Text style (valid if LC_PROP_LTELEM_SHAPE is FALSE)
LC_PROP_LTELEM_FONTNAME string R Fontname (valid if LC_PROP_LTELEM_SHAPE is TRUE)
LC_PROP_LTELEM_SCALE float R Shape scale
LC_PROP_LTELEM_ANGLE float R Rotation angle in radians for a text element in the linetype
LC_PROP_LTELEM_ABSANGLE bool R If TRUE - rotation angle is absolute
LC_PROP_LTELEM_X float R X offset of a shape
LC_PROP_LTELEM_Y float R Y offset of a shape