PipeTube_Physical_Types Methods

This page discusses:

Piping_Insulation_Occurrence.GetCoveredObject()

Function used to return the object recovered by the insulation.

Signature

Piping_Insulation_Occurrence.GetCoveredObject() : ProductOccurrence

ReturnType

ProductOccurrence

Piping_Insulation_Occurrence.GetLineIDName()

Function used to return the name of Line ID of the occurrence /instance in a string.

Signature

Piping_Insulation_Occurrence.GetLineIDName() : String

ReturnType

String

Piping_Insulation_Occurrence.GetLineIDObject()

Function used to return the pointer of the LineID (Piping_Line type) of the input entity.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Insulation_Occurrence.GetLineIDObject() : Piping_Line

ReturnType

Piping_Line

Piping_Insulation_Occurrence.GetSpecName()

Function used to return the name of the spec set on the line ID of the occurrence /instance in a string. If it is an insulation, the name of the insulation spec is returned.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Insulation_Occurrence.GetSpecName() : String

ReturnType

String

Piping_Insulation_Occurrence.GetSpecificationObject()

Function used to return the object of the specification.

Signature

Piping_Insulation_Occurrence.GetSpecificationObject() : EnsSpecification

ReturnType

EnsSpecification

Piping_Insulation_Occurrence.GetSpoolName()

Function used to return the name of the spool.

Signature

Piping_Insulation_Occurrence.GetSpoolName() : String

ReturnType

String

Piping_Part_Occurrence.CheckLockAngle()

Function used to check the angle between the selected element port and the input reference element port. It checks that the behavior of the orientation between the ports is compliant. -

Signature

Piping_Part_Occurrence.CheckLockAngle(ReferenceElement : ProductOccurrence, Check : Boolean, Angle : Angle) : Integer

Arguments

Name Input/Output Required? Type Comment
ReferenceElement In Product_Occurrence -
Check Out Boolean -
Angle Out Angle -

ReturnType

Integer

Example

let prd(Piping_Part_Occurrence)
let Angle(ANGLE)
let oCheck(Boolean)
let ProdName(String)
let ProdName2(String)
let error(Integer)
let Ref(ProductOccurrence)

Validation = false

set prd = ThisObject
set Ref = Parameters.GetAttributeObject("Valve2")

set ProdName = prd.Name
set ProdName2 = Ref.Name

if  (( ProdName == "Valve1" ) AND  (ProdName2 == "Valve2" ))
{
 error = prd.CheckLockAngle(Ref, oCheck, Angle)

 if( (0 == error) AND (true == oCheck) AND (Angle == 90deg) )
 {
   Validation = true
 }		
}

Piping_Part_Occurrence.ComputeGlobalOrientation()

Function used to find the angle between the part occurrence on which the method is called and global z-direction if the argument "IReferenceAxis" is NULL. -

Signature

Piping_Part_Occurrence.ComputeGlobalOrientation(AngleAxisZ : Angle, AngleXYPlane : Angle, ReferenceAxis : AxisSystem [, RefAxisOccurrence : ProductOccurrence]) : Integer

Arguments

Name Input/Output Required? Type Comment
AngleAxisZ Out Angle -
AngleXYPlane Out Angle -
ReferenceAxis In Axis_System -
RefAxisOccurrence In Product_Occurrence -

ReturnType

Integer

Example

let prd(Piping_Part_Occurrence)
let Angle1(ANGLE)
let Angle2(ANGLE)
let RefAxis(axisSystem)
let ListAxis(List)
let error(Integer)
let Ref(ProductOccurrence)
let ProdName(String)
let ProdName2(String)

Validation = false

set prd = ThisObject
set Ref = Parameters.GetAttributeObject("Butterfly_Valve")

set ProdName = prd.Name
set ProdName2 = Ref.Name

if  (( ProdName == "Valve1" ) AND  (ProdName2 == "Butterfly_Valve" ))
{
 ListAxis = Ref.Query("AxisSystem", "")
 if(1 <= ListAxis.Size())
 {
	RefAxis = ListAxis.GetItem(1)
 }

 error = prd.ComputeGlobalOrientation(Angle1, Angle2)

 if((270deg == Angle1) AND (90deg == Angle2) AND (error == 0))
 {
  Validation = true
 }
}

Piping_Part_Occurrence.ComputeOrientation()

Function used to find the orientation angle between the selected part and the reference part. The reference part can be the input reference element or the one computed from a certain algorithm. -

Signature

Piping_Part_Occurrence.ComputeOrientation(InputReferenceElement : ProductOccurrence, Angle : Angle, ComputedReferenceElement : ProductOccurrence) : Integer

Arguments

