General InformationThis opening ID is invoked while using the Piping Spool Isometrics and Piping Assembly commands. Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe 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)
}
| |||||||||||||||||||||||||||||||||||