<?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: Reference key of point in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9641203#M60730</link>
    <description>&lt;P&gt;It's most likely a Vertex object, instead of an actual Point object.&lt;/P&gt;&lt;P&gt;Try defining the object you selected as a Vertex, that should allow you to get the ReferenceKey.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jul 2020 14:53:08 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2020-07-17T14:53:08Z</dc:date>
    <item>
      <title>Reference key of point</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9640828#M60729</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the select event to select entities on a component, but when I select on a point of an edge, it is not a point type. I would like to get the reference key to that point, how can I do that? Please help me in this case! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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="2020-07-17_18h10_29.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/796379i97486436906181E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-07-17_18h10_29.png" alt="2020-07-17_18h10_29.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 11:21:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9640828#M60729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-17T11:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reference key of point</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9641203#M60730</link>
      <description>&lt;P&gt;It's most likely a Vertex object, instead of an actual Point object.&lt;/P&gt;&lt;P&gt;Try defining the object you selected as a Vertex, that should allow you to get the ReferenceKey.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 14:53:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9641203#M60730</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-07-17T14:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reference key of point</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9641240#M60731</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A code like this should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
Dim oObj As Object = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartVertexFilter, "Select A Vertex.")
If oObj Is Nothing Then
	MsgBox("Selection was canceled. Exiting.", vbOKOnly, " ")
	Return
End If
If oObj.Type.ToString &amp;lt;&amp;gt; "67120432" Then
	MsgBox("Item selected was not a Vertex. Exiting.", vbOKOnly, " ")
	Return
End If
Dim oVertex As Vertex = oObj
Dim oRefKey() As Byte
Dim oKeyContext As Integer = 1
Try
	oVertex.GetReferenceKey(oRefKey)
Catch oEx As Exception
	MsgBox("The GetReferenceKey Sub failed." &amp;amp; vbCrLf &amp;amp; _
	"The Error Message is as follows:" &amp;amp; vbCrLf &amp;amp; _
	oEx.Message &amp;amp; vbCrLf  &amp;amp; vbCrLf &amp;amp; _
	"And the Source was as follows:" &amp;amp; vbCrLf &amp;amp; _
	oEx.Source &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; _
	"And the StackTrace was as follows:" &amp;amp; vbCrLf &amp;amp; _
	oEx.StackTrace, vbOKOnly + vbExclamation, " ")
End Try&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although, in some of my tests, it returned the following error message.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="GetReferenceKey Error Message.png" style="width: 448px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/796460i55B5119BBD1BCB3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="GetReferenceKey Error Message.png" alt="GetReferenceKey Error Message.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 15:15:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9641240#M60731</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-07-17T15:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reference key of point</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9641409#M60732</link>
      <description>&lt;P&gt;Yah, thanks for your help. Let me try from my side with your solution.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 16:58:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/reference-key-of-point/m-p/9641409#M60732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-17T16:58:28Z</dc:date>
    </item>
  </channel>
</rss>

