<?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: How to use ilogic to measure length of edge ? in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542313#M99796</link>
    <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This link might useful to you,&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/ilogic-to-get-lenght-of-line/td-p/6600489" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/ilogic-to-get-lenght-of-line/td-p/6600489&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You post this question to&amp;nbsp;&lt;SPAN&gt;Inventor&lt;STRONG&gt; iLogic, API &amp;amp; VBA Forum &lt;/STRONG&gt;where you could found the solution easily.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/bd-p/120" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/bd-p/120&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Aug 2021 06:18:04 GMT</pubDate>
    <dc:creator>bhavik4244</dc:creator>
    <dc:date>2021-08-13T06:18:04Z</dc:date>
    <item>
      <title>How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542177#M99789</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/952305i08EE3F6C8428579B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; I tried to find out but failed. Can help me with. When I do an edge like the picture below, it's ok, what if I convert it to ilogic code?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 04:42:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542177#M99789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-13T04:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542210#M99790</link>
      <description>&lt;P&gt;What are you doing with that length? There may be an easier solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to do it with iLogic, but you will need to know the name of the edge. If you are doing this for multiple files you're probably best off naming the edge each time to make your code easier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 05:08:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542210#M99790</guid>
      <dc:creator>SharkDesign</dc:creator>
      <dc:date>2021-08-13T05:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542278#M99791</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 16px;"&gt;Thank you for your feedback&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Body has 3 edges, I need to measure those three sides.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 05:58:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542278#M99791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-13T05:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542286#M99792</link>
      <description>&lt;P&gt;You want to measure the diameter of each end and the length of the sweep line?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are you doing with these values afterwards?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 06:01:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542286#M99792</guid>
      <dc:creator>SharkDesign</dc:creator>
      <dc:date>2021-08-13T06:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542295#M99793</link>
      <description>&lt;P&gt;The problem is: I have a curved object, to know the length of this object, I proceed to use ilogic to measure the sides and get the appropriate length. when i perform edge measurement with measure tool in ilogic, i get this problem. can you help me? use ilogic&lt;/P&gt;&lt;P&gt;This object is a block imported from the *sat file, it will not have the feature...&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 06:06:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542295#M99793</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-13T06:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542298#M99794</link>
      <description>&lt;P&gt;OK, sorry I cannot help you, but there are other people who might be able to.&lt;/P&gt;&lt;P&gt;Not having any feature information or parameters is definitely going to make this more difficult.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a lot of these files to measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 06:07:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542298#M99794</guid>
      <dc:creator>SharkDesign</dc:creator>
      <dc:date>2021-08-13T06:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542305#M99795</link>
      <description>&lt;P&gt;Since it has a lot i need to use ilogic to have it calculate automatically for me. Because if I do it manually, it will be wrong and take a long time. Thank you so much&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 06:12:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542305#M99795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-13T06:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542313#M99796</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This link might useful to you,&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/ilogic-to-get-lenght-of-line/td-p/6600489" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/ilogic-to-get-lenght-of-line/td-p/6600489&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You post this question to&amp;nbsp;&lt;SPAN&gt;Inventor&lt;STRONG&gt; iLogic, API &amp;amp; VBA Forum &lt;/STRONG&gt;where you could found the solution easily.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/bd-p/120" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/bd-p/120&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 06:18:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542313#M99796</guid>
      <dc:creator>bhavik4244</dc:creator>
      <dc:date>2021-08-13T06:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ilogic to measure length of edge ?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542523#M99797</link>
      <description>&lt;P&gt;If you are after the length of a sweep you could probably use this (From Inventor VBA, API help):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="ui-tabs ui-widget ui-widget-content ui-corner-all"&gt;&lt;DIV class="api-code ui-tabs-panel ui-widget-content ui-corner-bottom"&gt;&lt;PRE&gt;Sub TrueSweepLength()
    &lt;SPAN&gt;'Set a reference to the active part document&lt;/SPAN&gt;
    Dim oDoc As PartDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oDef As PartComponentDefinition
    Set oDef = oDoc.ComponentDefinition
    
    &lt;SPAN&gt;' Check to make sure a &lt;FONT color="#ffffff"&gt;sweep&lt;/FONT&gt; feature is selected.&lt;/SPAN&gt;
    If Not TypeOf oDoc.SelectSet.Item(1) Is SweepFeature Then
        MsgBox "A &lt;FONT color="#ffffff"&gt;sweep&lt;/FONT&gt; feature must be selected."
        Exit Sub
    End If

    &lt;SPAN&gt;' Set a reference to the selected feature.&lt;/SPAN&gt;
    Dim oSweep As SweepFeature
    Set oSweep = oDoc.SelectSet.Item(1)
    
    &lt;SPAN&gt;' Get the centroid of the &lt;FONT color="#ffffff"&gt;sweep&lt;/FONT&gt; profile in sketch space&lt;/SPAN&gt;
    Dim oProfileOrigin As Point2d
    Set oProfileOrigin = oSweep.Profile.RegionProperties.Centroid
    
    &lt;SPAN&gt;' Transform the centroid from sketch space to model space&lt;/SPAN&gt;
    Dim oProfileOrigin3D As Point
    Set oProfileOrigin3D = oSweep.Profile.Parent.SketchToModelSpace(oProfileOrigin)
    
    &lt;SPAN&gt;' Get the set of curves that represent the true path of the &lt;FONT color="#ffffff"&gt;sweep&lt;/FONT&gt;&lt;/SPAN&gt;
    Dim oCurves As ObjectsEnumerator
    Set oCurves = oDef.Features.SweepFeatures.GetTruePath(oSweep.Path, oProfileOrigin3D)
    
    Dim TotalLength As Double
    TotalLength = 0
    
    Dim oCurve As Object
    For Each oCurve In oCurves
        
        Dim oCurveEval As CurveEvaluator
        Set oCurveEval = oCurve.Evaluator
        
        Dim MinParam As Double
        Dim MaxParam As Double
        Dim Length As Double
        
        Call oCurveEval.GetParamExtents(MinParam, MaxParam)
        Call oCurveEval.GetLengthAtParam(MinParam, MaxParam, Length)
        
        TotalLength = TotalLength + Length
    Next
    
    &lt;SPAN&gt;' Display total &lt;FONT color="#ffffff"&gt;sweep&lt;/FONT&gt; length&lt;/SPAN&gt;
    MsgBox "Total &lt;FONT color="#ffffff"&gt;sweep&lt;/FONT&gt; length = " &amp;amp; ThisApplication.UnitsOfMeasure.GetStringFromValue(TotalLength, kInchLengthUnits)
End Sub&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Torbjørn&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 08:00:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/how-to-use-ilogic-to-measure-length-of-edge/m-p/10542523#M99797</guid>
      <dc:creator>torbjorn_heglum1</dc:creator>
      <dc:date>2021-08-13T08:00:24Z</dc:date>
    </item>
  </channel>
</rss>

