Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
ListOfWiresAndGroups
| PLM Entity |
Read | List of conductors and conductor groups routed into the segments.
Conductors included in conductor groups are not listed here, only their respective conductor groups. |
Diameter
(length) | PLM Entity |
Read | Diameter of segment. |
BendRadius
(length) | PLM Entity |
Read | Bend radius of segment. |
Sample
The following sample illustrates how to use the opening ID.
/* CATRule signature (do not edit) : (ThisObject :
#In Segment, Parameters : #In RuleContext) : #Void */
let ListOfElem(LIST)
let Segment(Segment)
let NbElem(INTEGER)
let Diameter(LENGTH)
let BendRadius(LENGTH)
let Wire(Wire)
let WireGroup(WireGroup)
let idx(INTEGER)
set Diameter = 0.0mm
set BendRadius = 0.0mm
Parameters.Severity = 0
Parameters.Message = "Business Rule computed diameter and
bend radius"
set ListOfElem = Parameters->GetAttributeObject
("ListOfWiresAndGroups")
set NbElem = ListOfElem->Size()
Trace (1, "NUmber of Influencing elements = ", NbElem)
idx = 1
for idx while idx <= NbElem
{
set Wire = ListOfElem->GetItem(idx)
set WireGroup = ListOfElem->GetItem(idx)
if(NULL <> Wire)
{
set Diameter = Diameter + Wire.Elec_Diameter
set BendRadius = BendRadius + Wire.Elec_Bend_Radius
}
else if (NULL <> WireGroup)
{
set Diameter = Diameter + WireGroup.Elec_Diameter
set BendRadius = BendRadius + WireGroup.Elec_Bend_Radius
}
}
Parameters.SetAttributeReal("Diameter", Diameter)
Parameters.SetAttributeReal("BendRadius", BendRadius)