<?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: IF THEN ELSE statement in Parameters? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305259#M83748</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is it possible to put an IF THEN ELSE statement into the Parameters equation field? If so, could someone point me in the direction of how to parse it correctly because I can't seem to get it to work.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you provide an example of what you are trying to do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do "IF" statements for feature suppression based on parameters without using ilogic through the feature properties..&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IF.PNG" style="width: 384px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/552584iE2432F27898805A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IF.PNG" alt="IF.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Oct 2018 18:02:15 GMT</pubDate>
    <dc:creator>mcgyvr</dc:creator>
    <dc:date>2018-10-01T18:02:15Z</dc:date>
    <item>
      <title>IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8304627#M83745</link>
      <description>&lt;P&gt;Is it possible to put an IF THEN ELSE statement into the Parameters equation field? If so, could someone point me in the direction of how to parse it correctly because I can't seem to get it to work.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 14:39:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8304627#M83745</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-01T14:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8304656#M83746</link>
      <description>&lt;P&gt;iLogic is your solution if you want to use Visual Basic code to regulate or automate Parameters.&amp;nbsp; Head over to the Inventor Customization forum for more help with this kind of task.&amp;nbsp; Other than that, let us know your workflow so we can help find the best solution for you, just make sure nothing you post or attach has anything confidential.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 14:48:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8304656#M83746</guid>
      <dc:creator>philip1009</dc:creator>
      <dc:date>2018-10-01T14:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8304708#M83747</link>
      <description>&lt;P&gt;Can't be done directly, but with some clever tricks with supported functions you can put this logic into parameters.&amp;nbsp; &amp;nbsp;Have a look at &lt;A title="If-Then Operations for Parameters" href="https://forums.autodesk.com/t5/inventor-forum/if-then-operations-for-parameters/m-p/5304363#M523084" target="_blank"&gt;this posting&lt;/A&gt; from&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/529290"&gt;@ACEDeSmedt&lt;/a&gt;&amp;nbsp;for some ideas.&amp;nbsp; There may be other posts along these lines, but my quick searching didn't spot them.&lt;/P&gt;
&lt;HR /&gt;
&lt;P style="font-size: 11px;"&gt;&lt;STRONG&gt;Sam B&lt;/STRONG&gt;&lt;BR /&gt;Inventor Pro 2019.1.2 | Windows 7 SP1&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/samuel-bixler-281a0615b" target="_blank"&gt;LinkedIn&lt;BR /&gt;&lt;IMG src="https://0lojpg.bn1301.livefilestore.com/y4mBpjMsxHsiyE90fl7LZ99L9EQYMinMmTq-HRFH9JbCEzkKriwtHkW3fcvHd1Tn83fNmCEOxlu43NSCaM5t5LTUVxzkr2SykXazzjlH6fe8HEZ9J9xESPFwabQTX5LJ7gKPlhZsl0LCsXsW74obCNtIOOvc57pHxbFMWOTgbDVMzABJgwHnVMfJOWjsmiR3b-SgAE5duRw6SWoxUsKOxXgCw?width=220&amp;amp;height=20&amp;amp;cropmode=none" border="0" width="161" height="14" /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 15:00:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8304708#M83747</guid>
      <dc:creator>SBix26</dc:creator>
      <dc:date>2018-10-01T15:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305259#M83748</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is it possible to put an IF THEN ELSE statement into the Parameters equation field? If so, could someone point me in the direction of how to parse it correctly because I can't seem to get it to work.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you provide an example of what you are trying to do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do "IF" statements for feature suppression based on parameters without using ilogic through the feature properties..&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IF.PNG" style="width: 384px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/552584iE2432F27898805A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IF.PNG" alt="IF.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 18:02:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305259#M83748</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2018-10-01T18:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305389#M83749</link>
      <description>&lt;P&gt;In the "Parameters" dialogue, under the User Parameter "HOLE_COUNT", I want to basically do this:&lt;/P&gt;&lt;P&gt;if Y_DIM&amp;lt;10 then (floor(d0 / d18) + 1 ul) else floor(d0 / d18)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry that it's taken me so long to respond today; it's certainly been a Monday here.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 18:51:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305389#M83749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-01T18:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305420#M83750</link>
      <description>&lt;P&gt;On your Ribbon, go to Manage &amp;gt; iLogic &amp;gt; iLogic Browser, right click in the empty space of the browser and click Add Rule.&amp;nbsp; Name this Rule whatever you want and click OK.&amp;nbsp; Here's the code that would fit the scenario you provided:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Y_DIM&lt;/SPAN&gt; &amp;lt; 10 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;HOLE_COUNT&lt;/SPAN&gt; = &lt;SPAN&gt;Floor&lt;/SPAN&gt;(&lt;SPAN&gt;d0&lt;/SPAN&gt; / &lt;SPAN&gt;d18&lt;/SPAN&gt;) + 1
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	HOLE_COUNT = &lt;SPAN&gt;Floor&lt;/SPAN&gt;(&lt;SPAN&gt;d0&lt;/SPAN&gt; / &lt;SPAN&gt;d18&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Save and close the rule.&amp;nbsp; Then back in your Manage &amp;gt; iLogic tab in your Ribbon, click on Event Triggers, in this window you can set a rule to automatically run when one of the triggers happens.&amp;nbsp; In this case, set the rule to run on Any Model Parameter Change.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 19:04:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305420#M83750</guid>
      <dc:creator>philip1009</dc:creator>
      <dc:date>2018-10-01T19:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305548#M83751</link>
      <description>&lt;P&gt;Thank you, Philip. I will give this a go when I get back into the office in the morning. Greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 19:48:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8305548#M83751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-01T19:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN ELSE statement in Parameters?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8391788#M83752</link>
      <description>&lt;P&gt;For the following statement:&lt;/P&gt;&lt;PRE&gt;parameter = Y_DIM&amp;lt;10 then (floor(d0 / d18) + 1 ul) else floor(d0 / d18)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;add this expression to the parameter:&lt;/P&gt;&lt;PRE&gt;parameter = floor(d0 / d18) + sign( 10 mm - Y_DIM )&lt;/PRE&gt;&lt;P&gt;You will need to specify the unit of '10' to match the unit of Y_DIM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sign() will output a &lt;EM&gt;1 ul&lt;/EM&gt; for every positive number and a &lt;EM&gt;0 ul&lt;/EM&gt; for not positive numbers (including 0)&lt;/P&gt;</description>
      <pubDate>Fri, 09 Nov 2018 14:59:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-then-else-statement-in-parameters/m-p/8391788#M83752</guid>
      <dc:creator>ACEDeSmedt</dc:creator>
      <dc:date>2018-11-09T14:59:00Z</dc:date>
    </item>
  </channel>
</rss>

