Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
Returned value | Length | Write | Corresponds to the additional length. |
Sample
The following sample illustrates how to use the knowledge method Conductor.GetRouteBendInformation() in the business rule.
/* Declare list variables */
Let listAngle(LIST)
Let listEntrySegment(LIST)
Let listExitSegment(LIST)
/* call knowledge method on the conductor */
ThisObject.GetRouteBendInformation(listAngle, listEntrySegment, listExitSegment)
/* Count number of angles */
Let nbBend(Integer)
set nbBend = listAngle.Size()
/* Add extra length following the number of bend found on the conductor*/
Let extraLength (LENGTH)
set extraLength = 100mm * nbBend
/* Store variable extralength in attribute "AdditionalLength" of the Business rule*/
Parameters.SetAttributeReal("AdditionalLength",extraLength)