Hallo Andreas,
das SelectSet ist eine ObjectCollection. Als erstes kannst Du ja mal SelectSet.Count abfragen. Mit diesem Code bekommst Du - falss selektiert - einen Workpoint zurückgeliefert, selektiere erst eine Repräsentation und als zweites den Ursprungspunkt:
Private Sub getSelectSet()
Dim oApp As Inventor.Application
Set oApp = ThisApplication
Dim oDoc As AssemblyDocument
Set oDoc = oApp.ActiveDocument
Debug.Print oDoc.SelectSet.Count
Dim oObj As Object
Set oObj = oDoc.SelectSet(2)
If TypeOf oObj Is WorkPoint Then
Dim oWp As WorkPoint
Set oWp = oDoc.SelectSet(2)
Debug.Print oWp.Point.X
Debug.Print oWp.Point.X
Debug.Print oWp.Point.X
Debug.Print ""
End If
End Sub
Du kannst so zumindest die Koordinaten abfragen und falls 0, 0, 0 könnte es der Ursprungspunkt sein.
Die Repräsentation bekommst Du allerdings nicht über die API.
Grüsse,
Paul
www.morecam.ch
www.thinkcad.de
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP