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

An opening ID is an entry point used to customize business logic. The Piping_Entity_Type business rule opening ID is used to classify an object as a Piping_Pipe or a Piping_Part.

Additionally for assembly isometric the type Piping_Spool can be returned.

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.

Customizing this rule lets you to integrate arbitrary objects, not necessarily being native pipe/part/spool objects.

Input Objects

Input objects must be of the following types:

  • ThisObject: type ProductOccurrence
  • Parameters: type RuleContext.

Sample

/* This method must return either the types "Pipe", "Part", or NULL for spool drawings
   This method must return either the types "Pipe", "Part", "Spool" or NULL for assembly drawings
   
   This will drive the EKL rule called to compute the description, and drive the way the parts are grouped.

The rules are:
* If object is a Pipe => return "Piping_Pipe" type
* If object is a Part => return "Piping_Part" type
* If object is a Spool=> return "Piping_Spool" type   
* If object is not a Piping Entity => return NULL
*/

Result = NULL

let PipingSpoolObject(Piping_Spool)
let PipingEntityObject(Piping_Entity)
set PipingEntityObject = ThisObject.Reference

if (PipingEntityObject <> NULL)
{
  // Message("Is a Piping Entity")
  if (PipingEntityObject.IsSupporting("Piping_Pipe")) {
    Result = "Piping_Pipe"
  }
  else if (PipingEntityObject.IsSupporting("Piping_Part")) {
    Result = "Piping_Part"
  }
}
else {
	set PipingSpoolObject = ThisObject.Reference
    if(PipingSpoolObject <> NULL)
	{
		Result="Piping_Spool"
	}	
}

Message("Piping_Entity_Type.CATRule Result: ", Result)