<?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: Ilogic form minimum / maximum parameter wizard in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10109850#M52809</link>
    <description>&lt;P&gt;Hi Mark,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The rule actually can be simplified to the following. You can still keep the error message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;height = Min(height, 100)+Max(height,50)-height&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2021 00:07:35 GMT</pubDate>
    <dc:creator>johnsonshiue</dc:creator>
    <dc:date>2021-02-25T00:07:35Z</dc:date>
    <item>
      <title>Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10109774#M52808</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I'm creating an Ilogic form that contains certain parameters in the model and i would like to limit the values for these parameters.&lt;/P&gt;&lt;P&gt;I have used the minimum/maximum wizard in the rule logic.&lt;/P&gt;&lt;P&gt;My problem is if someone enters a value outside the range required then even though a message box warns them that parameter now takes on the new value (even though it is outside the range) or a set value of the minimum or maximum allowed. I got around this by creating a dummy parameter but it seemed a long way to do this for every parameter within the form.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a simpler way. My model parameter is height, my dummy user parameter is mheight.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;' ******* mheight Limits *******&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;mheight&lt;/SPAN&gt; &amp;gt;= 50 &lt;SPAN&gt;And&lt;/SPAN&gt; &lt;SPAN&gt;mheight&lt;/SPAN&gt; &amp;lt;= 100
  &lt;SPAN&gt;height&lt;/SPAN&gt; = &lt;SPAN&gt;mheight&lt;/SPAN&gt;
  &lt;SPAN&gt;ElseIf&lt;/SPAN&gt; &lt;SPAN&gt;mheight&lt;/SPAN&gt; &amp;lt; 50 &lt;SPAN&gt;Or&lt;/SPAN&gt; &lt;SPAN&gt;mheight&lt;/SPAN&gt; &amp;gt;100 &lt;SPAN&gt;Then&lt;/SPAN&gt;
    &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"The value is outside the allowed range of 50 to 100mm"&lt;/SPAN&gt;, &lt;SPAN&gt;"ERROR"&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;OK&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN&gt;Error&lt;/SPAN&gt;)
	&lt;SPAN&gt;mheight&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
	&lt;SPAN&gt;mheight&lt;/SPAN&gt; = &lt;SPAN&gt;height&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;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 23:16:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10109774#M52808</guid>
      <dc:creator>mark.ellisBM9JT</dc:creator>
      <dc:date>2021-02-24T23:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10109850#M52809</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The rule actually can be simplified to the following. You can still keep the error message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;height = Min(height, 100)+Max(height,50)-height&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 00:07:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10109850#M52809</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2021-02-25T00:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10109977#M52810</link>
      <description>&lt;P&gt;so what happens to the parameter if i enter 101 will height keep its current value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 01:27:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10109977#M52810</guid>
      <dc:creator>mark.ellisBM9JT</dc:creator>
      <dc:date>2021-02-25T01:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110003#M52811</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10418475"&gt;@mark.ellisBM9JT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should be able to set the range in the form if values are defined , and also in the parameters fx dialogue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for ensuring value entered is in the current range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The snippet you could be looking for is this.&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;MultiValue&lt;/STRONG&gt;.&lt;STRONG&gt;SetValueOptions(&lt;/STRONG&gt;True, DefaultIndex :&lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;0)&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;In a normal multi value parameter this would reset to the first value of the parameter. 0 means 1st, 1 means 2nd etc&lt;/P&gt;&lt;P&gt;This will control the default value if not in the range set.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This article shows its use with an error catching statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://microconcepts.typepad.com/design_automation/2015/01/updating-multi-value-parameter-list-options-and-ensuring-parameter-value-is-a-listed-value.html" target="_blank" rel="noopener"&gt;https://microconcepts.typepad.com/design_automation/2015/01/updating-multi-value-parameter-list-options-and-ensuring-parameter-value-is-a-listed-value.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fairly sure it will work in your situation, however I have &amp;nbsp;not tried it on a custom ranged parameter as of yet.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You could also just set the parameter value to be smaller than the range manually if the material min or max is exceeded.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A couple of screenshots of the form settings could help too if this not solve your question or even easier attach &amp;nbsp;a simplified form with parameter and &amp;nbsp;rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 01:50:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110003#M52811</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2021-02-25T01:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110146#M52812</link>
      <description>&lt;P&gt;Don't think this multivalue will work in my case&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 03:50:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110146#M52812</guid>
      <dc:creator>mark.ellisBM9JT</dc:creator>
      <dc:date>2021-02-25T03:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110152#M52813</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10418475"&gt;@mark.ellisBM9JT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems to be more awkward than I thought. The solution above would just over complicate this and doesn't seem to work .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option is to use a slider form to set the visual limits of the parameter, however a value can still be entered in exceeding these limits, no model update will occur but the value does not get reset to the original value which is less than ideal.&amp;nbsp;I am sure other user would have a better solution, consider moving it over to the customization forum to get more eyes on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setting up Range Slider in Form&lt;BR /&gt;&lt;A href="https://knowledge.autodesk.com/support/inventor/learn-explore/caas/screencast/Main/Details/0a14a8a5-608f-49a9-92de-e4aa9179c28b.html" target="_blank"&gt;https://knowledge.autodesk.com/support/inventor/learn-explore/caas/screencast/Main/Details/0a14a8a5-608f-49a9-92de-e4aa9179c28b.html&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'' ******* mheight Limits *******&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;mheight&lt;/SPAN&gt; &amp;gt;= 50 &lt;SPAN&gt;And&lt;/SPAN&gt; &lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;"mheight"&lt;/SPAN&gt;) &amp;lt;= 100 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;'Set value back to lowest if slider limits are exceeded&lt;/SPAN&gt;
	&lt;SPAN&gt;mheight&lt;/SPAN&gt; = 50
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 03:59:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110152#M52813</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2021-02-25T03:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110162#M52814</link>
      <description>&lt;P&gt;I have the solution in the code i first posted, a dummy parameter but it seems long winded but the replies i'm getting are no shorter.&lt;/P&gt;&lt;P&gt;I do not want to change the parameter to the minimum value if it gets entered out of range as this updates the model and this can be time consuming and unnecessary&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 04:09:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110162#M52814</guid>
      <dc:creator>mark.ellisBM9JT</dc:creator>
      <dc:date>2021-02-25T04:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110197#M52815</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the solution I provided should work too. If you enter any value greater than 100, height will be 100. For anything less than 50, height will be 50. The in-between values will be unchanged.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 04:54:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110197#M52815</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2021-02-25T04:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110201#M52816</link>
      <description>&lt;P&gt;I think you are misunderstanding what i mean. Lets say the parameter is 67mm and the maximum value is 100mm but a user enters 200 in the textbox then I want that dimension to stay as 67mm and not jump to 100mm thereby updating the model&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 04:58:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10110201#M52816</guid>
      <dc:creator>mark.ellisBM9JT</dc:creator>
      <dc:date>2021-02-25T04:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic form minimum / maximum parameter wizard</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10111224#M52817</link>
      <description>&lt;P&gt;You can shorten it this much for sure:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' ******* mheight Limits *******
If mheight &amp;gt;= 50 And mheight &amp;lt;= 100
  height = mheight
Else 
    Logger.Trace("Outside Range: " &amp;amp; mheight)
	mheight = height
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need the Else If, just an Else [unless there were more situations to consider than just 2]. Trace will not display message but does include a print out in the iLogic Log [when run in log level: trace] just so you know what was attempted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know why you were setting the parameter to False?&amp;nbsp; Doesn't need to be there.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 14:22:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-form-minimum-maximum-parameter-wizard/m-p/10111224#M52817</guid>
      <dc:creator>J-Camper</dc:creator>
      <dc:date>2021-02-25T14:22:37Z</dc:date>
    </item>
  </channel>
</rss>

