<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Inventor CommandManager.pick to Point3D in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-commandmanager-pick-to-point3d/m-p/12405650#M160784</link>
    <description>&lt;P&gt;..Dug in the documentation &amp;amp; found out what I was looking for.&lt;/P&gt;&lt;P&gt;Here is the code I ended up with :&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Private Class Testing
	Private Selecting As Boolean
	
	Sub Main()
		
		Dim i  As InteractionEvents  = ThisApplication.CommandManager.CreateInteractionEvents
	 	i.InteractionDisabled = False
		
		Dim selectEvents As Inventor.SelectEvents = i.SelectEvents()
		AddHandler selectEvents.OnSelect, AddressOf oSelectEvents_OnSelect
		i.Start
		Selecting = True
		
		While Selecting = True		
			ThisApplication.UserInterfaceManager.DoEvents()
			
		End While
		 
		i.Stop
	 
	End Sub

	Private Sub oSelectEvents_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, ByVal SelectionDevice As SelectionDeviceEnum, ByVal ModelPosition As Point, ByVal ViewPosition As Point2d, ByVal View As View)
		MsgBox("X :" &amp;amp; Round(ModelPosition.X, 2) &amp;amp; "   Y :" &amp;amp;Round(ModelPosition.Y, 2) &amp;amp; "   Z :" &amp;amp; Round(ModelPosition.Z, 2))
    	Selecting = False
	
	End Sub
	
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 14:38:30 GMT</pubDate>
    <dc:creator>FINET_Laurent</dc:creator>
    <dc:date>2023-11-28T14:38:30Z</dc:date>
    <item>
      <title>Inventor CommandManager.pick to Point3D</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-commandmanager-pick-to-point3d/m-p/12405385#M160777</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here in the folowing example, I'm using the command manager to pick a surface (pipe) to add a component.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating the component, adding to assembly, placing the constraints around the pipe, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last constraint that I didn't add is in the axis of the pipe. The component can move left &amp;amp; right according to the axis. As for now it is landing randomly along the axis. Whould there be somehow a way to get the 3D point where I clicked using the commandManager.Pick method ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FINET_Laurent_0-1701176993763.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1298149iB7FD8F1B5423EE38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FINET_Laurent_0-1701176993763.png" alt="FINET_Laurent_0-1701176993763.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you &amp;amp; kind regards,&lt;/P&gt;&lt;P&gt;FINET L.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:10:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-commandmanager-pick-to-point3d/m-p/12405385#M160777</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2023-11-28T13:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor CommandManager.pick to Point3D</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-commandmanager-pick-to-point3d/m-p/12405650#M160784</link>
      <description>&lt;P&gt;..Dug in the documentation &amp;amp; found out what I was looking for.&lt;/P&gt;&lt;P&gt;Here is the code I ended up with :&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Private Class Testing
	Private Selecting As Boolean
	
	Sub Main()
		
		Dim i  As InteractionEvents  = ThisApplication.CommandManager.CreateInteractionEvents
	 	i.InteractionDisabled = False
		
		Dim selectEvents As Inventor.SelectEvents = i.SelectEvents()
		AddHandler selectEvents.OnSelect, AddressOf oSelectEvents_OnSelect
		i.Start
		Selecting = True
		
		While Selecting = True		
			ThisApplication.UserInterfaceManager.DoEvents()
			
		End While
		 
		i.Stop
	 
	End Sub

	Private Sub oSelectEvents_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, ByVal SelectionDevice As SelectionDeviceEnum, ByVal ModelPosition As Point, ByVal ViewPosition As Point2d, ByVal View As View)
		MsgBox("X :" &amp;amp; Round(ModelPosition.X, 2) &amp;amp; "   Y :" &amp;amp;Round(ModelPosition.Y, 2) &amp;amp; "   Z :" &amp;amp; Round(ModelPosition.Z, 2))
    	Selecting = False
	
	End Sub
	
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:38:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/inventor-commandmanager-pick-to-point3d/m-p/12405650#M160784</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2023-11-28T14:38:30Z</dc:date>
    </item>
  </channel>
</rss>

