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 continuation annotation rule for piping annotations. Use the sample to define the business rules in the resource set. This example creates an annotation for each connected object, including its name and location, but does not create annotations for open ends without a connected object.
/*----------------------------------------------------------------------------------------------------------------- */
/* Continuation Annotation business sample rule: */
/* -creates an annotation for each connected object, including its name and location, */
/* -doesn't create annotations for open ends without a connected object. */
/* */
/* Rule name: AITACPipeOrientationBusinessRules1 */
/* */
/* Context Object Parameters */
/* ConnectedObject (String) Occurrence of connected object, empty if not found. */
/* CoordinateX (Real) Coordinate or piping node where annotation leader is pointing */
/* CoordinateY (Real) Coordinate or piping node where annotation leader is pointing */
/* CoordinateZ (Real) Coordinate or piping node where annotation leader is pointing */
/* RunMode (Integer) 1: annotation is on piping spool, 2: annotation is on piping spool assembly */
/* Annotation (String) String text to be placed on new annotation, if text is empty, */
/* annotation will not be created. Multiline text is supported indicated as "|" */
/*----------------------------------------------------------------------------------------------------------------- */
Let PipConnectedObject (ProductOccurrence)
Let PipeRef (VPMReference)
Let X (Real)
Let Y (Real)
Let Z (Real)
Let Mode (Integer)
Let strAnnotation (String)
Let strAnnotationConnectedPartName (String)
/* initialize */
strAnnotationConnectedPartName = ""
strAnnotation = ""
Set PipConnectedObject = Parameters->GetAttributeObject("ConnectedObject")
Set X = Parameters->GetAttributeReal("CoordinateX")
Set Y = Parameters->GetAttributeReal("CoordinateY")
Set Z = Parameters->GetAttributeReal("CoordinateZ")
Set Mode = Parameters->GetAttributeInteger("RunMode")
/* In case of connected object */
If PipConnectedObject <> NULL
{
set PipeRef = PipConnectedObject.Reference
if PipeRef <> NULL
{
/*connected object name on the first line */
set strAnnotationConnectedPartName = PipeRef.Name
strAnnotation = strAnnotationConnectedPartName
/* And the connection point on a second line */
X =round(X)
Y =round(Y)
Z =round(Z)
strAnnotation = strAnnotation + "|" + ToString(X) + ":"+ ToString(Y) + ":" + ToString(Z)
}
}
/* Output the result back to the calling code */
Parameters -> SetAttributeString("Annotation", strAnnotation)
| |||||||||||||||||||||||||||||||||||||||