<?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: I logic to Select vertex on part and create WorPoint in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030344#M84770</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176" target="_self"&gt;jhoel.forshav&lt;/A&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476" target="_self"&gt;bradeneurope&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Both of those work exactly as I was wanting them too. Thank you very much. Now to figure out how to change the name of the new WorkPoint.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 May 2018 15:21:36 GMT</pubDate>
    <dc:creator>neodd70</dc:creator>
    <dc:date>2018-05-28T15:21:36Z</dc:date>
    <item>
      <title>I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030158#M84766</link>
      <description>&lt;P&gt;I am trying to create either an iLogic Rule or a VBA Macro that when the Macro/Rule is run the user needs to select a vertex on the part and the iLogic code will take the X, Y and Z coordinates from that vertex selection and create a WorkPoint at that location. I am using the CommandManager.Pick to have the user select the vertex but when I try to add a WorkPoint using the Measure.MinimumDistance I get an error that there is an Object required. I am not a programmer so I am trying to fumble my way thru to get this to work. Is there anyone that would be able to look at the code I have and tell me what I have done wrong. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Single_Bend_Door_Add_WorkPoints()

Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oDef As PartComponentDefinition
Set oDef = oDoc.ComponentDefinition

Dim oPoint As Vertex
Set oPoint = ThisApplication.CommandManager.Pick(kPartVertexFilter, "Right Side")
Dim wp1 As WorkPoint
Set wp1 = oDef.WorkPoints.AddByPoint(Measure.MinimumDistance(oPoint.Point.X, oPoint.Point.Y, oPoint.Point.Z))


End Sub&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 May 2018 13:15:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030158#M84766</guid>
      <dc:creator>neodd70</dc:creator>
      <dc:date>2018-05-28T13:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030266#M84768</link>
      <description>&lt;P&gt;try this as an iLogic rule&lt;/P&gt;&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;PartDocument&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ActiveDocument&lt;/SPAN&gt;

&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oDef&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;PartComponentDefinition&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oDef&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ComponentDefinition&lt;/SPAN&gt;

&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPoint&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;CommandManager&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Pick&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;SelectionFilterEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kPartVertexFilter&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Right Side"&lt;/SPAN&gt;)
&lt;SPAN style="color: #800000;"&gt;oDef&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;WorkPoints&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;AddByPoint&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;oPoint&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Hope it helps &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 14:19:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030266#M84768</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2018-05-28T14:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030283#M84769</link>
      <description>&lt;P&gt;Change to code a little:&lt;/P&gt;&lt;PRE&gt;Sub Single_Bend_Door_Add_WorkPoints()

Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oDef As PartComponentDefinition
Set oDef = oDoc.ComponentDefinition

Dim oPoint As Vertex
Set oPoint = ThisApplication.CommandManager.Pick(kPartVertexFilter, "Right Side")
Dim wp1 As WorkPoint
Set wp1 = oDef.WorkPoints.AddByPoint(oPoint)


End Sub&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 May 2018 14:38:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030283#M84769</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-05-28T14:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030344#M84770</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176" target="_self"&gt;jhoel.forshav&lt;/A&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476" target="_self"&gt;bradeneurope&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Both of those work exactly as I was wanting them too. Thank you very much. Now to figure out how to change the name of the new WorkPoint.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 15:21:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030344#M84770</guid>
      <dc:creator>neodd70</dc:creator>
      <dc:date>2018-05-28T15:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030487#M84771</link>
      <description>&lt;P&gt;I figured out out how to rename my WorkPoints but another issue I am trying to work thru is how to differentiate between a Vertex of a solid and the point of a sketch. I can Change the kAllPartVertexFilter to kAllPointEntities so that I can now select the point of a sketch but that disables the ability to select a Vertex.&amp;nbsp; How would I be able to select either a sketch point or a Vertex.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 16:38:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030487#M84771</guid>
      <dc:creator>neodd70</dc:creator>
      <dc:date>2018-05-28T16:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030499#M84772</link>
      <description>I will take a look</description>
      <pubDate>Mon, 28 May 2018 16:51:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8030499#M84772</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-05-28T16:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8033533#M84815</link>
      <description>&lt;P&gt;I was able to get what I needed from the code you helped with. I have a similar situation where I need to have the user select 4 points on a door, Upper and Lower, Left and Right Vertices but this time it's in an assembly I tried my hand at code once more but I've hit a stumbling block with the Object problem again.&amp;nbsp; Here is the code I have so Far. This Time it's in ilogic. If there is a way of doing this without having to add the workpoints that would be great. Basically I just need to dimension from the YZ Plane to the bottom right and left points and from the top right and left points of the door to retrieve their dimension in the X axis so I can plug those numbers into a parameter that sets the length from midpoint in each direction of a secondary part.&amp;nbsp;Any Help would be appreciated.&lt;/P&gt;&lt;PRE&gt;Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition

