Role: This interface is used to interact with a device's home positions. This includes devices created in using V5 mechanisms or imported from DENEB D5.
A home position is a list of values, each value being associated to each Degrees Of Freedom(DOF) of the device, defining a state for the device (The list size matches the number of commands that can be simulated).
With home positions, it is possible to define Tool tips. A Tool tip is a specific device part meant to be in contact with product(s). User may define some device parts as tool tips so that, when they are in collision, the clash is ignored. Tool tips are excluded from clash analysis in tools like DPM Body-in-White's weldgun search.
The following code snippet can be used to obtain a home position from a device.
Dim objDevice As BasicDevice
set objDevice = CATIA.ActiveDocument.Product.GetTechnologicalObject("BasicDevice")
Dim ListOfHomePositions()
objDevice.GetHomePositions ListOfHomePositions
Dim homePos as HomePosition
For Each homePos In ListOfHomePositions
...
Next
Methods
- Sub GetAssociatedToolTip( oTipList)
-
Get the tooltips associated with the home position.
- Parameters:
-
- oTipList
- This out parameter contains list of tooltips associated with the home position. The list contains a set of device parts. dd>
- Example:
-
' declaration of 1 list of products and 1 home position Dim MyToolTips() As Product Dim MyHomePosition As HomePosition ' valuation of variables Set MyHomePosition = ... ' retrieval of tool tips as part of product array MyHomePosition.GetAssociatedToolTip( MyToolTips ) ' start a loop displaying the name of each tool tip For Each toolTip In toolTips 'warning: MsgBox is a modal dialog: it requires user interactions!! MsgBox toolTip.PartNumber = ... Next
- Sub GetDOFValues( oValues)
-
Get the DOF values for the home position.
- Parameters:
-
- oValues
- This contains a list of the current DOF values.
Please note that values are expressed as:
- meters for length values
- radians for angle values
- Example:
-
Dim objDevice As BasicDevice set objDevice = CATIA.ActiveDocument.Product.GetTechnologicalObject("BasicDevice") Dim ListOfHomePositions() objDevice.GetHomePositions ListOfHomePositions Dim homePos as HomePosition 'define an empty array to store the values Dim DOFValues () For Each homePos In ListOfHomePositions homePos.GetDOFValues DOFValues For i = 0 to ubound (DOFValues) ... Next Next
- Sub SetAssociatedToolTip( iTipList)
-
Set the tool tip associated with the home position.
- Parameters:
-
- iTipList
- This parameter contains list of associated tooltips (device parts meant to be ignored during clash analysis). dd>
- Example:
-
' declaration of 2 products and 1 home position Dim MyPart1 As Product Dim MyPart2 As Product Dim MyHomePosition As HomePosition ' valuation of variables Set MyPart1 = ... Set MyPart2 = ... Set MyHomePosition = ... ' defining the tool tips through an array Dim MyToolTips(1) As Product Set MyToolTips(0) = MyPart1 Set MyToolTips(1) = MyPart2 MyHomePosition.SetAssociatedToolTip( MyToolTips )
- Sub SetDOFValues( iValues)
-
Set the DOF values for the home position.
- Parameters:
-
- oValues
- This contains a list of the current DOF values.
Please note that values are expressed as:
- meters for length values
- radians for angle values
- Example:
-
Dim DOFValues (6) For i = 0 to 5 'Store value in radians DOFValues(i) = 10 * i * (pi / 180.0) next 'Note: to obtain homePos, please refer to example in GetDOFValues homePos.SetDOFValues DOFValues