Indexes
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
| o Sub GetAssociatedToolTip( | oTipList) |
' 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
| o Sub GetDOFValues( | oValues) |
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
| o Sub SetAssociatedToolTip( | iTipList) |
' 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 )
| o Sub SetDOFValues( | iValues) |
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
Copyright © 2006, Dassault Systèmes. All rights reserved.