|
Description
|
Returns a reference to a collection of "Layer" objects. Each object corresponds to an entry of the Layer table (LAYER) of the DXF file.
|
Syntax Visual Basic
|
[form.]DXFReader.Layers
|
|
Visual C++
|
C_Collection DXFReader.GetLayers();
|
|
Delphi
|
property Layers: _Collection;
|
|
C#
|
VBA.Collection DXFReader.Layers;
|
|
Remarks
|
Use the Layers collection to retrieve or remove an individual Layer object.
The methods of the Layers collection are:
| Count | Counts the defined Layers | | Remove | Removes a Layer object from the Layers collection |
To count all the objects of the Layers collection use the following code:
Dim NLayers As Long
NLayers = DXFReader1.Layers.Count
To remove a Layer object, for example the first, from the Layers collection use the following code:
DXFReader1.Layers.Remove (1)
All of the properties for the Layer object are listed in the following table:
| Property | Data Type | Description |
| | LayerName | String | Layer name. | | Handle | String | Handle | | Frozen | Boolean | True if layer is frozen. | | Flag | Integer | Standard flags. In addition to the standard flags, the following values apply to layers (bit-coded values): 1 = Layer is frozen, otherwise layer is thawed; 2 = Layer is frozen by default in new viewports. | | LayerOn | Boolean | True if layer is on. | | LineType | String | LineType name. | | Color | Integer | Color number (if negative, layer is Off). |
The code below lists the contents of the LAYER table of e DXF file:
Dim Layer as DXFReaderLayer
With DXFReader1
For Each Layer In .Layers
Printer.Print Layer.LayerName
Next Layer
End With
|
|
Data Type
|
Collection
|