FME Transformers: 2024.2
FME Transformers: 2024.2
DWGStyler
Prepares features for output to AutoCAD DWG/DXF by providing a convenient interface to set a variety of AutoCAD DWG/DXF format-specific attributes.
Usage Notes
For more information about DWG/DXF styling:
- See the Autodesk AutoCAD DWG/DXF Reader/Writer > Feature Representation section in the FME Readers and Writers help.
Configuration
Parameters
Color
Color Mode |
This parameter specifies how the pen color will be used to render the feature:
Note When this parameter is specified, the autocad_color attribute is set and fme_color is removed from the feature. This is because autocad_color will override fme_color and is needed to correctly set the color behavior. |
||||||||||||||||||||
Color |
This parameter specifies the pen color that will be used to render the feature. The pen color determines the color of lines and area boundaries. To edit this parameter, click the browse button to the right of the text field. Format attribute set: fme_color Specifying Colors Colors may be entered directly or chosen from the color picker via the ellipsis button. Syntax
Colors can be specified by RGB values or hex codes. RGB values may be either 24-bit or decimal (0 - 1). If the value type is unclear, as in (1,1,1), the 24-bit interpretation is used. Hex codes are accepted with or without a hash sign (#).
Note When this parameter is specified, the autocad_color attribute is removed from the feature and fme_color is set. This is because autocad_color will override fme_color if they are both present.
|
||||||||||||||||||||
Transparency |
This parameter specifies the transparency of the entity, where 0 and 255 correspond to fully transparent and fully opaque, respectively. This can be set to any integer value between 0 to 255, -1 (by layer), -2 (by block), or taken from an attribute. Format attribute set: autocad_transparency |
Block/Style Name Source
DWG/DXF Template File |
This optional parameter is used to specify the name of an existing DWG, DXF, or DWT file that will be used by the transformer as a source for block names, linetypes, and text shape names. It is not used by the actual DWG/DXF writer – the template file must be specified in the writer’s parameters and should contain the same block names and linetypes as the file specified here. Usually the same file will be used in both the transformer and the writer. If no blocks or linetypes will be used, this parameter can be left blank. |
Blocks
When enabled, point features will be turned into inserts and given a block name, rotation, and size.
Features with other geometry types are not affected by settings in this section.
Format attributes set: autocad_entity to autocad_insert
Block Name |
Block Name specifies the block that will be placed at the point location. Click the browse button to pick the name from the set of blocks defined in the DWG/DXF template file. Format attribute set: autocad_block_name |
Block Rotation |
Block Rotation specifies rotation of the block (in degrees counterclockwise from horizontal). This can be set to any floating-point value between -360.0 to 360.0, or taken from an attribute. Format attribute set: autocad_rotation |
Block Size By |
Block Size By indicates how the size of the block will be specified. If ground units are chosen, then the block will be scaled so that its range in x, y, and z covers the specified amounts. If scale factor is chosen, then the amounts in x, y, and z specify the scaling which will be applied to the block in each of the three axes. |
X |
X specifies the sizing amount for the x axis, which can be a floating-point value or taken from an attribute. Its meaning is dependent on the Block Size By setting described above. Format attribute set: autocad_x_scale (if Block Size By is Scale Factor); autocad_size_x (if Block Size By is Ground Units) |
Y |
Y specifies the sizing amount for the y axis, which can be a floating-point value or taken from an attribute. Its meaning is dependent on the Block Size By setting described above. Format attribute set: autocad_y_scale (if Block Size By is Scale Factor); autocad_size_y (if Block Size By is Ground Units) |
Z
|
Z specifies the sizing amount for the z axis, which can be a floating-point value or taken from an attribute. Its meaning is dependent on the Block Size By setting described above. Format attribute set: autocad_z_scale (if Block Size By is Scale Factor); autocad_size_z (if Block Size By is Ground Units) |
Lines
When enabled, linear features will be prepared for output to AutoCAD DWG/DXF.
Features with other geometry types will not be affected by settings in this section.
Linetype |
Linetype specifies the AutoCAD linetype that will be used to render the line. Click the browse button to pick the name from the set of blocks defined in the DWG/DXF template file. Format attribute set: autocad_linetype |
Linetype Generation |
Linetype Generation specifies how linetypes will be rendered at each vertex of the line. If set to Continuous, line vertices are ignored since the pattern is applied to the line when it is rendered. If set to Restart At Each Vertex, the pattern is restarted at each vertex of the line. Format attribute set: autocad_linetype_generation |
Line Weight |
Line Weight specifies the thickness of the line when it is rendered, measured in hundredths of a millimeter. Format attribute set: autocad_lineweight |
Line Scale |
Line Scale specifies the amount that the line pattern will be scaled when the line is rendered. Format attribute set: autocad_linetype_scale |
Line Elevation |
Line Elevation sets a single elevation value that will be applied to all the vertices of the line. This is an efficient way to set a constant elevation (z) to an otherwise two-dimensional line. Format attribute set: autocad_elevation |
Areas
When enabled, area features will be prepared for output to AutoCAD DWG/DXF.
Features with other geometry types will not be affected by settings in this section.
Area Entity Type |
Area Entity Type specifies the kind of entity and fill pattern that will be created to represent the feature when it is written to AutoCAD DWG/DXF. The choices with the corresponding AutoCAD entity type are:
|
||||||||||||||||||||
Fill Pattern Name |
Fill Pattern Name sets the name of the fill pattern that will be used to fill either the hatch or mpolygon. Click the browse button to pick the name from the set of fill patterns that ship with AutoCAD. Format attributes set: autocad_hatch_pattern_name (if Area Entity Type is set to Hatch With Fill Pattern); autocad_mpolygon_pattern_name (if Area Entity Type is set to Mpolygon With Fill Pattern) |
||||||||||||||||||||
Pattern Scale |
Pattern Scale specifies the amount that the fill pattern will be scaled when the area is rendered. Format attributes set: autocad_hatch_pattern_scale (if Area Entity Type is set to Hatch With Fill Pattern); autocad_mpolygon_pattern_scale (if Area Entity Type is set to Mpolygon With Fill Pattern) |
||||||||||||||||||||
Gradient Name |
Gradient Name sets the type of the gradient pattern (predefined as part of AutoCAD) that will be used to fill either the hatch or mpolygon. Format attribute set: autocad_hatch_gradient_name (if Area Entity Type is set to Hatch With Gradient Pattern); autocad_mpolygon_gradient_name (if Area Entity Type is set to Mpolygon With Gradient Pattern) |
||||||||||||||||||||
Gradient Fill Color 1 |
Gradient Fill Color 1 sets the first color to be used in the gradient pattern that will be used to fill either the hatch or mpolygon. Specifying Colors Colors may be entered directly or chosen from the color picker via the ellipsis button. Syntax
Colors can be specified by RGB values or hex codes. RGB values may be either 24-bit or decimal (0 - 1). If the value type is unclear, as in (1,1,1), the 24-bit interpretation is used. Hex codes are accepted with or without a hash sign (#).
Format attributes set: autocad_hatch_gradient_color1 (if Area Entity Type is set to Hatch With Gradient Pattern); autocad_mpolygon_gradient_color1 (if Area Entity Type is set to Mpolygon With Gradient Pattern) |
||||||||||||||||||||
Gradient Fill Color 2 |
Gradient Fill Color 2 sets the second color to be used in the gradient pattern that will be used to fill either the hatch or mpolygon. Specifying Colors Colors may be entered directly or chosen from the color picker via the ellipsis button. Syntax
Colors can be specified by RGB values or hex codes. RGB values may be either 24-bit or decimal (0 - 1). If the value type is unclear, as in (1,1,1), the 24-bit interpretation is used. Hex codes are accepted with or without a hash sign (#).
Format attributes set: autocad_hatch_gradient_color2 (if Area Entity Type is set to Hatch With Gradient Pattern); autocad_mpolygon_gradient_color2 (if Area Entity Type is set to Mpolygon With Gradient Pattern) |
||||||||||||||||||||
Fill Angle |
Fill Angle sets the angle of the gradient pattern that will be used to fill either the hatch or mpolygon. Format attributes set: autocad_hatch_gradient_angle (if Area Entity Type is set to Hatch With Gradient Pattern); autocad_mpolygon_gradient_angle (if Area Entity Type is set to Mpolygon With Gradient Pattern) |
||||||||||||||||||||
Fill Origin X |
Fill Origin X sets the x coordinate of the origin for the gradient pattern that will be used to fill either the hatch or mpolygon. Format attributes set: autocad_hatch_gradient_origin_point_x (if Area Entity Type is set to Hatch With Gradient Pattern); autocad_mpolygon_gradient_origin_point_x (if Area Entity Type is set to Mpolygon With Gradient Pattern) |
||||||||||||||||||||
Fill Origin Y |
Fill Origin Y sets the y coordinate of the origin for the gradient pattern that will be used to fill either the hatch or mpolygon. Format attributes set: autocad_hatch_gradient_origin_point_y (if Area Entity Type is set to Hatch With Gradient Pattern); autocad_mpolygon_gradient_origin_point_y (if Area Entity Type is set to Mpolygon With Gradient Pattern) |
||||||||||||||||||||
Show Wipeout Border |
Show Wipeout Border sets whether the border of a wipeout entity is visible. Note that this setting is applied at the drawing level, and to set it, FME will use the value of this attribute on the first Wipeout it writes. Format attributes set: autocad_wipeout_border_visible |
Text
When enabled, text features will be prepared for output to AutoCAD DWG/DXF.
Features with other geometry types are not affected by settings in this section.
Text Entity Type |
Text Entity Type specifies the kind of entity that will be created to represent the feature when it is written to AutoCAD DWG/DXF. The choices with the corresponding AutoCAD entity type are:
Format attribute set: autocad_entity |
||||||
TrueType Font Name |
TrueType Font Name sets the name of the font that will be used to draw the text while Multi-Text is chosen for the entity type. Click the browse button to pick the font name. Format attribute set: autocad_mtext_string |
||||||
Text Shape Name |
Text Shape Name sets the name of the shape that will be used to draw the text while Text is chosen for the entity type. Click the browse button to pick the shape name from those defined in the DWG/DXF Template File. Format attribute set: autocad_shape_name |
||||||
Text Justification |
Text Justification sets the justification for text placement. Format attribute set: autocad_justification |
||||||
Text Size |
Sets the size of the text that is placed. Format attribute set: fme_text_size |
||||||
Text Rotation |
Sets the rotation of the text that is placed. Format attribute set: fme_rotation |
||||||
Text |
Sets the text string that will be placed. Format attribute set: fme_text_string |
Annotation Scales
When enabled, text features will set or reset the annotation scale related properties of the text.
The annotation scale selection can be used to choose an annotation name from the default set of Imperial and Metric annotation scale values. These are expected to select and match annotation scale definitions in a default created drawing or in a template file if one is provided. If no matching definition is found, the annotation scale will not be written to the text or multi-text entity. To create new annotation scale definitions, use the annotation scale definition option below.
The annotation scales definition section allows for the creation of new annotation scale definitions in the destination drawing annotation scale list, along with the assignment of those annotation scales to text and multi-text entities. The scale names, paper unit values, and drawing unit values can be entered directly or constructed from attribute values. The exception to this, is if the annotation scale name is already defined in a default created drawing, or in a template file if one is provided.
Format attributes set: autocad_anno_scale{}.name, autocad_anno_scale{}.paper_units, and autocad_anno_scale{}.drawing_units
Force Visible (RealDWG only) |
This is a flag which may be set on a text or multi-text entity to override the destination drawing ANNOALLVISIBLE system variable. When set to true, this forces the object to be displayed regardless of the current scale. Format attributes set: autocad_anno_force_visible |
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.
How to Set Parameter Values
Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
Content Types
These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Dialog Options - Tables
Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the DWGStyler on the FME Community.