Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function GetSelectedProductDocument() As Document
Dim oSelection As Selection
Set oSelection = CATIA.ActiveDocument.Selection
If oSelection.Count > 0 Then
If TypeName(oSelection.Item(1).Value) = "Product" Then
Set GetSelectedProductDocument = oSelection.Item(1).Value.ReferenceProduct.Parent
End If
End If
End Function
Sub TestOfGetSelectedProductDocument()
Dim SelectedDocument As Document
Set SelectedDocument = GetSelectedProductDocument
If Not (SelectedDocument Is Nothing) Then
MsgBox "Selected Document: " & SelectedDocument.FullName
End If
End Sub