<?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 Ilogic calculate length of 3D sketch in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/10682399#M44752</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want Ilogic to calculate the length of a multiline in a 3D sketch. Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Oct 2021 08:29:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-10-12T08:29:33Z</dc:date>
    <item>
      <title>Ilogic calculate length of 3D sketch</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/10682399#M44752</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want Ilogic to calculate the length of a multiline in a 3D sketch. Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 08:29:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/10682399#M44752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-12T08:29:33Z</dc:date>
    </item>
    <item>
      <title>Betreff: Ilogic calculate length of 3D sketch</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/10682506#M44753</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming:&lt;/P&gt;&lt;P&gt;- a part document is open&lt;/P&gt;&lt;P&gt;- the first 3D sketch contains the loop&lt;/P&gt;&lt;P&gt;- there's only this one loop in the sketch&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can do it with this little iLogic:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oApp As Inventor.Application = ThisApplication
Dim oDoc As PartDocument = oApp.ActiveDocument
Dim oSketch As Sketch3D = oDoc.ComponentDefinition.Sketches3D.Item(1)
Dim oProfile3d As Profile3D = oSketch.Profiles3D.AddOpen
Dim dLoopLength As Double = oApp.MeasureTools.GetLoopLength(oProfile3d.Item(1))

oProfile3d.Delete
MsgBox ("Length of 3D loop: " &amp;amp; Round(dLoopLength, 2) &amp;amp; " cm")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 09:19:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/10682506#M44753</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2021-10-12T09:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic calculate length of 3D sketch</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/10682565#M44754</link>
      <description>&lt;P&gt;Please find below the steps I used to retrieve a set of connected lines / arcs / etc. from a sketch (to be used as a sweep path later).&amp;nbsp;&lt;BR /&gt;1. find the start point in the sketch (by selecting it or assuming it's the first of all sketch points);&lt;BR /&gt;2. get the lines / arcs / etc. connected to it;&lt;/P&gt;&lt;P&gt;3. pick the one you didn't already process (otherwise it could go back and forth between two connected lines);&lt;/P&gt;&lt;P&gt;4. store the line / arc with the other already processed ones (collection);&lt;BR /&gt;5. get it's length and add it to the total length found so far;&lt;/P&gt;&lt;P&gt;6. get the other end point of the line / arc / etc.&lt;/P&gt;&lt;P&gt;7. use that point as the first point and continue from step 1 for each connected line / arc / etc.&lt;BR /&gt;&lt;BR /&gt;The above is more a brute-force than an elegant / simple solution, but it's the only approach I could think of.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 09:47:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/10682565#M44754</guid>
      <dc:creator>_dscholtes_</dc:creator>
      <dc:date>2021-10-12T09:47:43Z</dc:date>
    </item>
    <item>
      <title>Betreff: Ilogic calculate length of 3D sketch</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/11718401#M44755</link>
      <description>&lt;P&gt;thanks!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made a small change it was giving me an error on line 2 when saving trough an assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim oApp As Inventor.Application = ThisApplication&lt;BR /&gt;Dim oDoc As PartDocument = ThisDoc.Document&lt;BR /&gt;Dim oSketch As Sketch3D = oDoc.ComponentDefinition.Sketches3D.Item(1)&lt;BR /&gt;Dim oProfile3d As Profile3D = oSketch.Profiles3D.AddOpen&lt;BR /&gt;Dim Comprimento As Double = oApp.MeasureTools.GetLoopLength(oProfile3d.Item(1)) * 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oProfile3d.Delete&lt;BR /&gt;MsgBox ("Length of 3D loop: " &amp;amp; Round(dLoopLength, 2) &amp;amp; " mm")&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 12:24:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-calculate-length-of-3d-sketch/m-p/11718401#M44755</guid>
      <dc:creator>Manuelcamposcosta</dc:creator>
      <dc:date>2023-01-31T12:24:22Z</dc:date>
    </item>
  </channel>
</rss>

