General InformationInvoke this business rule when you must compute the equivalent gauge of a cavity connected to several cores. The computation is based on:
Input ObjectsThe input objects must be of the following types:
Context Object ParametersThe business rule must return the following output:
SampleYou can use this business rule during the creation of a configured harness:
Let InList(List)
Let Core(Elec3DCableCore)
Let Cable(Elec3DCable)
Let Sum(Real)
Let Count(Integer)
Let Size(Integer)
Let i(Integer)
InList = Parameters->GetAttributeObject("ListOfCores")
Sum = 0.0
Count = 0
Size = 0
If (InList <> NULL){
Size = InList.Size()
i = 1
For i While i <= Size
{
Set Core = InList->GetItem(i)
If (Core <> NULL)
{
Core->GetCable(Cable)
If (Cable <> NULL)
{
Sum = Sum + StringToReal(Cable.V_Elec_Gauge)
Count = Count + 1
}
}
i = i + 1
}
}
If (Count > 0)
{
Parameters->SetAttributeString("EquivalentGauge", ToString(Sum / Count)) }
Else
{
Parameters->SetAttributeString("EquivalentGauge", "")
}
| |||||||||||||||||||||||