PipeTube_Physical_Types Methods

This page discusses:

PLMEnsRefEquipment.CreatePipingPort()

Lets you create piping/tubing ports.

Signature

PLMEnsRefEquipment.CreatePipingPort(X_OriginPt : Real, Y_OriginPt : Real, Z_OriginPt : Real, X_AlignDir : Real, Y_AlignDir : Real, Z_AlignDir : Real, X_OrientDir : Real, Y_OrientDir : Real, Z_OrientDir : Real, PortType : PipingPort_Types, PortName : String, X_OffsetPoint : Real [, Y_OffsetPoint : Real, Z_OffsetPoint : Real]) : Piping_Port

Arguments

Name Input/Output Required? Type Comment
X_OriginPt In Real Defines the center point of the port: X coordinate
Y_OriginPt In Real Defines the center point of the port: Y coordinate
Z_OriginPt In Real Defines the center point of the port: Z coordinate
X_AlignDir In Real Defines the alignment direction: X coordinate
Y_AlignDir In Real Defines the alignment direction: Y coordinate
Z_AlignDir In Real Defines the alignment direction: Z coordinate
X_OrientDir In Real Defines the orientation direction: X coordinate
Y_OrientDir In Real Defines the orientation direction: Y coordinate
Z_OrientDir In Real Defines the orientation direction: Z coordinate
PortType In PipingPort_Types Defines the type of the port from the predefined list in PipingPort_Types
PortName In String Defines the name of the port
X_OffsetPoint In Real If the port type is two points part or hole port, you must define the offset from the center of the port
Y_OffsetPoint In Real -
Z_OffsetPoint In Real -

ReturnType

Piping_Port

Example

/*To create a two point hole port on piping part*/

prd is Piping_Part 

let X_OPt(Real)
let Y_OPt(Real)
let Z_OPt(Real)
X_OPt=0
Y_OPt=0
Z_OPt=0
 
let X_alignDir(Real)
let Y_alignDir(Real)
let Z_alignDir(Real)
X_alignDir=0
Y_alignDir=0
Z_alignDir=2
 
let X_orientDir(Real)
let Y_orientDir(Real)
let Z_orientDir(Real)
X_orientDir=0
Y_orientDir=2
Z_orientDir=0

let X_offsetpt(Real)
let Y_offsetpt(Real)
let Z_offsetpt(Real)
X_offsetpt=2
Y_offsetpt=0
Z_offsetpt=0
 
let porttype(PipingPort_Types)
porttype= "CATPip2HolePort"

let portName(String)
portName = "test1"
 
let port(Piping_Port)
 
Message("CreatePipingPortCalled")
 
port = prd. CreatePipingPort(X_OPt, Y_OPt, Z_OPt, X_alignDir, Y_alignDir, Z_alignDir, X_orientDir, Y_orientDir, Z_orientDir, porttype,
portName, X_offsetpt,Y_offsetpt,Z_offsetpt)

PLMEnsRefEquipment.CreatePipingReplicatePort()

Lets you replicate piping/tubing ports.

Signature

PLMEnsRefEquipment.CreatePipingReplicatePort(SourceProductOccurrence : 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Knowledge Packages | 3D Modeling Apps | PRODUCT_Types (no NLS) Types, SourcePortName : String, TargetPortName : String, KeepLink : Boolean, GroupPort : Piping_Port) : Integer

Arguments

Name Input/Output Required? Type Comment
SourceProductOccurrence In 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Knowledge Packages | 3D Modeling Apps | PRODUCT_Types (no NLS) Types The piping part, pipe, or equipment occurrence with the source port to be replicated.
SourcePortName In String Name of the source port
TargetPortName In String Name of the target port
KeepLink In Boolean Keep link or Isolate link
GroupPort Out Piping_Port Output of group port

ReturnType

Integer

Piping_Flexible_Pipe.Add3DPoint()

Lets you add a list of 3D points in the current pipe reference after given input node index.

Signature

Piping_Flexible_Pipe.Add3DPoint(iListPoint : List, iIndex : Integer) : Integer

Arguments

Name Input/Output Required? Type Comment
iListPoint In List The input list of points to be added on the pipe.
iIndex In Integer Points are added after this input Index. If you want to add a point before the first index, the value must be "0".

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let pBody(BodyFeature)
let pPoint(Point)
let NewPoint(Point)
let pGSMPoint(GSMPoint)
let pGSMPointCoord(GSMPointCoord)
let ListPoints(list)
let pPointType(PointType)
let NodeIndex(Integer)
let retCode(Integer)
let Validation(Boolean)

Validation = false

if(NULL <> FlexiblePipeRef)
{
	//Add3DPoint
	// create point
	pBody = FlexiblePipeRef ->Find ("BodyFeature","",TRUE)
	if (NULL <> pBody)
	{
		Trace (1, " Body retrieves : ",pBody.Name)
		SetWorkingContext(pBody)
		
		// Point_Test1
		NewPoint = new("Point", "Point_Test1", pBody)
		pPointType = "Coordinates"
		set pGSMPoint = NewPoint
		if (NULL <> pGSMPoint)
		{
			pGSMPoint.PointType = pPointType
			set pGSMPointCoord = pGSMPoint
			pGSMPointCoord.X = 100mm
			pGSMPointCoord.Y = 200mm
			pGSMPointCoord.Z = 300mm
			pGSMPointCoord.Update()
		}			
		Trace (1, " Body retrieves : ",NewPoint.Name)
		ListPoints.Append(pGSMPoint)
		
		//Point_Test2
		NewPoint = new("Point", "Point_Test2", pBody)
		pPointType = "Coordinates"
		set pGSMPoint = NewPoint
		if (NULL <> pGSMPoint)
		{
			pGSMPoint.PointType = pPointType
			set pGSMPointCoord = pGSMPoint
			pGSMPointCoord.X = 100mm
			pGSMPointCoord.Y = 300mm
			pGSMPointCoord.Z = 300mm
			pGSMPointCoord.Update()
		}
		Trace(1, " Body retrieves : ",NewPoint.Name)
		ListPoints.Append(pGSMPoint)
		
		set NodeIndex = 0
		set retCode = FlexiblePipeRef.Add3DPoint (ListPoints, NodeIndex)
		if(0 == retCode)
		{
			Validation = true
			Trace (1, "======Add3DPoint done successfullyh=======")
		}
		else
		{
			Validation = false
			Trace (1, "======Add3DPoint FAILED=======")
		}
	}
}

