|
Description
|
Returns a reference to a collection of "Style" objects. Each object corresponds to an entry of the Text style table (STYLE) of the DXF file.
|
Syntax Visual Basic
|
[form.]DXFReader.Styles
|
|
Visual C++
|
C_Collection DXFReader.GetStyles();
|
|
Delphi
|
property Styles: _Collection;
|
|
C#
|
VBA.Collection DXFReader.Styles;
|
|
Remarks
|
Use the Styles collection to retrieve or remove an individual Style object.
The methods of the Styles collection are:
| Count | Counts the defined Styles | | Remove | Removes a Style object from the Styles collection |
To count all the objects of the Styles collection use the following code:
Dim NStyles As Long
NStyles = DXFReader1.Styles.Count
To remove a Style object, for example the first, from the Styles collection use the following code:
DXFReader1.Styles.Remove (1)
All of the properties for the Style object are listed in the following table:
| Property | Data Type | Description |
| | StyleName | String | The name of the text style | | FontFileName | String | Primary font file name | | BigFontName | String | Bigfont file name; blank if none | | Flag | Integer | Standard flag values | | TextGenerationFlags | Integer | Text generation flags: 2=Text is backward (mirrored in X), 4=Text is upside down (mirrored in Y) | | Handle | String | Handle | | FixedTextHeight | Single | Fixed text height; 0 if not fixed | | WidthFactor | Single | Width factor | | LastHeightUsed | Single | Last height used | | Angle | Single | Oblique angle |
DXFReader displays all text entites using fonts installed on the target machine. When it processes a text entity, first it looks at its StyleName property. If found the control uses the font specified in the FontFileName property else it uses the style of the CurrentTextStyle property. If the font is not present then the default Font property is used.
DXFReader does not display .SHX fonts using instead the corresponding true type fonts. For example, if the FileFontName property is set to 'txt', DXFReader uses the true font file 'txt.ttf' if present in the system.
The code below lists the contents of the STYLE table of e DXF file:
Dim Style as Object
With DXFReader1
For Each Style In .Styles
Printer.Print Style.StyleName
Next Style
End With
See the Autodesk DXF Reference for more information.
|
|
Data Type
|
Collection
|