Name Input/Output Required? Type Comment
InputReferenceElement In Product_Occurrence -
Angle Out Angle -
ComputedReferenceElement Out Product_Occurrence -

ReturnType

Integer

Example

let prd(Piping_Part_Occurrence)
let oAngle(ANGLE)
let oCmputedRef(ProductOccurrence)
let error(Integer)
let Ref(ProductOccurrence)

Validation = false

set prd = ThisObject
set Ref = Parameters.GetAttributeObject("Butterfly_Valve_end")

let ProdName(String)
let ProdName2(String)

set ProdName = prd.Name
set ProdName2 = Ref.Name

if  (( ProdName == "MainValve" ) AND  (ProdName2 == "Butterfly_Valve_end" ))
{
 let CompRefName(String)

 error = prd.ComputeOrientation(Ref, oAngle, oCmputedRef)

 if( NULL <> oCmputedRef)
 {
  set CompRefName = oCmputedRef.Name
 }

 if((0 == error) AND (90deg == oAngle) AND (CompRefName == "DS_FLG_Tee_ASTL_4in_40_70_BW_2049.1"))
 {
  Validation = true
 }
}

Piping_Part_Occurrence.GetAttributeOnConnectedPorts()

Function used to read the port attributes (lengths) on the connected piping parts (piping part, pipe, equipment with at least one piping port).

Signature

Piping_Part_Occurrence.GetAttributeOnConnectedPorts(Linked Object : Piping_Part_Occurrence, Attribute : String, This Object Value : String, Linked Object Value : String) : Integer

Arguments

Name Input / Output Required? Type Comment
Linked Object In Yes Piping_Part_Occurrence
Attribute In Yes String The list of attributes comes from the Piping_PartPort object.
This Object Value Out Yes String
Linked Object Value Out Yes String

ReturnType

Integer
Return code:
  • 0: Attribute values successfully read.
  • 1: Attribute not found on ThisObject.
  • 2: Attribute not found on iOccurrence.
  • 3: Invalid attribute.

Example

let nb (Integer)
let i (Integer)
let rc (Integer)
let occ (ProductOccurrence)
let ConnectedObjects(List)
let Data1 (String)
let Data2 (String)
…/…

# Get Connected Piping Part Occurrences

