Context Object Parameters
Parameter Name |
Type |
Read or Write |
Comments |
ListInputObjects |
List |
Read |
List of the physical occurrences in the root from which
Equipment assemblies are to be identified. |
ListOutputBoolean |
List |
Write |
List of booleans mapped with the input list that indicates if
the product occurrences are to be considered assembly as equipment. |
Sample
let iList(List)
let oList(List)
let index(Integer)
let lsize(Integer)
let inputOcc(ProductOccurrence)
let inputInst(VPMInstance)
let inputRef(VPMReference)
let sName(String)
let sDescriptionInst(String)
let sDescriptionRef(String)
let sMessage (STRING)
set iList = Parameters.GetAttributeObject("ListInputObjects")
index = 1
set lsize = iList.Size()
set sMessage = "Occurrences in List = " + ToString(lsize) + ": "
for index while index <= lsize
{
set inputOcc = iList.GetItem(index)
set sName = ""
set sDescriptionInst =""
set sDescriptionRef = ""
// Notify("Logical Occ : #",logocc.Name)
if (NULL <> inputOcc)
{
sName = inputOcc.Name
set sMessage = sMessage + "|" + sName + "("
//sDescription = inputOcc.GetAttributeString("V_Description")
inputInst = inputOcc.Instance
if (NULL <> inputInst)
{
set sDescriptionInst = inputInst.V_description
if(sDescriptionInst =="")
set sDescriptionInst = inputInst.GetAttributeString("V_description")
set sMessage = sMessage + "I-" + sDescriptionInst + ","
}
inputRef = inputOcc.Reference
if (NULL <> inputRef)
{
set sDescriptionRef = inputRef.V_description
if(sDescriptionRef =="")
set sDescriptionRef = inputRef.GetAttributeString("V_description")
set sMessage = sMessage + "R-" + sDescriptionRef + ")"
}
if( (sDescriptionInst == "AssemblyAsEquipment") or (sDescriptionRef == "AssemblyAsEquipment"))
{
oList.Append(true)
}
else
{
oList.Append(false)
}
}
}
Notify(sMessage)
Parameters.SetAttributeObject("ListOutputBoolean", oList )