General InformationThis opening ID is invoked when using the Synchronize Called with Main command.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample shows how to compare attributes using the Schematic_GetAttributesForSynchronization opening ID
Let ListObjectTypes(list)
set ListObjectTypes = Parameters.GetAttributeObject("List_Object_Types")
Let ListofListRefAttrs(list)
Let ListofListInsAttrs(list)
Let i(Integer)
set i=1
for i while i<=ListObjectTypes->Size()
{
Let ObjectType(String)
set ObjectType = ListObjectTypes->GetItem(i)
Let AttrName(String)
Let ListRefAttrNames(list)
Let ListInsAttrNames(list)
if(ObjectType == "Piping_Logical_Valve")
{
set AttrName = "V_NominalSize"
ListInsAttrNames.Append(AttrName)
}
else if (ObjectType == "EnsLogicalEquipment")
{
set AttrName = "V_Ens_SubType"
ListRefAttrNames.Append(AttrName)
set AttrName = "V_Name"
ListRefAttrNames.Append(AttrName)
set AttrName = "V_description"
ListInsAttrNames.Append(AttrName)
set AttrName = "PLM_ExternalID"
ListInsAttrNames.Append(AttrName)
}
else if (ObjectType == "EleLogicalCable")
{
set AttrName = "V_Elec_NbGroups"
ListRefAttrNames.Append(AttrName)
}
else if (ObjectType == "EleLogicalCable")
{
set AttrName = "V_Elec_NbGroups"
ListRefAttrNames.Append(AttrName)
}
else if (ObjectType == "Piping_Line")
{
set AttrName = "V_Standard"
ListRefAttrNames.Append(AttrName)
set AttrName = "V_PipeSpecification"
ListRefAttrNames.Append(AttrName)
set AttrName = "V_NominalSize"
ListRefAttrNames.Append(AttrName)
}
ListofListRefAttrs.Append(ListRefAttrNames)
ListofListInsAttrs.Append(ListInsAttrNames)
i = i + 1
}
Parameters.SetAttributeObject("List_List_Instance_Attr", ListofListInsAttrs)
Parameters.SetAttributeObject("List_List_Reference_Attr", ListofListRefAttrs)
A list of object types is instantiated. In this list, the input parameter, List_Object_Types, is set. Two lists of list are instantiated, one for the reference attributes and another for the instance attributes. A loop is run for every object type, for which the EKL opening has to run for. For every object, an attribute type has to be addressed for synchronization. This attribute is appended in a list depending on whether it is an instance attribute or a reference attribute. In this example, if the object type is Piping_Logical_Valve, an
instance attribute, V_NominalSize, has to be appended to the list
( These lists are appended in the lists of list depending on if they are attributes, instances, or references. These lists are set as output parameters. | |||||||||||||||||||||||||||||||||||||||