Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
DevicePositionX | PLM Entity |
Read | Length X coordinate of: - Cavity position if the conductor is routed to a cavity
- Device position if the conductor is routed to a device
|
DevicePositionY | PLM Entity |
Read | Length Y coordinate of: - Cavity position if the conductor is routed to a cavity
- Device position if the conductor is routed to a device
|
DevicePositionZ | PLM Entity |
Read | Length Z coordinate of: - Cavity position if the conductor is routed to a cavity
- Device position if the conductor is routed to a device
|
DistantLinkPositionX | PLM Entity |
Read | Length X coordinate of the connection position
|
DistantLinkPositionY | PLM Entity |
Read | Length Y coordinate of the connection position
|
DistantLinkPositionZ | PLM Entity |
Read | Length Z coordinate of the connection position
|
DistantLinkLength | Output | Write | Length Length of distant link to be used for conductor
length computation |
Sample
The following sample explains how to use an opening ID to compute the length of a distant link.
Let DDLPosX(Real)
Let DDLPosY(Real)
Let DDLPosZ(Real)
Let DistantLinkLen(Real)
Let DiffX(Real)
Let DiffY(Real)
Let DiffZ(Real)
Let DorCX(Real)
Let DorCY(Real)
Let DorCZ(Real)
/*Get the Distant link position on the Branch*/
Set DDLPosX = Parameters.GetAttributeReal("DistantLinkPositionX")
Set DDLPosY = Parameters.GetAttributeReal("DistantLinkPositionY")
Set DDLPosZ = Parameters.GetAttributeReal("DistantLinkPositionZ")
/*Get the position related to the Device*/
/*If Conductor is defined till device, this position is the Device Origin*/
/*If Conductor is defined till a cavity of the device, then this position is the position of the Cavity*/
Set DorCX = Parameters.GetAttributeReal("DevicePositionX")
Set DorCY = Parameters.GetAttributeReal("DevicePositionY")
Set DorCZ = Parameters.GetAttributeReal("DevicePositionZ")
/*Compute the linear distance between two points*/
Set DiffX = DDLPosX -DorCX
Set DiffY = DDLPosY -DorCY
Set DiffZ = DDLPosZ -DorCZ
Set DiffX = DiffX*DiffX
Set DiffY = DiffY*DiffY
Set DiffZ = DiffZ*DiffZ
Set DistantLinkLen = DiffX + DiffY + DiffZ
Set DistantLinkLen = sqrt(DistantLinkLen)
Set DistantLinkLen = DistantLinkLen/1000
/*Return the computed length*/
Parameters.SetAttributeReal("DistantLinkLength",DistantLinkLen)