Sub CATMain()
Dim InputObjectType(0)
InputObjectType(0) = "Product"
Dim oProductDoc
Set oProductDoc = CATIA.ActiveDocument
Dim oSelection
Set oSelection = oProductDoc.Selection
oSelection.Clear
Dim aSel
aSel = oSelection.SelectElement2(InputObjectType, "Select the part to open in a new window", False)
oSelection.Clear
If aSel = "Normal" Then
CATIA.StartCommand "Open in New Window"
Else
'Take some other action...
End If
End Sub
As long as an instance is selected, this command will open the part in it's own window. I added a check to be sure the selection was successful before calling because if nothing is selected CATIA just ignores the command plus you might want to take some other action...