I am using the SelectByRay function to select an Object and would like to get the Intersection-Point of the Object and the ray.
Does anybody know how I can do that?
after the selection is made, you can get the point using SelectionManager.GetSelectionPoint2(Index,Mark)
that will give you the point that the ray has intersected
Dim Selmgr As SelectionMgr
Set Selmgr = ModDoc.SelectionManager
If Selmgr.GetSelectedObjectCount2(-1) = 1 Then
Dim Pt(2) As Double
For i = 0 To 2
Pt(i) = Selmgr.GetSelectionPoint2(1, -1)(i)
Debug.Print Pt(0) & ", " & Pt(1) & ", " & Pt(2)
Thank you very much! Works well!
Retrieving data ...