<?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 Switching model parameters between user parameters in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/switching-model-parameters-between-user-parameters/m-p/10069407#M53315</link>
    <description>&lt;P&gt;I am trying to set up an iLogic model where a model parameter has the need to switch between two user parameters. Instead of just having the value show up in the expression (this I have figured out) I would like the model parameter to keep the name of the user parameter in the expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Parameter1 = "Text1" Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; d10 = "Test1"&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;d10 = "Test2"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running Inventor 2019.4.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 13:04:47 GMT</pubDate>
    <dc:creator>jeremiah_boe</dc:creator>
    <dc:date>2021-02-09T13:04:47Z</dc:date>
    <item>
      <title>Switching model parameters between user parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/switching-model-parameters-between-user-parameters/m-p/10069407#M53315</link>
      <description>&lt;P&gt;I am trying to set up an iLogic model where a model parameter has the need to switch between two user parameters. Instead of just having the value show up in the expression (this I have figured out) I would like the model parameter to keep the name of the user parameter in the expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Parameter1 = "Text1" Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; d10 = "Test1"&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;d10 = "Test2"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running Inventor 2019.4.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 13:04:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/switching-model-parameters-between-user-parameters/m-p/10069407#M53315</guid>
      <dc:creator>jeremiah_boe</dc:creator>
      <dc:date>2021-02-09T13:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Switching model parameters between user parameters</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/switching-model-parameters-between-user-parameters/m-p/10069564#M53316</link>
      <description>&lt;P&gt;It looks like your user parameter (Parameter1) may be a text type user parameter, instead of a numerical type; and it looks like you may be trying to assign the value of that user parameter to the model parameter.&amp;nbsp; That won't work, because model parameters can't hold text type values or boolean type values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you want to set the equation of a parameter using iLogic, and you want to include the name(s) of other parameter(s) within that equation, you must assign this equation to the parameter's 'expression', not to its value.&amp;nbsp; The 'Value' of a numerical parameter is a numerical data type, while the 'Expression' of any parameter is always a String data type.&amp;nbsp; The parameter's expression is then evaluated, to produce its Value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here's how you can put the name of another parameter within the expression of a parameter:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Parameter.Param("d10").Expression = "Test1"&lt;/LI-CODE&gt;&lt;P&gt;(Where "d10" is the name of a numerical model parameter, and "Test1" is the name of a numerical model or user parameter.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you have time, please... Vote For &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank"&gt;My IDEAS &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt;&lt;/SPAN&gt;&lt;/A&gt;or you can Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/" target="_blank"&gt;Inventor 2021 Help &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-forum/bd-p/78/" target="_blank"&gt;Inventor Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-customization/bd-p/120/" target="_blank"&gt;Inventor Customization Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/" target="_blank"&gt;Inventor Ideas Forum &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 14:11:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/switching-model-parameters-between-user-parameters/m-p/10069564#M53316</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-02-09T14:11:23Z</dc:date>
    </item>
  </channel>
</rss>