oPoint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllEntitiesFilter, "Please Select the Front Lower Left Vertex of the Door")
Dim wp1 As WorkPoint = oAsmDef.WorkPoints.AddByPoint(oPoint)
wp1.Name = "wpt1"
oPoint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllEntitiesFilter, "Please Select the Front Lower Right Vertex of the Door")
Dim wp2 As WorkPoint = oAsmDef.WorkPoints.AddByPoint(oPoint)
wp2.Name = "wpt1"
oPoint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllEntitiesFilter, "Please Select the Upper Left Vertex of the Door")
Dim wp3 As WorkPoint = oAsmDef.WorkPoints.AddByPoint(oPoint)
wp3.Name = "wpt1"
oPoint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllEntitiesFilter, "Please Select the Upper Right Vertex of the Door")
Dim wp4 As WorkPoint = oAsmDef.WorkPoints.AddByPoint(oPoint)
wp4.Name = "wpt1"

LowerTrainLeftDim = Measure.MinimumDistance("wpt1", "YZ Plane")
LowerTrainRightDim = Measure.MinimumDistance("wpt2", "YZ Plane")
UpperTrainLeftDim = Measure.MinimumDistance("wpt3", "YZ Plane")
UpperTrainRightDim = Measure.MinimumDistance("wpt4", "YZ Plane")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 20:39:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8033533#M84815</guid>
      <dc:creator>neodd70</dc:creator>
      <dc:date>2018-05-29T20:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8035619#M84847</link>
      <description>&lt;P&gt;So I realized that the object I was missing was to Dim my oPoint as a Vertex but now when I run my code I get an error that it just failed without any explanation of what failed. Would somebody be able to tell me what I am doing wrong here. I have searched the forums and the only thing I was able to find was setting a Fixed WorkPoint with typed in coordinates but nothing on picking a vertex of a part in an Assembly as where I want to place the WorkPoint.&amp;nbsp; Here is the Code I have.&lt;/P&gt;&lt;PRE&gt;Sub Door_Corners()

Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = ThisApplication.ActiveDocument
Dim oAsmDef As AssemblyComponentDefinition
Set oAsmDef = oAsmDoc.ComponentDefinition

Dim oPoint As Vertex
Set oPoint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartVertexFilter, "Please Select the Front Lower Left Vertex of the Door")
Dim wp1 As WorkPoint
Set wp1 = oAsmDef.WorkPoints.AddByPoint(oPoint)

End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 15:24:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/8035619#M84847</guid>
      <dc:creator>neodd70</dc:creator>
      <dc:date>2018-05-30T15:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/9013688#M101113</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I try to use your program in my part, it shows error as in attached image.&lt;/P&gt;&lt;P&gt;I have a sketch which contains the projected cuts edges, From that I need to find points &amp;amp; then I have to create a sketch in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 11:14:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/9013688#M101113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-09T11:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/9013713#M101116</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;When running a rule from the iLogic IDE you need to have a Main Sub and then call your other Sub from within the Main or just put your code in the Main Sub. Also the "Set" command is an invalid command in the iLogic IDE so those just need to be removed. Try this&lt;/P&gt;&lt;PRE&gt;Sub Main()
	Door_Corners()
End Sub

Sub Door_Corners()

Dim oDoc As PartDocument
oDoc = ThisApplication.ActiveDocument

Dim oDef As PartComponentDefinition
oDef = oDoc.ComponentDefinition

Dim oPoint As Vertex
oPoint = ThisApplication.CommandManager.Pick(kPartVertexFilter, "Right Side")

Dim wp1 As WorkPoint
wp1 = oDef.WorkPoints.AddByPoint(oPoint)

End Sub&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Sep 2019 11:26:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/9013713#M101116</guid>
      <dc:creator>neodd70</dc:creator>
      <dc:date>2019-09-09T11:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: I logic to Select vertex on part and create WorPoint</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/9013736#M101118</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4447887"&gt;@neodd70&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;I need to extract points (Line intersection) from the projected sketch. Pls see the attached image, In that image I have marked an area in red.&lt;/P&gt;&lt;P&gt;I need a program to create a closed sketch as I shown or just to identify the points to create a sketch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Arun Rajasekaran&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 11:36:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/i-logic-to-select-vertex-on-part-and-create-worpoint/m-p/9013736#M101118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-09T11:36:57Z</dc:date>
    </item>
  </channel>
</rss>

