Mit folgender Routine, gefunden im COE-Forum, lässt sich das ausgewählte(blaue) Produkt/Part in einem Produkt bestimmen:
Option Explicit
'Thread: http://www.coe.org/p/fo/st/thread=24504
'Autor: The GEL
'RE: Active Document and UI Active Object
'June 7, 2011 09:32 PM (in response to The GEL)
'The code is as follows:
'--------------------------------------------
Sub CATMain()
MsgBox "The UI Active Object is: " & GetUIActiveObject.Name
End Sub
Function GetUIActiveObject() As Variant
Dim oSel As Selection
Set oSel = CATIA.ActiveDocument.Selection
oSel.Clear
oSel.Search ("type=*,in") 'Select the UI Active Component and the children of it only
Set GetUIActiveObject = oSel.Item2(1).Value
oSel.Clear
End Function