<?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 Sheet metal properties in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257772#M62974</link>
    <description>&lt;P&gt;I just made some iLogic to setup a formatted description of the material and thickness. Most of it works great but one thickness is not being detected. Attached is a test part that is having an issue with the 12ga thickness.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a select statement to set a gauage thickness in a description but 12ga (0.1046) does not work. If I change it to 0.1045 in the script and then set the thickness to that it works, but not at the correct value. When the part thickness is 0.1046 the select statement goes to the select else which formats the thickness as a decimal number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select Case Parameter("Thickness")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Case 0.1046&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ShtThk = "12GA"&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2016 15:58:01 GMT</pubDate>
    <dc:creator>pball</dc:creator>
    <dc:date>2016-04-07T15:58:01Z</dc:date>
    <item>
      <title>iLogic Sheet metal properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257772#M62974</link>
      <description>&lt;P&gt;I just made some iLogic to setup a formatted description of the material and thickness. Most of it works great but one thickness is not being detected. Attached is a test part that is having an issue with the 12ga thickness.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a select statement to set a gauage thickness in a description but 12ga (0.1046) does not work. If I change it to 0.1045 in the script and then set the thickness to that it works, but not at the correct value. When the part thickness is 0.1046 the select statement goes to the select else which formats the thickness as a decimal number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select Case Parameter("Thickness")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Case 0.1046&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ShtThk = "12GA"&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 15:58:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257772#M62974</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-04-07T15:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Sheet metal properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257831#M62976</link>
      <description>&lt;P&gt;PBALL,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen this come about a few other times where during comparisons some tiny decimal portion is attached to the end of a measurement (think .1046000000001)&lt;/P&gt;&lt;P&gt;As a result numerical equality comparisions fail. I've seen a few ways to handle this by adapting for a given tolerance threshold, such as&amp;nbsp;the &amp;nbsp;EqualWithinTolerance command.&lt;/P&gt;&lt;P&gt;In the case of a Select Case operation (no pun intended)&amp;nbsp;I would use a range to define each value, though we all know you shouldn't have to do this.&lt;/P&gt;&lt;P&gt;Here is a sample of what I would employ. It doesn't require a very large range, just enough to nullify the tiny discrepency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	Case 0.10459 To .10461&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Apr 2016 16:22:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257831#M62976</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2016-04-07T16:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Sheet metal properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257875#M62980</link>
      <description>Thanks, that fix works great. I've seen that extra tiny amount added to content center profiles or something before in the past but never thought about that for this issue. You also taught me more about the select operation, didn't know you could do ranges. I mostly do VBA scripts and that doesn't support select case sadly.</description>
      <pubDate>Thu, 07 Apr 2016 16:39:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257875#M62980</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-04-07T16:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Sheet metal properties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257893#M62982</link>
      <description>&lt;P&gt;Definitely worth knowing the advanced Select Case Functionality. There are few more things you might find useful as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Accept two Cases in One
Case 0.1046, 0.1196

'Greater than (and Less Than)
Case &amp;gt;0.1196&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check out the &lt;A href="https://msdn.microsoft.com/en-us/library/cy37t14y.aspx" target="_self"&gt;Microsoft MSDN &lt;/A&gt;on it for more detail.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 16:45:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-sheet-metal-properties/m-p/6257893#M62982</guid>
      <dc:creator>NSBowser</dc:creator>
      <dc:date>2016-04-07T16:45:49Z</dc:date>
    </item>
  </channel>
</rss>

