FORMAT element - Intergraph Smart 3D - Help - Hexagon

Intergraph Smart 3D Isogen Isometric Drawings

Language
English
Product
Intergraph Smart 3D
Subproduct
Drawings and Reports
Search by Category
Help
Smart 3D Version
13.1
Isogen Version
13.0(2016)

The FORMAT element is a child of the REPORT/COLUMN entry.

Use Case 1:

Using a FORMAT element within the REPORT section enables you to specify the unit of measure (UOM) and the format for values in a report.

Basic syntax:

<REPORT>
<COLUMN Name="A" Start="+10">
<FORMAT Units="M" ROUNDING="Up" Style=Decimal" OutputUnits="MM" DecimalFormat="#" UnitsString="mm" IfZero="0"/>
</COLUMN>
</REPORT>

The FORMAT element can contain the following attributes:

  • Units specifies the units of data. The default value is MM. The following values are also supported: M, FT, and IN.

  • Rounding controls whether a numerical value is rounded up, rounded down, or rounded off. Most values are rounded off according to the number of decimal places required. For example, 1.2345M rounds off to 1.2M and 9.8765M rounds off to 9.9M. However, some values, such as quantity, must be rounded up. For example, if the total quantity of pipe to be purchased to fabricate a pipeline is exactly 123.45M, the value shown on the Bill of Materials must be rounded up to 124M (rather than rounded off to 123M). Acceptable values are Up, Down, and Off.

  • OutputUnits specifies the unit of measure of the resulting data. The default value is MM. The following values are also supported: M, FT, IN, and FT-IN.

  • Style specifies the number style. Use Decimal or Fraction. The default value is Decimal. Setting Style to Fraction is observed only if you also set OutputUnits to IN or FT-IN.

  • DecimalFormat specifies a format string in the form "0.000" or "#.###". Isogen replaces a 0 with a digit if there is one. A # is replaced with a digit if there is one or left blank if not value is given. For example, 1.7 is output as 1.700 using the "0.000" format. Using the "#.###" format outputs 1.7.

  • FractionSeparator specifies the character or string used to separate whole inches from fractional inches when OutputUnits is set to FT-IN or IN and Style is set to Fraction. For example, to obtain output in the form 2-1/2", set the following:

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

  • FtUnitsString specifies the character or string that separates feet from 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='-'
    FtUnitsString= "' "

  • UnitsString specifies the character or string to append to the output. For example, to obtain output in the form 1' 2-1/2", set the following:

    Style = 'Fraction'
    OutputUnits='FT-IN'
    FractionSeparator='-'
    FtUnitsString= "' "
    UnitsString = '"'

  • IfZero specifies the character or string to replace the value if it is 0 (zero).

In the above instances, using the FORMAT element requires that you also set the Type attribute for the underlying column to Double. See COLUMN and COLUMNS element.

<TABLE>
<COLUMNS>
<COLUMN Name="A" Content="C.SurfaceArea" Type="Double" />
</COLUMNS>
.....
</TABLE>

...
<REPORT>
<COLUMN Name="A" Content="C.SurfaceArea" Start="+10">
<FORMAT DecimalFormat="#.###"/>
</COLUMN>
</REPORT>

Use Case 2:

When you set the TABLE/COLUMN Type attribute to CharacteristicBore, Isogen Reporting supports multiple FORMAT elements in the REPORT/COLUMN section. In turn, each FORMAT element can have multiple APPLIESTO elements. The APPLIESTO element specifies nominal size and bolt size output within a single column. Acceptable values are:

  • Bolt

  • BoltDiameter

  • BoltLength

  • NS

  • NSn, where n is a value in the range 1-9

Basic syntax:

If the TABLE section contains:

<COLUMN Name="N.S>" Expression="CharacteristicBore" Type="CharacteristicBore" />

The valid corresponding REPORT/COLUMN entry can have multiple APPLIESTO elements:

<COLUMN Name="N.S." Justification="Left">
<FORMAT Units="IN" OutputUnits="IN" UnitsString="" Style="Fraction" FractionSeparator=".">
<APPLIESTO>NS</APPLIESTO>
</FORMAT>
<FORMAT Units="IN" OutputUnits="IN" UnitsString="" Style="Fraction" FractionSeparator=".">
<APPLIESTO>BoltDiameter</APPLIESTO>
</FORMAT>
<FORMAT Units="MM" UnitsString="" Style="Decimal" DecimalFormat="#">
<APPLIESTO>BoltLength</APPLIESTO>
</FORMAT>
</COLUMN>

The syntax in the next example illustrates a valid entry if the BoltLength units are also in inches:

<COLUMN Name="N.S." Justification="Left">
<FORMAT Units="IN" OutputUnits="IN" UnitsString="" Style="Fraction" FractionSeparator=".">
<APPLIESTO>NS</APPLIESTO>
<APPLIESTO>Bolt</APPLIESTO>
</FORMAT>
</COLUMN>

In the following example, the sample syntax defines specific parts of a nominal size (NS):

<COLUMN Name="N.S." Justification="Left">
<FORMAT Units="IN" OutputUnits="IN" UnitsString="" Style="Fraction" FractionSeparator=".">
<APPLIESTO>NS</APPLIESTO>
</FORMAT>
<FORMAT Units="MM" UnitsString="" Style="Decimal" DecimalFormat="#">
<APPLIESTO>NS2</APPLIESTO>
</FORMAT>
</COLUMN>