Compute Segment for Update (EWRUpdate_ComputeBundleSegment)

An opening ID is an entry point used to customize business logic. The Compute segment for update opening ID is available in the Electrical physical system design resources resource set. It is used to compute the diameter of a segment and the bend radius of a branch (from the list of conductors and conductor groups contained in it).

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This 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.

PLM Opening ID: EWRUpdate_ComputeBundleSegment
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Segment.
  • Parameters corresponds to the context object. The standard context and message attribute are displayed in a warning if the validation fails.
  • Validation: a variable to know if the validation succeeded of failed.

Here is the priority, if several methods for computed segment are used:

  • CAA API
  • Business rule
  • Standard EWR method (based on settings).

Warning: In case of Business Rule failure then the standard EWR method for segment computation should be used.

Context Object Parameters

Parameter NameTypeRead/WriteComments
ListOfWiresAndGroups PLM Entity ReadList 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 ReadDiameter of segment.
BendRadius (length)PLM Entity ReadBend 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)