Configuring 3D and Schematic Standards > Defining Profiles
  
Defining Profiles
Profiles (<profile>) are optional sets of rules defined within a standard to control the display of items in a figure. You can define multiple profiles within the standard for users to apply to a figure. Profiles control the appearance of data, such as color and line weight, as well as the visibility of user-added content. Rules are applied in the order in which they appear in the profile.
The table below displays items that are definable by profile rules, and characteristics that need to be defined:
Item
Rules included
Components
Line style
Line weight
Line color
Fill color
Pins
Line style
Line weight
Line color
Fill color
Wires
Line style
Line weight
Line pattern or color
Highways
Line style
Line weight
Line color
Cables
Line style
Line weight
Line color
You can define these characteristics in a Schematic profile:
Profile name (mandatory)
rules—Define the set of rules contained in a profile. Schematics rules can contain one or no <if> and exactly one <then> arguments.
<rule type="schematics">
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 boolean <and|or|not> tags. Not using any of these will be treated as <and> for all conditions inside <if>.
You can include the following condition types in an argument:
arguments
Description
item
Sets the item to which the condition is applied.
type
Defines the type of the item. You can use regexpr if regexpr=true (optional).
name
Defines the name of the item. You can use regexpr if 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 items:
<item type="co*" name="*1*" regexpr="true" equal="true" caseins="true"/>
<attribute>—Sets the condition which is applied to attributes of items
attribute arguments
Description
name
The name of the attribute. You can use regexpr if regexpr=true (optional).
value
The value of the attribute. You can use regexpr if 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 the rule applies to.
bgcolor—Sets the background color of the figure. Use it only with an empty condition.
<bgcolor></bgcolor>
line—Sets the line style (optional).
line style arguments
Description
style
Selects the style of the line. For instance, multicolored, solid, dashed, and dotted.
Default value is solid.
color
Sets the color of the line.
weight
Sets the width of the line.
spacing
Sets the space between dots of the dotted style.
Default value is 0.5 mm.
pattern
Describes the pattern of the dashed line style.
Default value is 0.5 mm.
text_color
Sets the color of the line text.
border_color
Sets the color of the line border.
Default value is black.
border_weight
Sets the width of the line border in percentage where 100% is 1 and 40% is 0.4.
Default value is 0.1.
colorseg
Includes:
color—Sets the color of the segment.
length—Sets the length of the segment.
Applies only when multicolor is selected.
Each colorseg tag adds a color to the style.
If length is not defined then last length is used.
If there are no lengths, or all lengths are 0, then the border weight is used as length, in which case all color segments are squares.
* 
Border is applied only if the following line style parameters are defined:
border_color or border_weight
solid or multicolor
color or colorseg
Examples of line arguments
Single color solid line:
<then>
<line color="#00ff00" weight="1"/>
</then>
Stripe with border:
<then>
<line style="multicolor" text_color="#0000ff" border_color="B900FC" border_weight="0.4" color="#07EDF9" weight="1">
<colorseg color="#07EDF9" length="0.6"/>
<colorseg color="#FFFFFF"/>
</line>
</then>
Dotted:
<then>
<line style="dotted" spacing="2" color="#ff0000"/>
</then>
Dashed:
<then>
<line style="dashed" pattern="3.5;1;0.5;1.0;3.5;4;" weight="0.6"/>
</then>
Angled stripe:
<then>
<line style="multicolor" angle="30" color="#888888" weight="0.6">
<colorseg color="#ff0000" length="0.2"/>
<colorseg color="#00ff00" length="0.1"/>
<colorseg color="#0000ff" length="0.3"/>
</line>
</then>
* 
You can set any angle between -45 and +45 degrees, and also 90 degrees.
Examples of Crossing Point Styles
This example shows the arguments of four styles in which lines can cross.
Arc with vertical on top:
<profile name="Vertical Arc connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="arc"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="true"/>
</then>
</rule>
</rules>
</profile>
Arc with horizontal on top:
<profile name="Arc connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="arc"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="false"/>
</then>
</rule>
</rules>
</profile>
Gap with horizontal on top:
<profile name="Gap connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="gap"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="false"/>
</then>
</rule>
</rules>
</profile>
No connection crossing style:
<profile name="None connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="none"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="false"/>
</then>
</rule>
</rules>
</profile>
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 no <if> and exactly one <then> arguments.
<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 boolean <and|or|not> tags. Not using any of these will be treated as <and> for all conditions inside <if>.
You can include the following condition types in an argument:
Arguments
Description
item
Sets the item to which the condition is applied.
type
Defines the type of the item. You can use regexpr if regexpr=true (optional).
name
Defines the name of the item. You can use regexpr if 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 items:
<item type="co*" name="*1*" regexpr="true" equal="true" caseins="true"/>
<attribute>—Sets the condition which is applied to attributes of items
attribute arguments
Description
name
The name of the attribute. You can use regexpr if regexpr=true (optional).
value
The value of the attribute. You can use regexpr if 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 the rule applies to.
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.
<profile name="Profile A">
<rules>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="49130031*"/>
<attribute name="Source_file_name" value="49130031.prt.2"/>
</and>
</if>
<then>
<item color="#00ff00" transparency="25.0"/>
</then>
</rule>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="49130032*"/>
</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>