General InformationThis opening ID is invoked while using the Piping Spool Isometrics, Piping Assembly Isometrics, Piping Orthogonal Drawings, HVAC Orthogonal Spool Drawings commands. Input mode:
You can retrieve the run mode with GetAttributeInteger from the business rule. Set Mode = Parameters->GetAttributeInteger("RunMode").
Note:
This is an optional parameter to override the execution for each type of batch, in
case if only single type of batch is used or the same result is applicable to all batches,
or else run mode is not required.
The result is placed as a text annotation in the isometric projection view. Alternatively, you can add a coordinate template name in the drawing profile to create a Multi-Discipline Drafting annotation. Input ObjectsInput objects must be of the following types:
Context Object Parameters
Note:
CustomAnnotationRulesTemplate is applicable only for orthogonal and
HVAC batches.SampleThe following sample describes the annotation rule for piping annotations. Use the sample to define the business rule in the resource set. As input to the BR will be provided: VPMOccurrence of the Rigid Pipe.
/* Rule created by bps1 1/21/2021 */
Let PipeOcc(ProductOccurrence)
Let PipeRef(VPMReference)
Let PipeIns(VPMInstance)
Let strAnnotation(String)
Let X(Real)
Let Y(Real)
Let Z(Real)
Let X1(Real)
Let Y1(Real)
Let Z1(Real)
Let Mode(Integer)
Set X = Parameters->GetAttributeReal("CoordinateX")
Set Y = Parameters->GetAttributeReal("CoordinateY")
Set Z = Parameters->GetAttributeReal("CoordinateZ")
Set Mode = Parameters->GetAttributeInteger("RunMode")
Set X1=X+50
Set Y1=Y+30
Set Z1=Z+40
Parameters -> SetAttributeReal("CoordinateX", X1)
Parameters -> SetAttributeReal("CoordinateY", Y1)
Parameters -> SetAttributeReal("CoordinateZ", Z1)
/* ThisObject information */
Trace(1,"ThisObject : " + ThisObject.Name)
/* Get the pipe occurrence */
Set PipeOcc = ThisObject
Trace(1,"Pipe Occurrence : " + PipeOcc.Name)
/* Get the pipe instance */
Set PipeIns = PipeOcc
Trace(1,"Pipe Instance : " + PipeIns.Name)
/* Get the pipe reference */
Set PipeRef = PipeIns.Reference
Trace(1,"Pipe Reference: " + PipeRef.Name)
X =round(X)
Y =round(Y)
Z =round(Z)
// place coordinate on each node
strAnnotation = "" + ToString(X) + ":"+ ToString(Y) + ":" + ToString(Z)
// Output the result back to the calling code
Parameters -> SetAttributeString("Annotation", strAnnotation)
| |||||||||||||||||||||||||||||||||||||||