General InformationThis opening ID is invoked when post-processing the architecture component architecture number.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
Write Architecture Number in Logical Objects DescriptionThe following sample write the architecture number of the architecture component in the description of its related logical objects.
let ListSelectedObjects(List)
let ListObjectsToItemize(List)
set ListSelectedObjects = Parameters.GetAttributeObject("Input_ListSelectionOccurrence")
//Go through the list and remove pipes
let LogicalPipeRef(Piping_Logical_Pipe)
let LogicalReducerRef(Piping_Logical_Reducer)
let LogicalOcc(LogicalOccurrence)
for LogicalOcc inside ListSelectedObjects
{
set LogicalPipeRef = LogicalOcc.Reference
set LogicalReducerRef = LogicalOcc.Reference
//Keep only the objects that are not Pipes or Reducers
if(LogicalPipeRef == NULL and LogicalReducerRef == NULL)
{
ListObjectsToItemize.Append(LogicalOcc)
}
}
Parameters.SetAttributeObject("Output_ListObjectsToItemize", ListObjectsToItemize)
Rule for post-process after association with Items
Execution Mode: Execution
Parameter Name Type Comments
Fact object (Input) Occurrence The Occurrence containing the Piping/Electrical/HVAC design and linked to the Item system.
Input_ListItemizedObjs
(Input) List The user can modify the attributes of those objects. It contains Logical Occurrences.
Input_ListAssociatedItems
(Input) List The list of Items associated to the objects. It contains Logical Instances.
For example, the following rule will write the architecture number of the Item in the description of its related applicative object:
let ListItemizedObjects(List)
let ListAssociatedItems(List)
set ListItemizedObjects = Parameters.GetAttributeObject("Input_ListItemizedObjs")
set ListAssociatedItems = Parameters.GetAttributeObject("Input_ListAssociatedItems")
//Go through the list and remove pipes
let LogicalObject(LogicalOccurrence)
let AssociatedItemInst(RFLVPMLogicalInstance)
let AssociatedItemRef(RFLVPMLogicalReference)
let CurrentIndex(Integer)
set CurrentIndex = 1
for LogicalObject inside ListItemizedObjects
{
set LogicalObject = ListItemizedObjects.GetItem(CurrentIndex)
set AssociatedItemInst = ListAssociatedItems.GetItem(CurrentIndex)
set AssociatedItemRef = AssociatedItemInst.Reference
let ArchitectureNumber(String)
set ArchitectureNumber = AssociatedItemRef.GetAttributeString("V_ArchitectureNumber")
let LogicalInst(RFLVPMLogicalInstance)
set LogicalInst = LogicalObject.Instance
//Copy the title of the Item in the description of the logical object
LogicalInst.SetAttributeString("V_description", ArchitectureNumber)
set CurrentIndex = CurrentIndex + 1
| |||||||||||||||||||||||||||||||||||