Piping_Flexible_Pipe.GetBuildAlgorithm()

Lets you find the build algorithm on flexible reference.

Signature

Piping_Flexible_Pipe.GetBuildAlgorithm(oBuildAlgorithm : CATEbm_BranchTypeEnum) : Integer

Arguments

Name Input/Output Required? Type Comment
oBuildAlgorithm Out CATEbm_BranchTypeEnum -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let oBuildAlgo(CATEbm_BranchTypeEnum)

if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef -> GetBuildAlgorithm(oBuildAlgo)
	Message ("Get Build Algorithm: ", oBuildAlgo)
	
}	
	

Piping_Flexible_Pipe.GetBuildMode()

Lets you find the build mode on flexible reference.

Signature

Piping_Flexible_Pipe.GetBuildMode(oBuildMode : CATEbm_FlexBuildModeEnum) : Integer

Arguments

Name Input/Output Required? Type Comment
oBuildMode Out CATEbm_FlexBuildModeEnum -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let oBuildMode(CATEbm_FlexBuildModeEnum)

if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef->GetBuildMode(oBuildMode)
	Message ("Get Build Mode: ", oBuildMode)
}	

Piping_Flexible_Pipe.GetColor()

Lets you retrieve the color of the flexible pipe/tube from the geometric feature.

Signature

Piping_Flexible_Pipe.GetColor(oRed : Integer, oGreen : Integer, oBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
oRed Out Integer Value between 0 and 255
oGreen Out Integer Value between 0 and 255
oBlue Out Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

Piping_Flexible_Pipe.GetGlobalSlack()

Lets you find the global slack on flexible reference.

Signature

Piping_Flexible_Pipe.GetGlobalSlack(oGlobalSlack : Real) : Integer

Arguments

Name Input/Output Required? Type Comment
oGlobalSlack Out Real -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iGlobalSlack(Real)
let oGlobalSlack(Real)

if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef -> GetGlobalSlack(oGlobalSlack)
	Message ("Get Global Slack: ", oGlobalSlack)
}

Piping_Flexible_Pipe.GetLength()

Lets you find the length on flexible reference.

Signature

Piping_Flexible_Pipe.GetLength(oLength : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
oLength Out LENGTH -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iLength(Length)
let oLength(Length)

if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef -> GetLength(oLength)
	Message ("Get Length: ", oLength)
	
}

Piping_Flexible_Pipe.GetLocalSliceMode()

Lets you find the local slice mode on flexible reference.

Signature

Piping_Flexible_Pipe.GetLocalSliceMode(iIndex : Integer, oLocalSliceMode : CATEbm_SlackAndLengthModeEnum) : Integer

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
oLocalSliceMode Out CATEbm_SlackAndLengthModeEnum -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iLocalSliceMode(CATEbm_SlackAndLengthModeEnum)
let oLocalSliceMode(CATEbm_SlackAndLengthModeEnum)

let Index(Integer)

set Index = 2

if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef -> GetLocalSliceMode(Index, oLocalSliceMode)
	Message ("Get Length: ", oLocalSliceMode)
	
}

Piping_Flexible_Pipe.GetLocalSliceValue()

Lets you find the local slice value on flexible reference.

Signature

Piping_Flexible_Pipe.GetLocalSliceValue(iIndex : Integer, oLocalSliceValue : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
oLocalSliceValue Out LENGTH -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iLocalSliceValue(Length)
let oLocalSliceValue(Length)

let Index(Integer)

set Index = 2

if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef -> GetLocalSliceValue(Index, oLocalSliceValue)
	Message ("Get Length: ", oLocalSliceValue)
	
}

Piping_Flexible_Pipe.GetMinimumBendRadius()

Lets you find the minimum bend radius on a flexible reference.

Signature

Piping_Flexible_Pipe.GetMinimumBendRadius(oMinimumBendRadius : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
oMinimumBendRadius Out LENGTH -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iMinBendRadius(Length)
let oMinBendRadius(Length)

if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef -> GetMinimumBendRadius(oMinBendRadius)
	Message ("Get Length: ", oMinBendRadius)	
}

Piping_Flexible_Pipe.GetNodeType()

Lets you find node types in the current pipe reference after given input node index.

Signature

Piping_Flexible_Pipe.GetNodeType(iIndex : Integer, oNodeType : PipingNodeType) : Integer

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
oNodeType Out PipingNodeType -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let NodeType(PipingNodeType)
let NodeIndex(Integer)
let NodeIndexToRemove(Integer)
let ListNodeIndexToRemove(List)
let oReferenceBendRadius(Length)
NodeIndex = 2


if(NULL <> FlexiblePipeRef)
{
	FlexiblePipeRef -> GetNodeType(NodeIndex, NodeType)
	Message ("Node 2 Type:", NodeType)
	
}	

Piping_Flexible_Pipe.GetOpacity()

Lets you retrieve the opacity of the flexible pipe/tube from the geometric feature.

Signature

