General InformationThis opening ID is invoked when a new symbol or route is placed in a diagram view using one of the following commands:
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleIn the following sample, the rule compares the system name of sheet with the system name of logical object. Here the system name of logical object is taken from the V_description attribute of logical instance. If they are identical, then it returns main representation else it returns called representation.
let ThisOccObject (LogicalOccurrence) set ThisOccObject = ThisObject Let output_Is_Main(Boolean) set output_Is_Main = true let SheetSystemOcc(LogicalOccurrence) set SheetSystemOcc = Parameters.GetAttributeObject ("Sheet_System") let SystemSheetRef(RFLVPMLogicalReference) set SystemSheetRef = SheetSystemOcc.Reference Let IsMainAlreadyPlace(Boolean) set IsMainAlreadyPlace = Parameters.GetAttributeBoolean ("Is_Main_Already_Placed") if(NULL <> SystemSheetRef) { let SystemSheetName(string) set SystemSheetName = SystemSheetRef.Name let ObjectInstance(RFLVPMLogicalInstance) set ObjectInstance = ThisOccObject.Instance if(NULL <> ObjectInstance) { let SystemObjectName(string) set SystemObjectName = ObjectInstance.GetAttributeString("V_description") if(SystemObjectName == "" OR (SystemObjectName == SystemSheetName AND IsMainAlreadyPlace == FALSE)) set output_Is_Main = true else set output_Is_Main = false } } Parameters.SetAttributeBoolean("Is_Main", output_Is_Main) |