Defining Formats
The format defines the page setup of the figure. It includes definitions of the following features:
Length Units
Name
Border
Navigation grid
Title block
* 
Only title block is an optional feature. The others are mandatory.
Formats are defined in an xml file and must have the following header to be valid and recognized as formats when adding to a standard:
<?xml version="1.0" encoding="utf-8"?>
Length Units
Length units must be defined for the formats file. The following units can be set:
MILLIMETER
INCH
POINT
This is an example of format length units:
<formats length_units="MILLIMETER">
Name
The format’s name identifies it. If two formats have the same name, both are listed.
This is an example of a format name:
<format name="format A">
<border>
The border is a single line running around the edge of the figure that defines the usable area. It includes the following features:
Rule
Description
width
Defines the width of the format border.
height
Defines the height of the format border.
line_color
Specifies the color of the border.
line_weight
Specifies the thickness of the border.
This is an example of a border script:
<border width="20.0" height="10.0" line_color="#bf8230" line_weight="0.1"/>
<navgrid>
The navigation grid divides the format vertically and horizontally into segments. The user controls the navigation grid’s visibility. Define these details of the grid:
Rule
Description
start_point
Designates the corner of the border where the reference numbers and letters (grid labels) start (A1).
line_spacing
Defines the spacing between grid lines (vertical and horizontal).
line_color
Specifies the color of the navigation grid when visible.
font_size
Controls font size of the grid.
offset
Defines the distance of the grid labels from the border.
This is an example of a navigation grid script:
<navgrid start_point="bottom left" line_spacing="2.0" line_color="#a65f00"
font_size="10" offset="1.0"/>
<titleblock>
The title block is a rectangular block with an outline and one or more sections of text. It contains a title or description and can contain references to the illustrated items and additional notes and references.
A list of title blocks can be empty. It can also have one or more <titleblock> tags.
A list of text sections can be empty. It can also have one or more <section> tags.
The title block contains a title section and other sections for text.
The font in all sections is constant, but of different sizes and styles (bold, italics).
Each section inherits the settings from the previous section, unless otherwise defined.
If a line of text is too long, it wraps onto a new line.
The height of a title block is the sum of all lines of text, including line spacing, and the margin.
The definition for the title block outline includes the following details:
Rule
Description
name
The name must be unique.
min_width
Sets the minimum width of the title block when re-sized.
min_height
Sets the minimum height of the title block when re-sized.
position
Sets the corner of the border that the title block is aligned with. The stretch direction away from the border
line_color
Defines the color of the title block border.
line_weight
Defines the width of the title block border.
bgcolor
Defines the color of title block background.
margin
Defines the minimal distance of the text sections from the title block borders.
offset_x
Defines horizontal distance from the border.
Maximum offset_x = border width minus min_width
offset_y
Defines vertical distance from the border.
Maximum offset_y = border height minus min_height
* 
If no offsets are defined, the two sides to which the title block is aligned, touch the border.
The definition of text for a section of a title block includes the following details:
Rule
Description
sections
There are three types of text in a title block.
const_text
User cannot delete or change.
edit_text
User can edit.
dynamic_text
The text is interpreted and replaced by the Creo Illustrate application in real time, but the user cannot delete or change.
font_size
Sets font size for the text included in this section.
bold
Sets style for the text included in this section.
italic
Sets style for the text included in this section.
font_color
Sets font color for the text included in this section.
alignment
Aligns the text section to the left, middle, or right.
section_spacing
Defines the space between the current section and the following section.
This is an example of text for a section of a title block outline and script:
<titleblocks>
<titleblock name="Title block - Text types" min_width="90.0" offset_x="1" offset_y="1"line_color="#000000" line_weight="0.3" bgcolor="#ffffff" margin="1"position="bottom right">
<sections>
<section font_size="5" bold="true" italic="false" underline="false" strikeout="false"font_color="#000000" alignment="left" section_spacing="0.1">
<const_text>This is constant text, </const_text><edit_text> This text can be edited </edit_text><const_text> the following are all dynamic text:</const_text>
<const_text>&#xA;author = </const_text><dynamic_text>author </dynamic_text>
<const_text>&#xA;created = </const_text><dynamic_text>created </dynamic_text>
<const_text>&#xA;figure name = </const_text><dynamic_text>figure name </dynamic_text>
<const_text>&#xA;file name = </const_text><dynamic_text>file name </dynamic_text>
<const_text>&#xA;last modified = </const_text><dynamic_text> last modified</dynamic_text>
<const_text>&#xA;last modified by = </const_text><dynamic_text> last modified by</dynamic_text>
</section>
<section font_size="4" bold="false" italic="true" underline="false" strikeout="false" font_color="#4a69bd" alignment="middle" section_spacing="0.1">
<const_text>Multiple sections can be defined.Each section can have its own styling.</const_text>
</section>
</section>
</titleblock>
Continue to the next section for information on defining attribute rules.
Was this helpful?