ListTrayByCablewaySegmentRaceway_Part.CreateRacewayPort()Lets you create raceway ports. SignatureRaceway_Part.CreateRacewayPort(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 : RacewayPort_Types, PortName : String, X_OffsetPoint : Real [, Y_OffsetPoint : Real, Z_OffsetPoint : Real]) : Raceway_PartPort Arguments
ReturnTypeRaceway_PartPort Example/*To create a two point hole port on raceway part*/
prd is Raceway_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(RacewayPort_Types)
porttype= "CATRcw2HolePort"
let portName(String)
portName = "test1"
let port(Raceway_Port)
Message("CreateRacewayPortCalled")
port = prd. CreateRacewayPort(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.CreateRacewayReplicatePort()Lets you replicate Raceway ports. SignaturePLMEnsRefEquipment.CreateRacewayReplicatePort(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 : Raceway_Port) : Integer Arguments
ReturnTypeInteger SharedEquipmentPart.CreateRacewayReplicatePort()Raceway_Port.CheckCompatibility()Raceway_Port.CheckCompatibility() SignatureRaceway_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
ReturnTypeInteger Raceway_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. SignatureRaceway_Port.GetOffsetPort(OffsetPort : PLMPort) : Boolean Arguments
ReturnTypeBoolean This Boolean can return two values:
Examplelet PLM_port(PLMPort)
let rcd_port(Raceway_Port)
let list_child_Part(List)
let index(Integer)
let port_types(RacewayPort_Types)
let bStatus(Boolean)
let oPLMPort(PLMPort)
let RacewayPrtOcc(Raceway_Part_Occurrence)
if (RacewayPrtOcc <> NULL)
{
list_child_Part = RacewayPrtOcc.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 rcd_port = PLM_port
if(rcd_port <> NULL)
{
Trace(1, "Got the Raceway part Port", "")
bStatus = rcd_port->GetPortType(port_types)
if(bStatus == true)
{
Trace(1, "Getting port type successfully", "")
Trace(1, "Type is: ", port_types)
}
bStatus = rcd_port->GetOffsetPort(oPLMPort)
if(oPLMPort <> NULL AND bStatus == true)
{
Trace(1, "PLM Port received from method", "")
}
}
}
}
}
Raceway_Port.GetPortType()This function allows you to find the type of the selected port. SignatureRaceway_Port.GetPortType(PortType : RacewayPort_Types) : Boolean Arguments
ReturnTypeBoolean This Boolean can return two values:
Examplelet PLM_port(PLMPort)
let rcd_port(Raceway_Port)
let list_child_Part(List)
let index(Integer)
let port_types(RacewayPort_Types)
let bStatus(Boolean)
let oPLMPort(PLMPort)
let RacewayPrtOcc(Raceway_Part_Occurrence)
if (RacewayPrtOcc <> NULL)
{
list_child_Part = RacewayPrtOcc.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 rcd_port = PLM_port
if(rcd_port <> NULL)
{
Trace(1, "Got the Raceway part Port", "")
bStatus = rcd_port->GetPortType(port_types)
if(bStatus == true)
{
Trace(1, "Getting port type successfully", "")
Trace(1, "Type is: ", port_types)
}
bStatus = rcd_port->GetOffsetPort(oPLMPort)
if(oPLMPort <> NULL AND bStatus == true)
{
Trace(1, "PLM Port received from method", "")
}
}
}
}
}
Raceway_Port.SetPortAttributeReal()Raceway_Port.SetPortAttributeString()Raceway_Tray.Add3DPoint()Raceway_Tray.GetColor()Lets you retrieve the color of the tray from the geometrical feature. Arguments
Examplelet 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 ")
}
Raceway_Tray.GetDefaultBendRadius()Raceway_Tray.GetMinimunStraightLength()Raceway_Tray.GetNodeBendRadius()Raceway_Tray.GetNodeType()SignatureRaceway_Tray.GetNodeType(iIndex : Integer, oEnumNodeType : RacewayNodeType) Arguments
Raceway_Tray.GetOpacity()Raceway_Tray.GetSectionOrientation()Raceway_Tray.GetSectionOrientation() SignatureRaceway_Tray.GetSectionOrientation(oEnumOrientationType : RacewayOrientation) Arguments
Raceway_Tray.RemoveNode()Raceway_Tray.ResetNodeBendRadiustoDefault()Raceway_Tray.SetColor()Lets you set the color of the tray from the geometrical feature. Arguments
Examplelet 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 ")
}
Raceway_Tray.SetDefaultBendRadius()Raceway_Tray.SetMinimunStraightLength()Raceway_Tray.SetNodeBendRadius()Raceway_Tray.SetOpacity()Raceway_Tray.SetSectionOrientation()Raceway_Tray.SetSectionOrientation() SignatureRaceway_Tray.SetSectionOrientation(iEnumOrientation : RacewayOrientation) Arguments
Raceway_Tray.SetShape()Raceway_TrayXPort.CheckCompatibility()Raceway_TrayXPort.CheckCompatibility() SignatureRaceway_TrayXPort.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
ReturnTypeInteger Raceway_TrayXPort.SetPortAttributeString()Raceway_Tray_Inst.PropagateReferenceToGeometry()Launches PLM Update to propagate attribute, apply and update geometry as per the shape and launch geometrical update. If any geometrical error appears, then this method will try to correct the issue and for some issues, it returns the error. SignatureRaceway_Tray_Inst.PropagateReferenceToGeometry() : Integer ReturnTypeInteger Important NoteRegarding the following functions:
If you call thiese functions, then only PLM attributes will be updated, but it will 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 functions, its user responsibility to call the PropagateReferenceToGeometry() function at the end to update the geometry. This function will correct bad values internally if it cause some build break or other bad issues. Raceway_Tray_Inst.SetNewReference()Raceway_Tray_Inst.SetNewReference() SignatureRaceway_Tray_Inst.SetNewReference(VPMReference : VPMReference) : Integer Arguments
ReturnTypeInteger VPMReference.CreateRacewayPortOnReference()SignatureVPMReference.CreateRacewayPortOnReference(PortPtOrigin : GSMPoint, AlignDir : Direction, OrientDir : Direction, PortType : RacewayPort_Types, PortName : String, OffsetPt : GSMPoint]) : Raceway_PartPort Arguments
ReturnTypeRaceway_PartPort Examplelet 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(RacewayPort_Types)
/* 2 point Hole Port, + Offset */
/* ============================*/
porttype = "CATRaceway2HolePort"
portName = "RCD_Port_40_2pHole_+Offset"
SetWorkingContext(pBody)
let port(Raceway_Port)
pPoint = pBody->Find("Point","x.Name==\"Point_1\"",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_2\"",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)
port = prd.CreateRacewayPortOnReference(pGSMPoint_1, DirectionAlign, DirectionOrient, porttype, portName, pGSMPoint_2)
if (NULL == port )
{
Message("Creation FAIL")
}
pBody.Update()
}
}
|