Raceway Physical Functions

Raceway Physical Functions

This page discusses:

ListTrayByCablewaySegment

ListTrayByCablewaySegment

Signature

ListTrayByCablewaySegment(Segment : Segment) : List

Arguments

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

ReturnType

List

Raceway_Part.CreateRacewayPort()

Lets you create raceway ports.

Signature

Raceway_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

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 RacewayPort_Types Defines the type of the port from the predefined list in RacewayPort_Types
PortName In String Defines the name of the port
X_OffsetPoint In No 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 No Real -
Z_OffsetPoint In No Real -

ReturnType

Raceway_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)

Raceway_Port.CheckCompatibility()

Raceway_Port.CheckCompatibility()

Signature

Raceway_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

Raceway_Port.SetPortAttributeReal()

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

Signature

Raceway_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

Raceway_Port.SetPortAttributeString()

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

Signature

Raceway_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

Raceway_Tray.Add3DPoint()

Lets you add a list of points.

Signature

Raceway_Tray.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 adding after this input Index. If you want to add a point before the first index, the value must be "0".

ReturnType

Integer

Raceway_Tray.GetColor()

Lets you retrieve the color of the tray from the geometrical feature.

Signature

Raceway_Tray.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  ")
}

Raceway_Tray.GetDefaultBendRadius()

Raceway_Tray.GetDefaultBendRadius()

Signature

Raceway_Tray.GetDefaultBendRadius(oDefaultBendRadius : LENGTH)

Arguments

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

Raceway_Tray.GetMinimunStraightLength()

Raceway_Tray.GetMinimunStraightLength()

Signature

Raceway_Tray.GetMinimunStraightLength(oMinimumStraightLength : LENGTH)

Arguments

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

Raceway_Tray.GetNodeBendRadius()

Raceway_Tray.GetNodeBendRadius()

Signature

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

Arguments

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

Raceway_Tray.GetNodeType()

Raceway_Tray.GetNodeType()

Signature

Raceway_Tray.GetNodeType(iIndex : Integer, oEnumNodeType : RacewayNodeType)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer -
oEnumNodeType Out RacewayNodeType CATRwyTrayPortPoint, CATRwyTrayDirectionalPoint, CATRwyTrayComputedPoint, CATRwyTray3DPoint, CATRwyTrayParallelPoint

Raceway_Tray.GetOpacity()

Raceway_Tray.GetOpacity()

Signature

Raceway_Tray.GetOpacity(oOpacity : Integer)

Arguments

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

Raceway_Tray.GetSectionOrientation()

Raceway_Tray.GetSectionOrientation()

Signature

Raceway_Tray.GetSectionOrientation(oEnumOrientationType : RacewayOrientation)

Arguments

Name Input/Output Required? Type Comment
oEnumOrientationType Out RacewayOrientation CATRwyTrayVerticalUp, CATRwyTrayVerticalDown, CATRwyTrayHorizontalLeft, CATRwyTrayHorizontalRight

Raceway_Tray.RemoveNode()

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

Signature

Raceway_Tray.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

Raceway_Tray.ResetNodeBendRadiustoDefault()

Raceway_Tray.ResetNodeBendRadiustoDefault()

Signature

Raceway_Tray.ResetNodeBendRadiustoDefault(iIndex : Integer)

Arguments

Name Input/Output Required? Type Comment
iIndex In Integer Node index at which user resets the bend radius to default bend radius.

Raceway_Tray.SetColor()

Lets you set the color of the tray from the geometrical feature.

Signature

Raceway_Tray.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  ")
}

Raceway_Tray.SetDefaultBendRadius()

Raceway_Tray.SetDefaultBendRadius()

Signature

Raceway_Tray.SetDefaultBendRadius(iDefaultBendRadius : LENGTH) : Integer

Arguments

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

ReturnType

Integer

Raceway_Tray.SetMinimunStraightLength()

Raceway_Tray.SetMinimunStraightLength()

Signature

Raceway_Tray.SetMinimunStraightLength(iMinimunStraightLength : LENGTH)

Arguments

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

Raceway_Tray.SetNodeBendRadius()

Raceway_Tray.SetNodeBendRadius()

Signature

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

Arguments

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

ReturnType

Integer

Raceway_Tray.SetOpacity()

Raceway_Tray.SetOpacity()

Signature

Raceway_Tray.SetOpacity(iOpacity : Integer)

Arguments

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

Raceway_Tray.SetSectionOrientation()

Raceway_Tray.SetSectionOrientation()

Signature

Raceway_Tray.SetSectionOrientation(iEnumOrientation : RacewayOrientation)

Arguments

Name Input/Output Required? Type Comment
iEnumOrientation In RacewayOrientation CATRwyTrayVerticalUp, CATRwyTrayVerticalDown, CATRwyTrayHorizontalLeft, CATRwyTrayHorizontalRight

Raceway_Tray.SetShape()

Raceway_Tray.SetShape()

Signature

Raceway_Tray.SetShape(V_RwyShape_Enum : V_RwyShape_Enum)

Arguments

Name Input/Output Required? Type Comment
V_RwyShape_Enum In V_RwyShape_Enum Enum is already defined in metadata as U or H shape type.

Raceway_TrayXPort.CheckCompatibility()

Raceway_TrayXPort.CheckCompatibility()

Signature

Raceway_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

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

Raceway_TrayXPort.SetPortAttributeString()

Raceway_TrayXPort.SetPortAttributeString()

Signature

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

Arguments

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

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.

Signature

Raceway_Tray_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 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 responsability 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()

Signature

Raceway_Tray_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 input VPMReference is not NULL, then:

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

If input VPMReference is NULL, then NewFrom -> NewReference

ReturnType

Integer

VPMReference.CreateRacewayPortOnReference()

Signature

VPMReference.CreateRacewayPortOnReference(PortPtOrigin : GSMPoint, AlignDir : Direction, OrientDir : Direction, PortType : RacewayPort_Types, PortName : String, OffsetPt : GSMPoint]) : Raceway_PartPort

Arguments

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

ReturnType

Raceway_PartPort

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