Customize 2D Representation (RFLP_2DRepresentation)

An opening ID is an entry point used to customize business logic. The RFLP_2DRepresentation business logic allows to customize the graphic properties of 2D representation. The computation script (RFLP_2DRepresentation.CATRule) is located in the following directory:InstallRepository\resources\resources\knowledge\scripts

Important: In a diagram view, the following graphic properties can be customized only for routes, symbols and connection points:
  • ContourLineColor
  • ContourLineThickness
  • ContourLineType
Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

RFLP_2DRepresentation

General Information

This opening ID is invoked every time an object is displayed in the 2D graph to customize the 2D representation graphic properties.

Important: To avoid impact on performances (too many server calls), the RFLP_2DRepresentation business rule must not be defined in the Data Setup.

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: RFLP_2DRepresentation
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following type:ThisObject.

They must be function or logical component. 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).

Context Object Parameters

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

Note: If a graphic property is not defined in the script, the default value (defined from Me > Preferences) is used instead.
Parameter NameTypeRead/WriteComments
SetAttributeStringString ComputeTo valuate the graphic properties to be applied on the 2D graph without modifying ThisObject

Sample

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.
  • Parameters: All graphic properties are valuated on this object and 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 color code.

Attributes for Functions and Logical Components, Flow Associations and Ports

The following graphic attributes can be customized by this business rule.

ContourLineColor

Graphic 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

Graphic properties of the 2D representation border.

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

ContourLineType

Graphic properties of the 2D representation border.

Graphic 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

Graphic properties of the text associated with the 2D representation of an object.

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

TextFontSize

Graphic properties of the text associated with the 2D representation of an object.

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

TextColor

Graphic 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

Attributes for Functional and Logical Connections

The following graphic attributes can be customized by this business rule.

LineColor

Graphic 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

Graphic properties of 2D representation.

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

LineType

Graphic 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

Graphic 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

Graphic 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

Graphic 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

Graphic 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