About Graphical Attributes Customization

This document deals with the computed attributes that can be applied to RFLP_2DRepresentation.CATRule. This script is used to customize the 2D graphical representation of Functions and Logical components.

However, in a diagram view, the following graphical properties only can be applied to the routes, symbols and connection points:

  • ContourLineColor
  • ContourLineThickness
  • ContourLineType

Important: This rule can be applied in the main view and in the diagram view.

This page discusses:

Business Logic Intent

This section provides you with information about the business logic intent.

General

This computation script, RFLP_2DRepresentation.CATRule, is located in the following directory:

InstallRepository\resources\resources\knowledge\scripts

This script cannot be renamed.

This script should be modified by an administrator.

Example

Here is an example of a 2D graph that has been customized:

The function with attribute Description=Critical has its 2D representation colored in red.

PLM Opening Definition

This script is called for each object displayed in the 2D Graph (each time it is drawn). The objective is to compute the 2D representation from the state of this object. The script has the following input/output:

Input

ThisObject : Function or Logical component from which the 2D representation is to be customized. The script is called in computation mode. That means that ThisObject cannot be modified by the rule, so only methods to read attributes are authorized on ThisObject, otherwise an error message is displayed.

Input / Output

Parameters: Object providing contextual information of the opening (current user identification, role, project, organization and message) and allowing the specification of the graphical properties to overwrite.

Note: If a graphical property is not defined in the script, the default value (defined from Me > Preferences > App Preferences > 3D Modeling ) is used instead.

Functions and Logical Components, Flow Associations and Ports

The following graphical attributes can be customized by this rule.

ContourLineColor

Graphical properties of the 2D representation border.

ValueMethod to Set (Keyword)Method to Get (Keyword)
String with format RGB with:
  • R: Red color from 0 to 255
  • G: Green color from 0 to 255
  • B: Blue color from 0 to 255
SetAttributeStringValue=GetAttributeString

ContourLineThickness

Graphical properties of the 2D representation border.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Integer from 1 to 63SetAttributeIntegerValue=GetAttributeInteger

ContourLineType

Graphical properties of the 2D representation border.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Integer from 1 to 63 with:
  • 1=Solid
  • 2=Dotted
  • 3=Dashed
  • 4=Dot-dashed
  • 5=Phantom
  • 6=Small-dotted
  • 7=JIS Axis
  • 8 to 63=Solid or application dependant
SetAttributeIntegerValue=GetAttributeInteger

BackgroundColor

Color of the 2D representation background.

ValueMethod to Set (Keyword)Method to Get (Keyword)
String with format RGB with:
  • R: Red color from 0 to 255
  • G: Green color from 0 to 255
  • B: Blue color from 0 to 255
SetAttributeStringValue=GetAttributeString

BackgroundTransparency

Transparency of the 2D representation background.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Integer from 0 to 100, with:
  • 0=Transparent
  • 100=Opaque
SetAttributeIntegerValue=GetAttributeInteger

MinimizeStatus

Minimize status for 2D representation.

ValueMethod to Set (Keyword)Method to Get (Keyword)
true=Port or instance minimizedMinimizeStatusValue=GetAttributeBoolean

ShadowVisibility

Show or hide the shadow behind the 2D representation of a function or logical component.

By default, the value is true and the shadow appears.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Boolean={true, false}SetAttributeBooleanValue=GetAttributeBoolean

TextVisibility

Graphical properties of the text associated to the 2D representation of an object.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Boolean={true, false}SetAttributeBooleanValue=GetAttributeBoolean

TextFontSize

Graphical properties of the text associated to the 2D representation of an object.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Integer from 1 to 63SetAttributeIntegerValue=GetAttributeInteger

TextColor

Graphical properties of the text associated to the 2D representation of an object.

ValueMethod to Set (Keyword)Method to Get (Keyword)
String with format RGB with:
  • R: Red color from 0 to 255
  • G: Green color from 0 to 255
  • B: Blue color from 0 to 255
SetAttributeStringValue=GetAttributeString

Functional and Logical Connections

The following graphical attributes can be customized by these rules.

LineColor

Graphical properties of 2D representation.

ValueMethod to Set (Keyword)Method to Get (Keyword)
String with format RGB with:
  • R: Red color from 0 to 255
  • G: Green color from 0 to 255
  • B: Blue color from 0 to 255
SetAttributeStringValue=GetAttributeString

LineThickness

Graphical properties of 2D representation.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Integer from 1 to 63:SetAttributeIntegerValue=GetAttributeInteger

LineType

Graphical properties of 2D representation.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Integer from 1 to 63 with:
  • 1=Solid
  • 2=Dotted
  • 3=Dashed
  • 4=Dot-dashed
  • 5=Phantom
  • 6=Small-dotted
  • 7=JIS Axis
  • 8 to 63=Solid or application dependant
SetAttributeIntegerValue=GetAttributeInteger

TextVisibility

Graphical properties of the text associated to the 2D representation of an object.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Boolean={true, false}SetAttributeBooleanValue=GetAttributeBoolean

TextFontName

Graphical properties of the text associated to the 2D representation of an object.

ValueMethod to Set (Keyword)Method to Get (Keyword)
String=name of the fontSetAttributeStringValue=GetAttributeString

TextFontSize

Graphical properties of the text associated to the 2D representation of an object.

ValueMethod to Set (Keyword)Method to Get (Keyword)
Integer from 1 to 63SetAttributeIntegerValue=GetAttributeInteger

TextColor

Graphical properties of the text associated to the 2D representation of an object.

ValueMethod to Set (Keyword)Method to Get (Keyword)
String with format RGB with:
  • R: Red color from 0 to 255
  • G: Green color from 0 to 255
  • B: Blue color from 0 to 255
SetAttributeStringValue=GetAttributeString

Sample

Here is a sample of a script.

Syntax

In this sample, we apply a red background color to the 2D representation if the value of the attribute "V_description" is equal to "Critical":

If (ThisObject.V_description=="Critical"
Parameters->SetAttributeString("BackgroundColor","255 | 0 | 0

Definition

ThisObject
Current function or logical component.
V_description
Attribute on ThisObject.
ThisObject
Parameters
All graphical properties are valuated on this object to be applied on the 2D graph without modifying ThisObject.
SetAttributeString
Knowledge method to valuate the attribute.
BackgroundColor
Keyword for the background color.
255 | 0 | 0
RGB code of the color.