Fluidic (Piping/HVAC) BOM Table Template Business Rule (Piping_Spool_Length)

An opening ID is an entry point used to customize business logic. The Piping_Spool_Length business rule opening ID is used by assembly isometric to compute the length property of a Piping_Spool.

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 during the creation of a Piping or a HVAC BOM table template.

It takes the sum of the length of the pipes in the spool.

Customizing this rule lets you to implement another way to compute the length of spools.

Sample

Result = NULL

Trace(2,"Spool length EKL code...")

let PipingSpoolObject(Piping_Spool)
let PipingPartObject(Piping_Part)
let PipingPipeObject(Piping_Pipe)

let ChildOcc(ProductOccurrence)
let ChildrenList(List)
let i(Integer)
let TotalLength(Real)

TotalLength = 0.0

set PipingSpoolObject = ThisObject.Reference

  
if (PipingSpoolObject <> NULL)
{
  Trace(2,"Spool name = ",PipingSpoolObject.Name)
  
  Result = 0.0
  // Result = PipingPipeObject.V_Length
  ChildrenList = ThisObject.Children 
  i=1
  for i while i < ChildrenList.Size()
  {
	set ChildOcc = ChildrenList->GetItem(i)
	if(ChildOcc <> NULL){
		set PipingPipeObject = ChildOcc.Reference
		if( PipingPipeObject <> NULL ){
			TotalLength = TotalLength + PipingPipeObject.V_Length
		}
	}
	else {
		set PipingPartObject = ChildOcc.Reference
		if( PipingPartObject <> NULL ){
			TotalLength = TotalLength +0.0
		}
	}
  }
}
else {
  Trace(2,"Spool name = ","NOT A SPOOL")
}

Result= TotalLength

//Message("Result: ", Result)
Trace(2,"Spool Total Length = ",Result)