Dimension Business Rule (AITACPipeDimensionBusinessRules1)

An opening ID is an entry point used to customize business logic. The dimension business rule opening ID is used to dimensions for assembly drawings, depending on the type of object.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked while using the Piping Spool Isometrics and Piping Assembly commands.

Input Objects

Input objects must be of the following types:

  • ThisObject: FactType ProductOccurrence.
  • Parameters corresponds to the context object.
Object Type EKL Type Name Forced Excluded
Gasket Piping_Gasket NO YES
Valve Piping_Valve YES NO

Context Object Parameters

Parameter Name Type Read or Write Comments
RunMode Integer IN 1: Positions the annotation on the piping spool.

2: Positions the annotation on the piping spool assembly.

Forced Integer OUT 0: Do not create a forced dimension for this object (default).

1: Force dimension creation for this object.

Excluded Integer OUT 0(default value): Object is involved in the dimension process.

1: Object is not involved in the dimension process.

Sample

The following sample describes the dimension rule for piping annotations. Use the sample to define the business rules in the resource set. This example creates a dimension for spool and not a spooled object.

/*-----------------------------------------------------------------------*/
/* Rule name: AITACPipeDimensionBusinessRules1                           */
/* Sample rule for defining Forced and Excluded behavior for not spooled */
/* objects.                                                              */
/*-----------------------------------------------------------------------*/

Let PartOcc(ProductOccurrence)
Let PartRef(VPMReference)
Let PartIns(VPMInstance)
let PipingPartObject(Piping_Part)

/* part reference data */
Let strPartType(String)
Let strPartSubType(String)
Let iForced(Integer)
Let iExcluded(Integer)

/* initialize */
PartOcc=NULL
PartRef=NULL
PartIns=NULL
strPartSubType= " "
strPartType=" "

/* Default value*/
iForced = 0
iExcluded = 0

/* ThisObject information */
Trace(1,"ThisObject : " + ThisObject.Name)

/* Get the Part occurrence */
Set PartOcc = ThisObject
Trace(1,"Part Occurrence : " + PartOcc.Name)

/* Get the Part instance */
Set PartIns = PartOcc
Trace(1,"Part Instance : " + PartIns.Name)

/* Get the Part reference */
Set PartRef = PartIns.Reference
Trace(1,"Part Reference: " + PartRef.Name)

/* Get the piping part reference */
set PipingPartObject  = ThisObject.Reference

/* Read the attributes from the Part (sample, customer dependent) */
if( PipingPartObject<>NULL )
{
  strPartType = PipingPartObject.PrimaryType.Name
  Trace(1,"PartType: " + strPartType)
}
strPartSubType=PartRef.GetAttributeString("V_SubPartType")
Trace(1,"SubPartType: "+strPartSubType )

/* Force = create a dimension attached to this object.             */
/* Exclude = no dimension attached to this object.                 */          
/* Example:                                                        */
/* for Gasket and Valve type objects to reverse the default logic, */
/* or any other criterion...                                       */
if(strPartType == "Piping_Gasket"  OR  strPartSubType=="Gasket" )
{
   iForced = 1
   Parameters -> SetAttributeInteger("Forced"  , iForced)
   iExcluded = 0
   Parameters -> SetAttributeInteger("Excluded"  , iExcluded)
}
if(strPartType == "Piping_Valve"  OR  strPartSubType=="Valve" )
{
   iForced = 0
   Parameters -> SetAttributeInteger("Forced"  , iForced)
   iExcluded = 1
   Parameters -> SetAttributeInteger("Excluded"  , iExcluded)
}