|
Description
|
Returns a reference to a collection of "LineType" objects. Each object corresponds to an entry of the Linetype table (LTYPE) of the DXF file.
|
Syntax Visual Basic
|
[form.]DXFReader.LineTypes
|
|
Visual C++
|
C_Collection DXFReader.GetLineTypes();
|
|
Delphi
|
property LineTypes: _Collection;
|
|
C#
|
VBA.Collection DXFReader.LineTypes;
|
|
Remarks
|
Use the LineTypes collection to retrieve or remove an individual LineType object.
The methods of the LineTypes collection are:
| Count | Counts the defined LineTypes | | Remove | Removes a LineType object from the LineTypes collection |
To count all the objects of the LineTypes collection use the following code:
Dim NLineTypes As Long
NLineTypes = DXFReader1.LineTypes.Count
To remove a LineType object, for example the first, from the LineTypes collection use the following code:
DXFReader1.LineTypes.Remove (1)
All of the properties for the LineType object are listed in the following table:
| Property | Data Type | Description |
| | LineTypeName | String | Linetype name. | | Flag | Integer | Standard flags. | | DescriptiveText | String | Descriptive text for linetype. | | AlignmentCode | Integer | Alignment code; value is always 65, the ASCII code for A. | | ElementsNumber | Integer | The number of linetype elements. | | PatternLength | Single | Total pattern length. | | Handle | String | Handle |
To encrease display speed DXFReader can only draw with the Win32 API pen styles with no line type scale. These styles are solid, dashed, dotted, alternated dashes and dots and alternated dashes and double dots. DXFReader automatically choose the nearest style to that loaded from the DXF file. Together with the properties listed before, the LineTypes property has encapsulated the reference to a collection of "LineTypeElement" objects called LineTypeElements. This collection contains all the data of the elements of a line type like dash, dot or space length, shape number, etc..
All of the properties for the LineTypeElement object are listed in the following table:
| Property | Data Type | Description |
| | Complex | Integer | Complex linetype element type (one per element). Default is 0 (no embedded shape/text). | | ShapeNumber | Integer | Shape number (one per element) if code 74 specifies an embeded shape. If code 74 specifies an embeded text string, this value is set to 0. If code 74 is set to 0, code 75 is omitted. | | XOffset | Single | X offset value (optional). Multiple entries can exist. | | YOffset | Single | Y offset value (optional). Multiple entries can exist. | | DashDotSpaceLength | Single | Dash, dot or space length (one entry per element). |
To plot with the correct line type you must set the PlotPenWidth property to 1.
The code below lists the contents of the LTYPE table of e DXF file:
Dim LineType as Object
With DXFReader1
For Each LineType In .LineTypes
Printer.Print LineType.LineTypeName
Next LineType
End With
|
|
Data Type
|
Collection
|