Configuring 3D Profiles
This chapter provides an overview of 3D profiles which are defined in an xml file. The xml file can then be added to a standard using the Creo Illustrate Administration Tool.
The 3D profiles that are defined in the xml file must have the following header to be valid and recognized as 3D profiles when added to a standard:
<?xml version="1.0" encoding="utf-8"?>
Length Units
Length units must be defined for the 3D profiles. The following units can be set:
MILLIMETER
INCH
POINT
This is an example of 3D profiles length units:
<profiles length_units="MILLIMETER">
You can define these characteristics in a 3D profile:
Profile name (mandatory), for example,
<profile name="Yellow color to all figure items">- <start tag>
Rules —Define the set of rules contained in a profile. 3D figure rules can contain one or more <if> and exactly one <then> statement.
<rule type="3D_Figures">
The existence of an <if> statement is optional. When <if> is not defined, then <then> applies to all items. <if> conditions can be combined with Bboolean <and|or|not> tags. Not using Boolean tag is treated as <and> for all conditions inside the <if> statement.
You can include the following condition types in an argument. You can use the following arguments to define the condition:
Arguments
Description
item
Sets the item to which the condition is applied. (Sets the item on which to apply the condition.)
type
Defines the type of the item. You can use regexpr when regexpr=true (optional).
name
Defines the name of the item. You can useregexpr when regexpr=true (optional).
regexpr
When set to true, you can use regular expressions in conditions.
equal
When set to true, the values of arguments (type/name) must be equal for condition to be true.
caseins
When set to true, the condition is case sensitive.
This is an example of a condition applied to:
<item type="co*" name="*1*" regexpr="true" equal="true" caseins="true"/>
<attribute>—Sets the condition which is applied to item attributes.
Attribute Arguments
Description
name
The name of the attribute. You can use regexpr when regexpr=true (optional).
value
The value of the attribute. You can use regexpr when regexpr=true (optional).
equal
When set to true, the values of arguments (type/name) must be equal for condition to be true.
regexpr
Use regular expressions in the condition.
caseins
Case sensitive when the statement is true.
This is an example of a condition applied to the attributes of items:
<attribute name="name" value="value" regexpr="true" equal="true" caseins="true"/>
then—A rule must have a then argument. Only add the argument when you want to apply the rule. It contains everything that applies to the rule.
item- Sets the override to an item.
Item Arguments
Description
phantom
Sets the phantom value of the item.
transparency
Sets the transparency value of the item.
color
Sets the color value of the item.
figure—Sets an override to a figure argument:
Figure Arguments
Description
background
Sets the background color value of the figure.
background — gradient
Sets the background gradient color value of the figure.
<?xml version="1.0" encoding="utf-8"?>
<profiles length_units="MILLIMETER">
<profile name="Profile A">
<rules>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="bolt*"/>
<attribute name="Source_file_name" value="bolt.prt.1"/>
</and>
</if>
<then>
<item color="#00ff00" transparency="25.0"/>
</then>
</rule>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="nut*"/>
</and>
</if>
<then>
<item color="#ff00ff"/>
</then>
</rule>
</rules>
</profile>
<profile name="Profile B">
<rules>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="DIN*"/>
</and>
</if>
<then>
<item phantom="true"/>
</then>
</rule>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="Brake*"/>
</and>
</if>
<then>
<item transparency="20.0"/>
</then>
</rule>
</rules>
</profile>
<profile name="Profile C">
<rules>
<rule type="3D_Figure">
<then>
<figure background="#ff00ff" background-gradient="#00ff00"/>
</then>
</rule>
</rules>
</profile>
<profile name="Profile D">
<rules>
<rule type="3D_Figure">
<if>
<and>
<attribute name="Feature_Id" value="1337"/>
</and>
</if>
<then>
<item color="#f0b823"/>
</then>
</rule>
</rules>
</profile>
</profiles>
Was this helpful?