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.
Parameters – 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
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.
Parameters – Block/Style Name Source
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.
If this section is active, 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 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 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 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 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 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 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)
If this section is active, 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 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 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 specifies the thickness of the line when it is rendered, measured in hundredths of a millimeter.
Format attribute set: autocad_lineweight
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 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
If this section is active, then 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 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:
Area Entity Type Option | autocad_entity |
---|---|
Hatch With Fill Pattern | autocad_hatch |
Hatch With Gradient Pattern | autocad_hatch |
MPolygon With Fill Pattern | autocad_mpolygon |
MPolygon With Gradient Pattern | autocad_mpolygon |
Polygon | autocad_polygon |
Region | autocad_region |
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 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 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 sets the first color to be used in the gradient pattern that will be used to fill either the hatch or mpolygon.
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 sets the first color to be used in the gradient pattern that will be used to fill either the hatch or mpolygon.
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 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 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 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)
If this section is active, 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 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:
Area Entity Type Option | autocad_entity |
---|---|
Text | autocad_text |
Multi-Text | autocad_multi_text |
Format attribute set: autocad_entity
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 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 sets the justification for text placement.
Format attribute set: autocad_justification
Sets the size of the text that is placed.
Format attribute set: fme_text_size
Sets the rotation of the text that is placed.
Format attribute set: fme_rotation
Sets the text string that will be placed.
Format attribute set: fme_text_string
If this section is active, 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
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
Additional References
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.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
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. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
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.
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
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.
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for samples and information about this transformer on the FME Community.