<?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 Betreff: VBA (IV2018): get all corners of a Part via macro in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-iv2018-get-all-corners-of-a-part-via-macro/m-p/9328081#M106041</link>
    <description>&lt;P&gt;I found "Vertices".. didnt know about that property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works for me:&lt;/P&gt;&lt;PRE&gt;Private Sub read_all_corner_ipt()
    Dim oPartDoc As PartDocument
    Set oPartDoc = ThisApplication.ActiveDocument
    Dim oCompDef As ComponentDefinition
    Set oCompDef = oPartDoc.ComponentDefinition
    Dim oVert As Vertices
    Set oVert = oCompDef.SurfaceBodies.Item(1).Vertices
    sTxt = "x" &amp;amp; vbTab &amp;amp; vbTab &amp;amp; "y" &amp;amp; vbTab &amp;amp; vbTab &amp;amp; "z"
    For Each Item In oVert
        sTxt = sTxt &amp;amp; vbCr &amp;amp; Round(Item.Point.x, 2) &amp;amp; vbTab &amp;amp; vbTab &amp;amp; Round(Item.Point.y, 2) &amp;amp; vbTab &amp;amp; vbTab &amp;amp; Round(Item.Point.z, 2)
    Next
    MsgBox sTxt
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: Now it works for me&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-02-19 15_36_47-Window.png" style="width: 272px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/731585i7B016B1341FA9A66/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-02-19 15_36_47-Window.png" alt="2020-02-19 15_36_47-Window.png" /&gt;&lt;/span&gt;&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>Wed, 19 Feb 2020 14:38:03 GMT</pubDate>
    <dc:creator>fullevent</dc:creator>
    <dc:date>2020-02-19T14:38:03Z</dc:date>
    <item>
      <title>VBA (IV2018): get all corners of a Part via macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-iv2018-get-all-corners-of-a-part-via-macro/m-p/9327852#M106035</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the easiest way to read the coordinates from each corner of an ipt?&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-02-19 14_17_52-Window.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/731528i0F7BEC626BA6541A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-02-19 14_17_52-Window.png" alt="2020-02-19 14_17_52-Window.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this even possible or do I have to calculate the coordinates via the sketch elements and extrusions?&lt;/P&gt;&lt;P&gt;Aattached an ipt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have many such IPTs and they all build up identically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aleks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 13:27:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-iv2018-get-all-corners-of-a-part-via-macro/m-p/9327852#M106035</guid>
      <dc:creator>fullevent</dc:creator>
      <dc:date>2020-02-19T13:27:26Z</dc:date>
    </item>
    <item>
      <title>Betreff: VBA (IV2018): get all corners of a Part via macro</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-iv2018-get-all-corners-of-a-part-via-macro/m-p/9328081#M106041</link>
      <description>&lt;P&gt;I found "Vertices".. didnt know about that property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works for me:&lt;/P&gt;&lt;PRE&gt;Private Sub read_all_corner_ipt()
    Dim oPartDoc As PartDocument
    Set oPartDoc = ThisApplication.ActiveDocument
    Dim oCompDef As ComponentDefinition
    Set oCompDef = oPartDoc.ComponentDefinition
    Dim oVert As Vertices
    Set oVert = oCompDef.SurfaceBodies.Item(1).Vertices
    sTxt = "x" &amp;amp; vbTab &amp;amp; vbTab &amp;amp; "y" &amp;amp; vbTab &amp;amp; vbTab &amp;amp; "z"
    For Each Item In oVert
        sTxt = sTxt &amp;amp; vbCr &amp;amp; Round(Item.Point.x, 2) &amp;amp; vbTab &amp;amp; vbTab &amp;amp; Round(Item.Point.y, 2) &amp;amp; vbTab &amp;amp; vbTab &amp;amp; Round(Item.Point.z, 2)
    Next
    MsgBox sTxt
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: Now it works for me&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-02-19 15_36_47-Window.png" style="width: 272px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/731585i7B016B1341FA9A66/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-02-19 15_36_47-Window.png" alt="2020-02-19 15_36_47-Window.png" /&gt;&lt;/span&gt;&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>Wed, 19 Feb 2020 14:38:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-iv2018-get-all-corners-of-a-part-via-macro/m-p/9328081#M106041</guid>
      <dc:creator>fullevent</dc:creator>
      <dc:date>2020-02-19T14:38:03Z</dc:date>
    </item>
  </channel>
</rss>

