<?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: Divide a segment equally with a range in visual basic in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3754155#M132710</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are loads of ways to do this. Here is one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Demo()
Dim Length As Double
Dim Range As Double

    Length = 144
    Range = 8

    MsgBox (Answer(Length, Range))
End Sub

Function Answer(L As Double, R As Double)
    Answer = L / R
End Function&lt;/PRE&gt;&lt;P&gt;This should be a start for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jon.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2013 07:48:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-01-16T07:48:22Z</dc:date>
    <item>
      <title>Divide a segment equally with a range in visual basic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3753857#M132709</link>
      <description>&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;How do you divide a segment equally with a range in visual basic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example-&lt;/P&gt;&lt;P&gt;length is 144 in&lt;/P&gt;&lt;P&gt;range- 7.5 - 9in&lt;/P&gt;&lt;P&gt;answer- (18) at (range 8 in)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like to know how to do this in Visual Basic so I can create some rules and forms in iLogic&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Jan 2013 01:44:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3753857#M132709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-16T01:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Divide a segment equally with a range in visual basic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3754155#M132710</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are loads of ways to do this. Here is one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Demo()
Dim Length As Double
Dim Range As Double

    Length = 144
    Range = 8

    MsgBox (Answer(Length, Range))
End Sub

Function Answer(L As Double, R As Double)
    Answer = L / R
End Function&lt;/PRE&gt;&lt;P&gt;This should be a start for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jon.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2013 07:48:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3754155#M132710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-16T07:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Divide a segment equally with a range in visual basic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3754283#M132711</link>
      <description>&lt;P&gt;Thanks Jon&lt;/P&gt;&lt;P&gt;- can this be done within the parameters instead of iLogic?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2013 12:34:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3754283#M132711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-16T12:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Divide a segment equally with a range in visual basic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3754459#M132712</link>
      <description>&lt;P&gt;Yes, it's not difficult, but can be tricky and frustrating! Parameters can be pretty fickle when it comes to units.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;d0 = Length (in)&lt;/P&gt;&lt;P&gt;d1 = Range (in)&lt;/P&gt;&lt;P&gt;d2 = Answer/Segments (ul)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the inch units cancel each other to give a unitless value (in/in = ul).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;Jon.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2013 14:55:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/divide-a-segment-equally-with-a-range-in-visual-basic/m-p/3754459#M132712</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-16T14:55:16Z</dc:date>
    </item>
  </channel>
</rss>