Piping_Flexible_Pipe.GetOpacity(oOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
oOpacity Out Integer -

Piping_Flexible_Pipe.RemoveNode()

Lets you remove the nodes present in the list of node index points.

Signature

Piping_Flexible_Pipe.RemoveNode(iListIndex : List) : Integer

Arguments

Name Input/Output Required? Type Comment
iListIndex In List -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let NodeType(PipingNodeType)
let NodeIndex(Integer)
let NodeIndexToRemove(Integer)
let ListNodeIndexToRemove(List)
let oReferenceBendRadius(Length)
NodeIndex = 2


if(NULL <> FlexiblePipeRef)
{
	NodeIndexToRemove = 2
	ListNodeIndexToRemove.Append(NodeIndexToRemove)
	
	NodeIndexToRemove = 3
	ListNodeIndexToRemove.Append(NodeIndexToRemove)
	
	FlexiblePipeRef -> RemoveNode(ListNodeIndexToRemove)
	Message ("Removed Nodes:", ListNodeIndexToRemove)
}	

Piping_Flexible_Pipe.SetBuildAlgorithm()

Lets you set a build algorithm on a flexible reference.

Signature

Piping_Flexible_Pipe.SetBuildAlgorithm(iBuildAlgorithm : CATEbm_BranchTypeEnum) : Integer

Arguments

Name Input/Output Required? Type Comment
iBuildAlgorithm In CATEbm_BranchTypeEnum -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iBuildAlgo(CATEbm_BranchTypeEnum)

if(NULL <> FlexiblePipeRef)
{
	iBuildAlgo = "CATEbm_FlexCurveFLX"
	FlexiblePipeRef -> SetBuildAlgorithm(iBuildAlgo)
	Message ("Set Build Algorithm: ", iBuildAlgo)
	
}	
	

Piping_Flexible_Pipe.SetBuildMode()

Lets you set a build mode on a flexible reference.

Signature

Piping_Flexible_Pipe.SetBuildMode(iBuildMode : CATEbm_FlexBuildModeEnum) : Integer

Arguments

Name Input/Output Required? Type Comment
iBuildMode In CATEbm_FlexBuildModeEnum -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iBuildMode(CATEbm_FlexBuildModeEnum)

if(NULL <> FlexiblePipeRef)
{
	iBuildMode = "CATEbm_BMLength"
	FlexiblePipeRef->SetBuildMode(iBuildMode)
	Message ("Set Build Mode: ", iBuildMode)	
}	

Piping_Flexible_Pipe.SetColor()

Lets you set the color on the flexible pipe/tube from the geometric feature.

Signature

Piping_Flexible_Pipe.SetColor(iRed : Integer, iGreen : Integer, iBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
iRed In Integer Value between 0 and 255
iGreen In Integer Value between 0 and 255
iBlue In Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

Piping_Flexible_Pipe.SetGlobalSlack()

Lets you set a global slack on a flexible reference.

Signature

Piping_Flexible_Pipe.SetGlobalSlack(iGlobalSlack : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iGlobalSlack In Real -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iGlobalSlack(Real)
let oGlobalSlack(Real)

if(NULL <> FlexiblePipeRef)
{
	set iGlobalSlack = 10
	FlexiblePipeRef -> SetGlobalSlack(iGlobalSlack)
	Message ("Set Global Slack: ", iGlobalSlack)
}	

Piping_Flexible_Pipe.SetLength()

Lets you set a length on flexible reference.

Signature

Piping_Flexible_Pipe.SetLength(iLength : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iLength In LENGTH -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iLength(Length)
let oLength(Length)

if(NULL <> FlexiblePipeRef)
{
	set iLength = 2000mm
	FlexiblePipeRef -> SetLength(iLength)
	Message ("Set Length: ", iLength)
}

Piping_Flexible_Pipe.SetLocalSliceMode()

Lets you set a local slice mode on flexible reference.

Signature

Piping_Flexible_Pipe.SetLocalSliceMode(iIndex : Integer, iLocalSliceMode : CATEbm_SlackAndLengthModeEnum) : Integer

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
iLocalSliceMode In CATEbm_SlackAndLengthModeEnum -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iLocalSliceMode(CATEbm_SlackAndLengthModeEnum)
let oLocalSliceMode(CATEbm_SlackAndLengthModeEnum)

let Index(Integer)

set Index = 2

if(NULL <> FlexiblePipeRef)
{
	iLocalSliceMode = "IgnoreSlack"
	FlexiblePipeRef -> SetLocalSliceMode(Index, iLocalSliceMode)
	Message ("Set Length: ", iLocalSliceMode)
}

Piping_Flexible_Pipe.SetLocalSliceValue()

Lets you set a local slice value on flexible reference.

Signature

Piping_Flexible_Pipe.SetLocalSliceValue(iIndex : Integer, iLocalSliceValue : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
iLocalSliceValue In LENGTH -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iLocalSliceValue(Length)
let oLocalSliceValue(Length)

let Index(Integer)

set Index = 2

if(NULL <> FlexiblePipeRef)
{	
	iLocalSliceValue = 100mm
	FlexiblePipeRef -> SetLocalSliceValue(Index, iLocalSliceValue)
	Message ("Set Length: ", iLocalSliceValue)
}

Piping_Flexible_Pipe.SetMinimumBendRadius()

Lets you set a minimum bend radius on a flexible reference.

Signature

Piping_Flexible_Pipe.SetMinimumBendRadius(iMinimumBendRadius : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iMinimumBendRadius In LENGTH -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let FlexiblePipeRef(Piping_Flexible_Pipe) //variable containing the flexible pipe input
let iMinBendRadius(Length)
let oMinBendRadius(Length)

if(NULL <> FlexiblePipeRef)
{
	set iMinBendRadius = 20mm
	FlexiblePipeRef -> SetMinimumBendRadius(iMinBendRadius)
	Message ("Set Length: ", iMinBendRadius)
}

Piping_Flexible_Pipe.SetOpacity()

Lets you set the opacity on the flexible pipe/tube from the geometric feature.

Signature

Piping_Flexible_Pipe.SetOpacity(iOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
iOpacity In Integer -

Piping_Flexible_Pipe.SetRouteAttributeReal()

Lets you modify a route attribute that cannot be accessed directly when its type is real.

Signature

Piping_Flexible_Pipe.SetRouteAttributeReal(AttrName : String, AttrValue : Real)

Arguments

Name Input/Output Required? Type Comment
AttrName In String This applies to V_OperatingTemperature, V_OperatingPressure, and V_ReferenceBendRadius.
AttrValue In Real -

Example

let OperatingTemperature (TEMPRTRE)
let OperatingPressure(PRESSURE)
OperatingTemperature = 40.0Cdeg
OperatingPressure = 100000.0Pa
PipeRef.SetRouteAttributeReal("V_OperatingTemperature", OperatingTemperature)
PipeRef.SetRouteAttributeReal("V_OperatingPressure", OperatingPressure)

Piping_Flexible_Pipe_Inst.SetNewReference()

Updates existing flexible pipe properties from raw material. It creates a link between pipe and raw material. It copies material name from raw material to pipe.

Signature

Piping_Flexible_Pipe_Inst.SetNewReference(VPMReference : VPMReference) : Integer

Arguments

Name Input/Output Required? Type Comment
VPMReference In VPMReference -

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Example

let retCode(Integer)
let PipeInst(Piping_Rigid_Pipe_Inst)
let RawMaterial(Raw_Material_PipeTube)
let myQuery(PLMQuery)
let results(List)
let currentResult(PLMQueryResult)
let RawMaterialVPMReference(VPMReference)

// Step 1 : Retrive Raw Material from database
myQuery = CreatePLMQuery("Raw_Material_PipeTube")

myQuery->AddCriterion("V_Name","Rigid Raw Material PipeTube") 

results = myQuery->RunQuery()
currentResult = results[1]

if(currentResult<>NULL)
{
	set RawMaterial = currentResult->LoadResult()
	set RawMaterialVPMReference = RawMaterial
}

set PipeInst = TargetRigidPipeInst

if(NULL <> PipeInst AND NULL <> RawMaterialVPMReference)
{
	// Step 3 : SetNewReference
	// Existing raw material sent
	
	set retCode = PipeInst.SetNewReference(RawMaterialVPMReference)
	if(0 == retCode)
	{
		Message ("Set New Reference: ", PipeInst.Name)
	}
}

Piping_Insulation.GetColor()

Lets you retrieve the color of the insulation from the geometric feature.

Signature

Piping_Insulation.GetColor(oRed : Integer, oGreen : Integer, oBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
oRed Out Integer Value between 0 and 255
oGreen Out Integer Value between 0 and 255
oBlue Out Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

Piping_Insulation.GetOpacity()

Lets you retrieve the opacity of the insulation from the geometric feature.

Signature

Piping_Insulation.GetOpacity(oOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
oOpacity Out Integer -

Piping_Insulation.SetColor()

Lets you set the color on the insulation from the geometric feature.

Signature

Piping_Insulation.SetColor(iRed : Integer, iGreen : Integer, iBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
iRed In Integer Value between 0 and 255
iGreen In Integer Value between 0 and 255
iBlue In Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

Piping_Insulation.SetOpacity()

Lets you set the opacity on the insulation from the geometric feature.

Signature

Piping_Insulation.SetOpacity(iOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
iOpacity In Integer -

Piping_Insulation_Occurrence.GetCoveredObject()

Method used to return the object recovered by the insulation.

Signature

Piping_Insulation_Occurrence.GetCoveredObject() : ProductOccurrence

ReturnType

ProductOccurrence

Piping_Insulation_Occurrence.GetLineIDName()

Method 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()

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

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

Signature

Piping_Insulation_Occurrence.GetLineIDObject() : Piping_Line

ReturnType

Piping_Line

Piping_Insulation_Occurrence.GetSpecName()

Method 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 an 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()

Method used to return the name of the spool.

Signature

Piping_Insulation_Occurrence.GetSpoolName() : String

ReturnType

String

Piping_Part.CreatePipingPort()

Lets you create piping/tubing ports.

Signature

Piping_Part.CreatePipingPort(X_OriginPt : Real, Y_OriginPt : Real, Z_OriginPt : Real, X_AlignDir : Real, Y_AlignDir : Real, Z_AlignDir : Real, X_OrientDir : Real, Y_OrientDir : Real, Z_OrientDir : Real, PortType : PipingPort_Types, PortName : String, X_OffsetPoint : Real [, Y_OffsetPoint : Real, Z_OffsetPoint : Real]) : PipingPort

Arguments

Name Input/Output Required? Type Comment
X_OriginPt In Real Defines the center point of the port: X coordinate
Y_OriginPt In Real Defines the center point of the port: Y coordinate
Z_OriginPt In Real Defines the center point of the port: Z coordinate
X_AlignDir In Real Defines the alignment direction: X coordinate
Y_AlignDir In Real Defines the alignment direction: Y coordinate
Z_AlignDir In Real Defines the alignment direction: Z coordinate
X_OrientDir In Real Defines the orientation direction: X coordinate
Y_OrientDir In Real Defines the orientation direction: Y coordinate
Z_OrientDir In Real Defines the orientation direction: Z coordinate
PortType In PipingPort_Types Defines the type of the port from the predefined list in PipingPort_Types
PortName In String Defines the name of the port
X_OffsetPoint In Real If the port type is two points part or hole port, you must define the offset from the center of the port
Y_OffsetPoint In Real -
Z_OffsetPoint In Real -

ReturnType

Piping_Port

Example

/*To create a two point hole port on piping part*/

prd is Piping_Part 

let X_OPt(Real)
let Y_OPt(Real)
let Z_OPt(Real)
X_OPt=0
Y_OPt=0
Z_OPt=0
 
let X_alignDir(Real)
let Y_alignDir(Real)
let Z_alignDir(Real)
X_alignDir=0
Y_alignDir=0
Z_alignDir=2
 
let X_orientDir(Real)
let Y_orientDir(Real)
let Z_orientDir(Real)
X_orientDir=0
Y_orientDir=2
Z_orientDir=0

let X_offsetpt(Real)
let Y_offsetpt(Real)
let Z_offsetpt(Real)
X_offsetpt=2
Y_offsetpt=0
Z_offsetpt=0
 
let porttype(PipingPort_Types)
porttype= "CATPip2HolePort"

let portName(String)
portName = "test1"
 
let port(Piping_Port)
 
Message("CreatePipingPortCalled")
 
port = prd. CreatePipingPort(X_OPt, Y_OPt, Z_OPt, X_alignDir, Y_alignDir, Z_alignDir, X_orientDir, Y_orientDir, Z_orientDir, porttype,
portName, X_offsetpt,Y_offsetpt,Z_offsetpt)

Piping_Part_Occurrence.CheckLockAngle()

Method 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()

Method used to find the angle between the part occurrence on which the method is called and the 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()

Method 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()

Method 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()

Method used to read the line ID name.

Note: The items must be loaded in an 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()

Method used to return the line ID object.

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

Signature

Piping_Part_Occurrence.GetLineIDObject() : Piping_Line

ReturnType

Piping_Line

Piping_Part_Occurrence.GetRelatedObjects()

Method 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()

Method 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 an 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()

Method used to return the name of the spool.

Signature

Piping_Part_Occurrence.GetSpoolName() : String

ReturnType

String

Piping_Part_Occurrence.GetSpoolObject()

Method used to return the spool object.

Signature

Piping_Part_Occurrence.GetSpoolObject() : Piping_Spool_Occurrence

ReturnType

Piping_Spool_Occurrence

Piping_PipeXPort.CheckCompatibility()

Piping_PipeXPort.CheckCompatibility()

Signature

Piping_PipeXPort.CheckCompatibility(Port Owner Occurrence : ProductOccurrence, Second Port : VPMPort, Second Port Owner Occurrence : ProductOccurrence, Use Only Compatibility Rule Table : Boolean, List of Additional Specifications : List, Parameters whose check failed : List) : Integer

Arguments

Name Input/Output Required? Type Comment
Port Owner Occurrence In ProductOccurrence -
Second Port In VPMPort -
Second Port Owner Occurrence In ProductOccurrence -
Use Only Compatibility Rule Table In Boolean -
List of Additional Specifications In List -
Parameters whose check failed Out List -

ReturnType

Integer

Piping_PipeXPort.SetPortAttributeString()

Piping_PipeXPort.SetPortAttributeString()

Signature

Piping_PipeXPort.SetPortAttributeString(AttrName : String, AttrValue : String)

Arguments

Name Input/Output Required? Type Comment
AttrName In String -
AttrValue In String -

Piping_Pipe_Occurrence.GetAttributeOnConnectedPorts()

Method 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()

Method 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.GetLineAC()

Function allows you to find the architecture component of Line ID from a part or pipe.

Signature

Piping_Pipe_Occurrence.GetLineAC() : LogicalOccurrence

ReturnType

LogicalOccurrence: the architecture component of Line ID.

Example

let facet3DOcc(ProductOccurrence)
let facet3DInst(VPMInstance)

let strSynchronizePhysical3D(String)
let listSpoolMember(list)
let Piping_Spool_Occurrence1 (Piping_Spool_Occurrence)

let LineItemOcc(LogicalOccurrence)

let SpoolMember_part(Piping_Part_Occurrence)
let SpoolMember_pipe(Piping_Pipe_Occurrence)


set facet3DOcc = ThisObject.Facet3D

 

if (facet3DOcc <> NULL )
{
	set facet3DInst = facet3DOcc.Instance
}

set Piping_Spool_Occurrence1 = facet3DOcc
if (Piping_Spool_Occurrence1 <> NULL )
{
	set listSpoolMember = Piping_Spool_Occurrence1->GetSpoolMembers()
}

if( 0 < listSpoolMember->Size())
{
	set SpoolMember_part = listSpoolMember[1]
	set SpoolMember_pipe= listSpoolMember[1]
}

if(SpoolMember_part <> NULL)
{
	set LineItemOcc = SpoolMember_pipe.GetLineAC()
}
else if(SpoolMember_pipe <> NULL)
{
	set LineItemOcc = SpoolMember_pipe.GetLineAC()
}

if (  LineItemOcc <> NULL and facet3DInst <> NULL )
{
	
	strSynchronizePhysical3D = LineItemOcc.GetAttributeString("V_description")
	facet3DInst.SetAttributeString("V_description", strSynchronizePhysical3D)
	Notify("Attribites in Physical 3D Description updated  #", strSynchronizePhysical3D )

Piping_Pipe_Occurrence.GetLineIDName()

Method used to read the line ID name.

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

Signature

Piping_Pipe_Occurrence.GetLineIDName() : String

ReturnType

String

Piping_Pipe_Occurrence.GetLineIDObject()

Method used to return the line ID object.

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

Signature

Piping_Pipe_Occurrence.GetLineIDObject() : Piping_Line

ReturnType

Piping_Line

Piping_Pipe_Occurrence.GetRelatedObjects()

Method used to return the related objects.

Signature

Piping_Pipe_Occurrence.GetRelatedObjects() : List

ReturnType

List

Piping_Pipe_Occurrence.GetSpecName()

Method 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 an 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()

Method used to return the spool object.

Signature

Piping_Pipe_Occurrence.GetSpoolObject() : Piping_Spool_Occurrence

ReturnType

Piping_Spool_Occurrence

Piping_Pipe_Occurrence.ComputeFlexTubeExtremityAngle()

Method used to find the angle between the two connected extremities parts in a flexible tube or pipe.

To compute this angle, you must define which extremity is the origin of the computation. The moving algorithm is applied from this reference axis until the second extremity and the angle is computed from the z axis of the piping part and the moving frame orientation.

Signature

Piping_Pipe_Occurrence.ComputeFlexTubeExtremityAngle(ReferencePart : Piping_Part_Occurrence, ANGLE : ANGLE) : Integer

Arguments

Name Input/Output Required? Type Comment
ReferencePart In Piping_Part_Occurrence This piping part must be one of the two extremities of a piping part connected to a flexible tube or pipe.
ANGLE Out ANGLE The angle is considered in a clockwise direction along the line of the alignment of the ReferencePart and can be between -179.99 and 180 degrees.

ReturnType

Integer

This Integer can return the following values:

  • 0: The method succeeds.
  • 1: Piping_Part_Occurrence is rigid.
  • 2: The input part (ReferencePart) is not connected to the route.
  • 3: The other end of the flexible pipe is not connected to the part.

Example

let flexAngle(ANGLE)
let rc(Integer)
let FlexiblePipeOcc(Piping_Pipe_Occurrence)
let PipingPartOcc(Piping_Part_Occurrence)

if(FlexiblePipeOcc <> NULL AND PipingPartOcc <> NULL)
{
	rc = FlexiblePipeOcc->ComputeFlexTubeExtremityAngle(PipingPartOcc, flexAngle)
}

if(rc == 0)
{
	Trace(1, "The angle between two part connected is: ", flexAngle)
}
else if(rc == 1)
{
	Trace(1, "The Object is called on rigid pipe", "BR failed")
}
else if(rc == 2)
{
	Trace(1, "the reference part is not connected to the route", "BR failed")
}
else if(rc == 3)
{
	Trace(1, "The other end of flexible pipe is not connected to part", "BR failed")
}
else if(rc == 4)
{
	Trace(1, "Failed due to other reason", "BR failed")
}

Piping_Port.GetOffsetPort()

This function allows you to find the publication of an offset port if the port is a two-point part port or a two-point hole port.

Signature

Piping_Port.GetOffsetPort(OffsetPort : PLMPort) : Boolean

Arguments

Name Input/Output Required? Type Comment
OffsetPort Out PLMPort -

ReturnType

Boolean

This Boolean can return two values:

  • True: the function succeeds.
  • False: the function fails.

Example

let PLM_port(PLMPort)
let pip_port(Piping_Port)
let list_child_Part(List)
let index(Integer)
let port_types(PipingPort_Types)
let bStatus(Boolean)
let oPLMPort(PLMPort)
let PipingPart(Piping_Part_Occurrence)

if (PipingPart <> NULL)
{
	list_child_Part = PipingPart.Children
	for index=1 while index <= list_child_Part->Size()
	{
		set PLM_port = list_child_Part[index]
		
		if(PLM_port <> NULL)
		{
			Trace(1, "Got the PLM Port", "")

			set pip_port = PLM_port
			if(pip_port <> NULL)
			{
				Trace(1, "Got the Piping Port", "")

				bStatus = pip_port->GetPortType(port_types)
				
				if(bStatus == true)
				{
					Trace(1, "Getting port type successfully", "")
					Trace(1, "Type is: ", port_types)
				}
				
				bStatus = pip_port->GetOffsetPort(oPLMPort)
				
				if(oPLMPort <> NULL AND bStatus == true)
				{
					Trace(1, "PLM Port received from method", "")
				}
			}
		}
	}
}

Piping_Port.GetPortType()

This function allows you to find the type of the selected port.

Signature

Piping_Port.GetPortType(PortType : PipingPort_Types) : Boolean

Arguments

Name Input/Output Required? Type Comment
PortType Out PipingPort_Types -

ReturnType

Boolean

This Boolean can return two values:

  • True: the function succeeds.
  • False: the function fails.

Example

let PLM_port(PLMPort)
let pip_port(Piping_Port)
let list_child_Part(List)
let index(Integer)
let port_types(PipingPort_Types)
let bStatus(Boolean)
let oPLMPort(PLMPort)
let PipingPart(Piping_Part_Occurrence)

if (PipingPart <> NULL)
{
	list_child_Part = PipingPart.Children
	for index=1 while index <= list_child_Part->Size()
	{
		set PLM_port = list_child_Part[index]
		
		if(PLM_port <> NULL)
		{
			Trace(1, "Got the PLM Port", "")

			set pip_port = PLM_port
			if(pip_port <> NULL)
			{
				Trace(1, "Got the Piping Port", "")

				bStatus = pip_port->GetPortType(port_types)
				
				if(bStatus == true)
				{
					Trace(1, "Getting port type successfully", "")
					Trace(1, "Type is: ", port_types)
				}
				
				bStatus = pip_port->GetOffsetPort(oPLMPort)
				
				if(oPLMPort <> NULL AND bStatus == true)
				{
					Trace(1, "PLM Port received from method", "")
				}
			}
		}
	}
}

Piping_Port.CheckCompatibility()

Signature

Piping_Port.CheckCompatibility(Port Owner Occurrence : ProductOccurrence, Second Port : VPMPort, Second Port Owner Occurrence : ProductOccurrence, Use Only Compatibility Rule Table : Boolean, List of Additional Specifications : List, Parameters whose check failed : List) : Integer

Arguments

Name Input/Output Required? Type Comment
Port Owner Occurrence In ProductOccurrence -
Second Port In VPMPort -
Second Port Owner Occurrence In ProductOccurrence -
Use Only Compatibility Rule Table In Boolean -
List of Additional Specifications In List -
Parameters whose check failed Out List -

ReturnType

Integer

Piping_Port.SetPortAttributeReal()

Lets you modify the port attribute when its type is real.

Signature

Piping_Port.SetPortAttributeReal(AttrName : String, AttrValue : Real)

Arguments

Name Input/Output Required? Type Comment
AttrName In String Name of the attribute you want to modify
AttrValue In Real New value you want to set on this attribute

Piping_Port.SetPortAttributeString()

Lets you modify the port attribute when its type is string.

Signature

Piping_Port.SetPortAttributeString(AttrName : String, AttrValue : String)

Arguments

Name Input/Output Required? Type Comment
AttrName In String Name of the attribute you want to modify
AttrValue In String New value you want to set on this attribute

Piping_Rigid_Pipe.Add3DPoint()

Lets you add a list of points.

Signature

Piping_Rigid_Pipe.Add3DPoint(iListPoint : List, iIndex : Integer) : Integer

Arguments

Name Input/Output Required? Type Comment
iListPoint In List List of the GSM point coordinates
iIndex In Integer Points are added after this input Index. If you want to add a point before the first index, the value must be "0".

ReturnType

Integer

Piping_Rigid_Pipe.GetColor()

Lets you retrieve the color of the rigid pipe/tube from the geometric feature.

Signature

Piping_Rigid_Pipe.GetColor(oRed : Integer, oGreen : Integer, oBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
oRed Out Integer Value between 0 and 255
oGreen Out Integer Value between 0 and 255
oBlue Out Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

Piping_Rigid_Pipe.GetDefaultBendRadius()

Signature

Piping_Rigid_Pipe.GetDefaultBendRadius(oDefaultBendRadius : LENGTH)

Arguments

Name Input/Output Required? Type Comment
oDefaultBendRadius Out LENGTH The default bend radius value existing on the current route.

Piping_Rigid_Pipe.GetMinimunStraightLength()

Signature

Piping_Rigid_Pipe.GetMinimunStraightLength(oMinimumStraightLength : LENGTH)

Arguments

Name Input/Output Required? Type Comment
oMinimumStraightLength Out LENGTH Minimum straight length value on the route.

Piping_Rigid_Pipe.GetNodeBendRadius()

Signature

Piping_Rigid_Pipe.GetNodeBendRadius(iIndex : Integer, oRadius : LENGTH)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer Node index at which the user needs a bend radius.
oRadius Out LENGTH Node bend radius value at existing node index.

Piping_Rigid_Pipe.GetNodeType()

Signature

Piping_Rigid_Pipe.GetNodeType(iIndex : Integer, oEnumNodeType : PipingNodeType)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
oEnumNodeType Out PipingNodeType CATPipPortPoint, CATPipDirectionalPoint, CATPipComputedPoint, CATPip3DPoint, CATPipParallelPoint

Piping_Rigid_Pipe.GetOpacity()

Lets you retrieve the opacity of the rigid pipe/tube from the geometric feature.

Signature

Piping_Rigid_Pipe.GetOpacity(oOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
oOpacity Out Integer -

Piping_Rigid_Pipe.RemoveNode()

Lets you remove a list of nodes from the reference route.

Signature

Piping_Rigid_Pipe.RemoveNode(iListIndex : List) : Integer

Arguments

Name Input/Output Required? Type Comment
iListIndex In List List of node index positions that need to be removed from the reference route

ReturnType

Integer

Piping_Rigid_Pipe.ResetNodeBendRadiustoDefault()

Signature

Piping_Rigid_Pipe.ResetNodeBendRadiustoDefault(iIndex : Integer)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer Node index at which the user resets the bend radius to the default bend radius. If you want to reset the node bend radius on all the nodes of the route, set the input node index at 0.

Piping_Rigid_Pipe.SetColor()

Lets you set the color on the rigid pipe/tube from the geometric feature.

Signature

Piping_Rigid_Pipe.SetColor(iRed : Integer, iGreen : Integer, iBlue : Integer)

Arguments

Name Input/Output Required? Type Comment
iRed In Integer Value between 0 and 255
iGreen In Integer Value between 0 and 255
iBlue In Integer Value between 0 and 255

Example

let Red(Integer)
let Green(Integer)
let Blue(Integer)
Red = 120
Green =180
Blue = 255
let R(Integer)
let G(Integer)
let B(Integer)

Message("SetColor Called")

prd.SetColor(Red, Green, Blue)

Message("GetColor Called")

prd.GetColor(R, G, B)

if(  ( Red == R) and (Green == G) and  ( Blue == B) )
{
	Message("color set and get are equal ")
	Message("color set ", Red ,Green , Blue)
	Message("colorGet" ,R ,G , B)	
}
else
{
	Message("set color is different from get color  ")
}

Piping_Rigid_Pipe.SetDefaultBendRadius()

Signature

Piping_Rigid_Pipe.SetDefaultBendRadius(iDefaultBendRadius : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iDefaultBendRadius In LENGTH Default bend radius value.

ReturnType

Integer

Piping_Rigid_Pipe.SetMinimunStraightLength()

Signature

Piping_Rigid_Pipe.SetMinimunStraightLength(iMinimunStraightLength : LENGTH)

Arguments

Name Input/Output Required? Type Comment
iMinimunStraightLength In LENGTH Minimum straight length value on the route.

Piping_Rigid_Pipe.SetNodeBendRadius()

Signature

Piping_Rigid_Pipe.SetNodeBendRadius(iIndex : Integer, iRadius : LENGTH) : Integer

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer Node index at which the user needs to set a bend radius.
iRadius In LENGTH Node bend radius value at existing node index.

ReturnType

Integer

Piping_Rigid_Pipe.SetOpacity()

Lets you set the opacity on the rigid pipe/tube from the geometric feature.

Signature

Piping_Rigid_Pipe.SetOpacity(iOpacity : Integer)

Arguments

Name Input/Output Required? Type Comment
iOpacity In Integer -

Piping_Rigid_Pipe.SetRouteAttributeString()

Lets you modify a route attribute that cannot be accessed directly when its type is a string.

Signature

Piping_Rigid_Pipe.SetRouteAttributeString(AttrName : String, AttrValue : String)

Arguments

Name Input/Output Required? Type Comment
AttrName In String This applies to V_NominalBendRadius.
AttrValue In String -

Example

let NominalBendRadius(String)
NominalBendRadius = "2D"
PipeRef.SetRouteAttributeString("V_NominalBendRadius", NominalBendRadius)

Piping_Rigid_Pipe_Inst.PropagateReferenceToGeometry()

Launches PLM Update to propagate attribute, apply and update geometry as per the shape and launch geometric update. If any geometric error appears, then this method will try to correct the issue and for some issues, it returns the error.

Signature

Piping_Rigid_Pipe_Inst.PropagateReferenceToGeometry() : Integer

ReturnType

Integer

Important Note

Regarding the following functions:

  • Add3Point()
  • RemoveNode()
  • GetNodeType()
  • SetDefaultBendRadius()
  • GetDefaultBendRadius()
  • SetNodeBendRadius()
  • GetNodeBendRadius()
  • ResetNodeBendRadiustoDefault()
  • SetMinimumStraightLength()
  • GetMinimumStraightLength()
  • PropagateReferenceToGeometry()
  • SetNewReference()

If you call these methods, then only PLM attributes are updated, but it does not update the geometry, then it may cause or not check build break in the geometry. After having completed all the modified routes functionality by calling these methods, its user responsibility to call the PropagateReferenceToGeometry() method at the end to update the geometry. This method correct bad values internally if it causes some build break or other bad issues.

Piping_Rigid_Pipe_Inst.SetNewReference()

Sets the given input VPMReference object of raw material attributes also if the input reference is Raw_Material_PipeTube. It creates a link with raw material.

Signature

Piping_Rigid_Pipe_Inst.SetNewReference(VPMReference : VPMReference) : Integer

Arguments

Name Input/Output Required? Type Comment
VPMReference In VPMReference VPMReference of the route filtered from the Data Setup or provided by the user as input from which attributes need to be copied.

If the input VPMReference is not NULL, then:

  • NewFrom -> Reuse or,
  • NewFrom -> ReuseorNewReference or
  • NewFrom -> NewReference

If input VPMReference is NULL, then NewFrom -> NewReference

ReturnType

Integer

The result values are as follows:

  • 0: the method succeeds
  • 1: the method failed

Piping_Spool_Occurrence.GetSpoolMode()

Method 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()

Method 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

SharedEquipmentPart.CreatePipingPort()

Lets you create piping/tubing ports.

Signature

SharedEquipmentPart.CreatePipingPort(X_OriginPt : Real, Y_OriginPt : Real, Z_OriginPt : Real, X_AlignDir : Real, Y_AlignDir : Real, Z_AlignDir : Real, X_OrientDir : Real, Y_OrientDir : Real, Z_OrientDir : Real, PortType : PipingPort_Types, PortName : String, X_OffsetPoint : Real [, Y_OffsetPoint : Real, Z_OffsetPoint : Real]) : Piping_Port

Arguments

Name Input/Output Required? Type Comment
X_OriginPt In Real Defines the center point of the port: X coordinate
Y_OriginPt In Real Defines the center point of the port: Y coordinate
Z_OriginPt In Real Defines the center point of the port: Z coordinate
X_AlignDir In Real Defines the alignment direction: X coordinate
Y_AlignDir In Real Defines the alignment direction: Y coordinate
Z_AlignDir In Real Defines the alignment direction: Z coordinate
X_OrientDir In Real Defines the orientation direction: X coordinate
Y_OrientDir In Real Defines the orientation direction: Y coordinate
Z_OrientDir In Real Defines the orientation direction: Z coordinate
PortType In PipingPort_Types Defines the type of the port from the predefined list in PipingPort_Types
PortName In String Defines the name of the port
X_OffsetPoint In Real If the port type is two points part or hole port, you must define the offset from the center of the port
Y_OffsetPoint In Real -
Z_OffsetPoint In Real -

ReturnType

Piping_Port

Example

/*To create a two point hole port on piping part*/

prd is Piping_Part 

let X_OPt(Real)
let Y_OPt(Real)
let Z_OPt(Real)
X_OPt=0
Y_OPt=0
Z_OPt=0
 
let X_alignDir(Real)
let Y_alignDir(Real)
let Z_alignDir(Real)
X_alignDir=0
Y_alignDir=0
Z_alignDir=2
 
let X_orientDir(Real)
let Y_orientDir(Real)
let Z_orientDir(Real)
X_orientDir=0
Y_orientDir=2
Z_orientDir=0

let X_offsetpt(Real)
let Y_offsetpt(Real)
let Z_offsetpt(Real)
X_offsetpt=2
Y_offsetpt=0
Z_offsetpt=0
 
let porttype(PipingPort_Types)
porttype= "CATPip2HolePort"

let portName(String)
portName = "test1"
 
let port(Piping_Port)
 
Message("CreatePipingPortCalled")
 
port = prd. CreatePipingPort(X_OPt, Y_OPt, Z_OPt, X_alignDir, Y_alignDir, Z_alignDir, X_orientDir, Y_orientDir, Z_orientDir, porttype,
portName, X_offsetpt,Y_offsetpt,Z_offsetpt)

SharedEquipmentPart.CreatePipingReplicatePort()

Lets you replicate piping/tubing ports.

Signature

SharedEquipmentPart.CreatePipingReplicatePort(SourceProductOccurrence : 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Knowledge Packages | 3D Modeling Apps | PRODUCT_Types (no NLS) Types, SourcePortName : String, TargetPortName : String, KeepLink : Boolean, GroupPort : Piping_Port) : Integer

Arguments

Name Input/Output Required? Type Comment
SourceProductOccurrence In 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Knowledge Packages | 3D Modeling Apps | PRODUCT_Types (no NLS) Types The piping part, pipe, or equipment occurrence with the source port to be replicated.
SourcePortName In String Name of the source port
TargetPortName In String Name of the target port
KeepLink In Boolean Keep link or Isolate link
GroupPort Out Piping_Port Output of group port

ReturnType

Integer

VPMPort.CheckCompatibility()

Signature

VPMPort.CheckCompatibility(Port Owner Occurrence : ProductOccurrence, Second Port : VPMPort, Second Port Owner Occurrence : ProductOccurrence, Use Only Compatibility Rule Table : Boolean, List of Additional Specifications : List, Parameters whose check failed : List) : Integer

Arguments

Name Input/Output Required? Type Comment
Port Owner Occurrence In ProductOccurrence -
Second Port In VPMPort -
Second Port Owner Occurrence In ProductOccurrence -
Use Only Compatibility Rule Table In Boolean -
List of Additional Specifications In List -
Parameters whose check failed Out List -

ReturnType

Integer

Example

			

VPMReference.CreatePipingPortOnReference()

Signature

VPMReference.CreatePipingPortOnReference(PortPtOrigin : GSMPoint, AlignDir : Direction, OrientDir : Direction, PortType : PipingPort_Types, PortName : String, OffsetPt : GSMPoint]) : Piping_Port

Arguments

Name Input/Output Required? Type Comment
PortPtOrigin In GSMPoint -
AlignDir In Direction -
OrientDir In Direction -
PortType In PipingPort_Types -
PortName In String -
OffsetPt In GSMPoint -

ReturnType

Piping_Port

Example

let prd(VPMReference)
let pGSMPoint_1(GSMPoint) 
let pGSMPoint_2(GSMPoint)
let pGSMPointCoord(GSMPointCoord)
let DirectionAlign(Direction) 
let DirectionOrient(Direction)
let pPoint(Point)
let pPointOffset(Point)
let pPointType(PointType)
let pBody(BodyFeature)
 
pPointType = "Coordinates"

let NameProduct(String)
NameProduct = prd.Name

if("Physical Product00000002_95E5D97B-0000-1C0C-5E0DB5C000044475" == NameProduct)
{
   pBody = prd->Find ("BodyFeature","",TRUE)
   
   if (NULL <> pBody)
   {
      Trace(1, " Body retrieved : ",pBody.Name)
      let porttype(PipingPort_Types)
      porttype= "CATPipPartPort"
      
	  
	  /* 2 point Part Port, + Offset */
	  /* ============================*/
	  porttype = "CATPip2PartPort"
	  portName = "PIP_Port_20_2pPart_+Offset"
	  
	  SetWorkingContext(pBody)

          let pPipingPort(Piping_Port)

	  pPoint = pBody->Find("Point","x.Name==\"Point_01\"",TRUE) 
          set pGSMPoint_1 = pPoint
		if (NULL <> pGSMPoint_1)
		{
			pGSMPoint_1.PointType = pPointType
			set pGSMPointCoord = pGSMPoint_1
			pGSMPointCoord.X = 0mm
			pGSMPointCoord.Y = 0mm
			pGSMPointCoord.Z = 0mm
			pGSMPointCoord.Update()
		}
	  

	  pPoint = pBody->Find("Point","x.Name==\"Point_02\"",TRUE) 
	  set pGSMPoint_2 = pPoint
	  
                if (NULL <> pGSMPoint_2)
		{
			pGSMPoint_2.PointType = pPointType
			set pGSMPointCoord = pGSMPoint_2
			pGSMPointCoord.X = 100mm
			pGSMPointCoord.Y = 0mm
			pGSMPointCoord.Z = 0mm
			pGSMPointCoord.Update()
		}
	  DirectionAlign = direction(1mm, 0mm, 0mm)
	  DirectionOrient = direction(0mm, 0mm, 1mm)
	  
	  pPipingPort= prd.CreatePipingPortOnReference(pGSMPoint_1, DirectionAlign, DirectionOrient, porttype, portName, pGSMPoint_2)
                if (NULL == pPipingPort)
		{
			Message("Creation FAIL")
		}
	  

	  pBody.Update()
   }  
}