General InformationThis opening ID is invoked when using the Segments Diameter command. See Electrical 3D Design User's Guide: Routing Conductors: Updating the Segments Diameter. This opening ID is triggered when updating a segment from its wiring content. The table below provides you with information related to the definition of the Opening ID.
Input ObjectsInput objects must be of the following types:
Here is the priority, if several methods for computed segment are used:
Context Object Parameters
SampleThe 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)
| ||||||||||||||||||||||||||||||