Rule to Choose a Representation (Schematic_GetSymbol_GraphicAttr_FromRepMode)

An opening ID is an entry point used to customize business logic. The Schematic_GetSymbol_GraphicAttr_FromRepMode opening ID provides information about the symbol to be used during the placement and also apply graphic properties on the Symbols or routes based on the main and called representations' graphics properties. Main and Called Representations can have different graphic properties.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when a new symbol or route is placed in a diagram view using one of the following commands:

  • Create New Reference
  • Insert New Reference
  • Insert Existing Reference
  • Create From Existing Reference
  • Insert From Catalog
  • Place in View
  • Route in View
  • Create Route

Definition Description
PLM Opening ID Schematic_GetSymbol_GraphicAttr_FromRepMode
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Logical Occurrence
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
Is_Main (input) Boolean Read States the current representation as main or called.
List_All_Symbol_Names (input) List Read

Lists the names of symbol references available for the input object.

Symbol_Name (output) String Write

The name of the symbol reference to be used to represent a logical object.

Alternate_Rep_Name (output) String Write The name of alternate representation to be activated.
List_Visualization_Attr_Names (output) List Write Names of visualization attributes which can be on the symbol:
  • Sch_LineColor : Expected value is list of integers (R, G, B)
  • Sch_LineThickness: Expected value is integer
  • Sch_LineType : Expected value is integer
List_Visualization_Attr_Values (output) List Write

Values of visualization attributes

to be applied on the symbol.

Sample

In the following sample, the rule returns a different symbol name and graphic attributes for main and called representations.

Let sSymbolName(string)
Let LGraphicAttrNames(list)
LGraphicAttrNames.Append("Sch_LineColor")
LGraphicAttrNames.Append("Sch_LineThickness")
LGraphicAttrNames.Append("Sch_LineType")
Let LGraphicAttrValues(list)
Let LRGB(list)
Let bIsMain(Boolean)
set bIsMain = Parameters.GetAttributeBoolean("Is_Main")
if(true == bIsMain)
{
                set sSymbolName="MainSymbol"
                LRGB.Append(0)
                LRGB.Append(255)
                LRGB.Append(0)
                LGraphicAttrValues.Append(LRGB)
                LGraphicAttrValues.Append(2)
                LGraphicAttrValues.Append(1)
}
else if(false == bIsMain)
{
                set sSymbolName="CalledSymbol"
                LRGB.Append(255)
                LRGB.Append(0)
                LRGB.Append(0)
                LGraphicAttrValues.Append(LRGB)
                LGraphicAttrValues.Append(5)
                LGraphicAttrValues.Append(3)
}
Parameters.SetAttributeString("Symbol_Name", sSymbolName)
Parameters.SetAttributeObject("List_Visualization_Attr_Names", LGraphicAttrNames)
Parameters.SetAttributeObject("List_Visualization_Attr_Values" , LGraphicAttrValues)