ConnectedObjects = ThisObject.GetRelatedObjects()
nb = ConnectedObjects.Size()
if (0 < nb)
{

  i = 1
  # Loop on Piping Part Occurrences

  for i while i <= nb

  {

    set occ = ConnectedObjects.GetItem(i)

    # Read Port Attribute on connected Piping Parts

    rc = myOccurrence.GetAttributeOnConnectedPorts(occ, "V_EndStyle", Data1, Data2)

  }

…/…

Piping_Part_Occurrence.GetLineIDName()

Function used to read the line ID name.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Part_Occurrence.GetLineIDName() : String

ReturnType

String

Example

let LineIDName(String)

LineIDName = iOcc.GetLineIDName()

if (NULL == LineIDName)
{
	ThisCheck.AddTupleFailedWithComment("Piping Part without Line ID link.", inst)
}
else
{
	ThisCheck.AddTupleSucceeded(inst)
}

Piping_Part_Occurrence.GetLineIDObject()

Function used to return the line ID object.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Part_Occurrence.GetLineIDObject() : Piping_Line

ReturnType

Piping_Line

Piping_Part_Occurrence.GetRelatedObjects()

Function used to get connected piping parts, which can be any of the following: piping part, pipe, equipment with at least one piping port.

Signature

Piping_Part_Occurrence.GetRelatedObjects() : List

ReturnType

List

Piping_Part_Occurrence.GetSpecName()

Function used to return the name of the spec set on the line ID of the occurrence /instance in a string.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Part_Occurrence.GetSpecName() : String

ReturnType

String

Piping_Part_Occurrence.GetSpecificationObject()

Function used to return the object of the specification.

Signature

Piping_Part_Occurrence.GetSpecificationObject() : EnsSpecification

ReturnType

EnsSpecification

Piping_Part_Occurrence.GetSpoolName()

Function used to return the name of the spool.

Signature

Piping_Part_Occurrence.GetSpoolName() : String

ReturnType

String

Piping_Part_Occurrence.GetSpoolObject()

Function used to return the spool object.

Signature

Piping_Part_Occurrence.GetSpoolObject() : Piping_Spool_Occurrence

ReturnType

Piping_Spool_Occurrence

Piping_Pipe_Occurrence.GetAttributeOnConnectedPorts()

Function used to read the port attributes (lengths) on the connected piping parts (piping part, pipe, equipment with at least one piping port).

Signature

Piping_Pipe_Occurrence.GetAttributeOnConnectedPorts(Linked Object : Piping_Pipe_Occurrence, Attribute : String, This Object Value : String, Linked Object Value : String) : Integer

Arguments

Name Input / Output Required? Type Comment
Linked Object In Yes Piping_Pipe_Occurrence
Attribute In Yes String The list of attributes comes from the Piping_PartPort object.
This Object Value Out Yes String
Linked Object Value Out Yes String

ReturnType

Integer

Piping_Pipe_Occurrence.GetAttributeOnConnectedPorts()

Function used to read the piping attributes (lengths) on the connected piping parts.

Signature

Piping_Pipe_Occurrence.GetAttributeOnConnectedPorts(Linked Object : Piping_Pipe_Occurrence, Attribute : String, This Object Value : LENGTH, Linked Object Value : LENGTH) : Integer

Arguments

Name Input / Output Required? Type Comment
Linked Object In Yes Piping_Pipe_Occurrence
Attribute In Yes String The list of attributes comes from the Piping_PartPort object.
This Object Value Out Yes LENGTH
Linked Object Value Out Yes LENGTH

ReturnType

Integer

Piping_Pipe_Occurrence.GetLineIDName()

Function used to read the line ID name.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Pipe_Occurrence.GetLineIDName() : String

ReturnType

String

Piping_Pipe_Occurrence.GetLineIDObject()

Function used to return the line ID object.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Pipe_Occurrence.GetLineIDObject() : Piping_Line

ReturnType

Piping_Line

Piping_Pipe_Occurrence.GetRelatedObjects()

Function used to return the related objects.

Signature

Piping_Pipe_Occurrence.GetRelatedObjects() : List

ReturnType

List

Piping_Pipe_Occurrence.GetSpecName()

Function used to return the name of the spec set on the line ID of the occurrence /instance in a string.

Note: The items must be loaded in a RFLP session.

Signature

Piping_Pipe_Occurrence.GetSpecName() : String

ReturnType

String

Piping_Pipe_Occurrence.GetSpecificationObject()

Function used to return the object of the specification.

Signature

Piping_Pipe_Occurrence.GetSpecificationObject() : EnsSpecification

ReturnType

EnsSpecification

Piping_Pipe_Occurrence.GetSpoolObject()

Function used to return the spool object.

Signature

Piping_Pipe_Occurrence.GetSpoolObject() : Piping_Spool_Occurrence

ReturnType

Piping_Spool_Occurrence

Piping_Port.SetPortAttributeString()

Function used to modify port attributes.

Signature

Piping_Pipe.SetPortAttributeString() : Piping_Port

ReturnType

Piping_Port

Piping_Port.SetPortAttributeReal()

Function used to modify port attributes.

Signature

Piping_Port.SetPortAttributeReal() : Piping_Port

ReturnType

Piping_Port

Piping_Spool_Occurrence.GetSpoolMode()

Function used to return the type of the spool in an enum. The enum type is PipingSpool_Mode. You can initialize it to PipingSpool_Unknown. Depending on the state of the input spool, the values returned can be one of the following:

  • PipingSpool_Preliminary
  • PipingSpool_Manufacturing
  • PipingSpool_Mix
  • PipingSpool_Invalid

Signature

Piping_Spool_Occurrence.GetSpoolMode() : PipingSpool_Mode

ReturnType

PipingSpool_Mode

Example

Let RefSpool(Piping_Spool)
Let SpoolMember (List)
Let SizeMember(Integer)
Let Message(String)
Let FinalMessage(String)
Let SpoolMode(PipingSpool_Mode)

RefSpool = iOccSpool.Reference

SpoolMode = iOccSpool.GetSpoolMode()

SpoolMember = RefSpool.Children

SizeMember=SpoolMember.Size()

if ("CATPipSpool_ManufacturingMode" == SpoolMode)
{
	Message = "Manufacturing Mode"
}

if ("PipSpool_PreliminaryMode" == SpoolMode)
{
	Message = "Preliminary Mode"
}

if (("CATPipSpool_UnknownMode" == SpoolMode) OR ("CATPipSpool_Invalid" == SpoolMode) OR ("CATPipSpool_MixMode" == SpoolMode))
{
	Message = "Spool with Error"
}


if (1 <= SizeMember)
{
	FinalMessage = Message + " : Member Size: " + SizeMember
	ThisCheck->AddTupleSucceededWithComment(FinalMessage, iOccSpool)
}
else
{
	FinalMessage = "Invalid Spool"
	ThisCheck->AddTupleFailedWithComment(FinalMessage, iOccSpool)
}

Piping_Spool_Occurrence.GetMembers()

Function used to return the list of the spool members both in In Manufacturing Mode or In Preliminary Design Mode.

Signature

Piping_Spool_Occurrence.GetMembers() : List

ReturnType

List