Hello
I like to get the volume of a selected element from a macro.
The following code gives the error "type mismatch":
Sub CATMain()
CATIA.ActiveDocument.Selection.Clear()
Set dok = CATIA.ActiveDocument
Set volym=dok.selection
Dim objtyp(0)
objtyp(0)="Pad"
msgbox ("select a pad"
status=volym.SelectElement(objtyp,"Select a Pad",true)
set ref1=volym.Item(1).value
status=volym.EndSelectElement()
GetVolume(ref1)
End Sub
I think that the argument for GetVolume (ref1) is the wrong data type
How do I use GetVolume?
I like to get the volume of a selected element from a macro.
The following code gives the error "type mismatch":
Sub CATMain()
CATIA.ActiveDocument.Selection.Clear()
Set dok = CATIA.ActiveDocument
Set volym=dok.selection
Dim objtyp(0)
objtyp(0)="Pad"
msgbox ("select a pad"
status=volym.SelectElement(objtyp,"Select a Pad",true)
set ref1=volym.Item(1).value
status=volym.EndSelectElement()
GetVolume(ref1)
End Sub
I think that the argument for GetVolume (ref1) is the wrong data type
How do I use GetVolume?