FORMATS statement - CADWorx - Help

CADWorx Plant

Language
English
Product
CADWorx
Subproduct
Plant
Search by Category
Help
Isogen Version
15
Smart Isometrics Version
8
Spoolgen Version
10
CADWorx Version
22

Contains a list of child FORMAT elements, which support units conversion and formatting of results for values retrieved from the POD file. This list allows easier matching between results from the POD file and data in the external source.

For example, if the data source contains nominal size information using a fractional representation for inch bores, you can format the POD data the same way. For example, you can format 2.5 as 2-1/2".

FORMATS Attributes

Description

Data

The name of the POD property to be formatted, which is mandatory. For example to control the format of the component SIZE1 property, use Data = 'C.SIZE1'.

Units

The units of the data in the POD. The default setting MM. Also allowed are , M, FT, IN, KG, LB. For example, if the POD component attribute WEIGHT contains data in pounds, set Units='LB'.

OutputUnits

The units for the data when used in an expression. The default is MM. Also allowed are , M, FT, IN, FT-IN, KG, LB. For example, if the external data source contains a value in inches that you want to match with, set OutputUnits='IN'.

Style

Use DECIMAL or FRACTION. The default is DECIMAL. FRACTION is observed if OutputUnits = IN or OutputUnits = FT-IN.

DecimalFormat

A format string in the form "0.000" or "#.###". A 0 is replaced with a digit if there is one. A # is replaced with a digit if there is one or blank. For example, 1.7 is output as 1.700 using the "0.000" format and 1.7 using the "#.###" format.

FractionSeparator

A character or string to be used to separate the whole inches from the fractional inches if the OutputUnits = 'FT-INS' or 'IN' and Style = 'FRACTION'. For example, to obtain output in the form 2-1/2" set the following:

Style = 'FRACTION'
OutputUnits = 'IN'
FractionSeparator = "-"

FtInSeparator

A character or string to be used to separate the ft from the inches in FT-IN output. For example, to obtain output in the form 1' 2-1/2", set the following:

Style = 'FRACTION'
OutputUnits='FT-IN'
FractionSeparator='-'
FtInSeparator = "' "

UnitsString

A character or string to be appended to the output. For example to obtain output in the form 1' 2-1/2", set the following:

Style = 'FRACTION'
OutputUnits='FT-IN'
FractionSeparator='-'
FtInSeparator = "' "
UnitsString = '"'

IfZero

A character or string to replace the value if it is zero ( 0 ).

Basic syntax:

<FORMATS>
<FORMAT Data='Property' Units='' OutputUnits='' Style='' DecimalFormat='' FractionSeparator='' FtInSeparator='' UnitsString='' IfZero='' />
</FORMATS>