My Code is Below
Sub CATMain()
Dim MySelection 'As Selection
Dim MyDoc As Document
Dim MyPart As PartDocument
Dim MyDrawing As DrawingDocument
Dim MyProduct As ProductDocument
Set MyDrawing = CATIA.ActiveDocument
Set MySelection = MyDrawing.Selection
ReDim strArray(0)
strArray(0) = "DrawingView"
Dim Status As String
Status = MySelection.SelectElement2(strArray, "Select Drawing View", True)
If Status = "Cancel" Then
Exit Sub
End If
MsgBox MySelection.Item(1).Type
End Sub
I get Return Type as "DrawingView" even if i select Line2D object as shown in attached drawing sheet. But if I try this code without SelectElement2 (Selection Item Collection) I get return type as "Line2D"
Is it a Bug or a Feature ? Please suggest any workaround
Sub CATMain()
Dim MySelection 'As Selection
Dim MyDoc As Document
Dim MyPart As PartDocument
Dim MyDrawing As DrawingDocument
Dim MyProduct As ProductDocument
Set MyDrawing = CATIA.ActiveDocument
Set MySelection = MyDrawing.Selection
ReDim strArray(0)
strArray(0) = "DrawingView"
Dim Status As String
Status = MySelection.SelectElement2(strArray, "Select Drawing View", True)
If Status = "Cancel" Then
Exit Sub
End If
MsgBox MySelection.Item(1).Type
End Sub
I get Return Type as "DrawingView" even if i select Line2D object as shown in attached drawing sheet. But if I try this code without SelectElement2 (Selection Item Collection) I get return type as "Line2D"
Is it a Bug or a Feature ? Please suggest any workaround