<?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: Making input red in our panels so the user knows the values they put are bad in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9455051#M12189</link>
    <description>&lt;P&gt;Yes, I had forgotten about that property for string value inputs and it actually should be fairly easy to use those for what you need.&amp;nbsp; All of the complicated work that would get very messy can be handled by the UnitManager object.&amp;nbsp; When the value changes in the text box you can take the current string and use the UnitManager.&lt;A href="http://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/UnitsManager_isValidExpression.htm" target="_blank"&gt;isValidExpression&lt;/A&gt;&amp;nbsp;to determine if the input is a valid value for the unit type you're using.&amp;nbsp; If it is then, you can use the UnitManager.&lt;A href="http://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/UnitsManager_evaluateExpression.htm" target="_blank"&gt;evaluateExpression&lt;/A&gt;&amp;nbsp;to convert the string to a floating point number in internal units (centimeters if you're working with lengths).&amp;nbsp; You can then use this value to do any additional custom numerical checks you need to do to validate the number.&amp;nbsp; If it's OK, you don't do anything.&amp;nbsp; If it's not, you can set the isValueError to True.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2020 05:55:25 GMT</pubDate>
    <dc:creator>BrianEkins</dc:creator>
    <dc:date>2020-04-20T05:55:25Z</dc:date>
    <item>
      <title>Making input red in our panels so the user knows the values they put are bad</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9439433#M12186</link>
      <description>&lt;P&gt;My Add-in collects user-data - I want to make the numbers they type in go red when they make no sense (e.g. out of range, like negative Reynolds numbers), like how the existing UI does it when we are dimensioning sketches etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally - I need my code to decide which numbers make no sense, based on the numbers themselves, as well as the other numbers they entered (e.g. a wing chord is OK only for certain reynolds numbers)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming not - how would you recommend that I collect a complex set of interdependent values from my users, in a way that holds their hand in real-time?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically - they're inserting an airfoil, and they need to supply some of the following, so I can compute the rest and return the best appropriate one for them:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The medium:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Air (and altitude and temperature)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Water (and fresh/sea, and depth, and temperature)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Other (so they need to supply&amp;nbsp;fluid density + dynamic viscosity, or kinematic viscosity)&lt;/P&gt;&lt;P&gt;Their needs:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chord&lt;/P&gt;&lt;P&gt;&amp;nbsp; Velocity&lt;/P&gt;&lt;P&gt;&amp;nbsp; Target optimization (best l/d or least drag etc)&lt;/P&gt;&lt;P&gt;So I can compute (or they can skip the above and enter directly):-&lt;/P&gt;&lt;P&gt;&amp;nbsp; Re (Reynolds Number)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want them to be able to use or select whatever units they want (Fahrenheit, knots, mph, m/s etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally - I want to compute "in real time" (as they type) whatever they left out - e.g. if they supplied the Re, Chord. and Velocity, I want to insert the medium data for them.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 14:55:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9439433#M12186</guid>
      <dc:creator>OceanHydroAU</dc:creator>
      <dc:date>2020-04-13T14:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Making input red in our panels so the user knows the values they put are bad</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9439753#M12187</link>
      <description>&lt;P&gt;Unfortunately, that's not currently supported but it would be a good feature to add.&amp;nbsp; Fusion will change the color of ValueCommandInput objects to red if the value entered is invalid, but it does the evaluation on its own and you can't do any custom evaluation.&amp;nbsp; For example, if I create a ValueCommandInput that has a length unit type and enter "30 deg" it will change to red because it can't be evaluated as a length.&amp;nbsp; Or if I typed in "A Junk String" it would also change to red because it can't be evaluated as a length.&amp;nbsp; However, if I type in "100" and I want to limit the length to 50, I can't do that and it will display in black because "100" can be evaluated as a length.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 17:29:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9439753#M12187</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-04-13T17:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Making input red in our panels so the user knows the values they put are bad</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9454017#M12188</link>
      <description>&lt;P&gt;I think I stumbled on a possible answer myself, at least for string values anyhow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This makes it red:&lt;/P&gt;&lt;DIV class="ui-custom-tabs"&gt;&lt;DIV class="api-code"&gt;&lt;DIV class="ui-table-wrap"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;stringValueCommandInput_var.&lt;STRONG&gt;isValueError&lt;/STRONG&gt; = True&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe that property can be set on other things even though it's not mentioned in the doc for them?&amp;nbsp; Even if not, I could always use text for the input of my numbers, and do the checks myself (messy, and would require me to understand expressions too... but might work).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: rats: lets me set that property for&amp;nbsp;addValueInput - but it does not go red in the UI &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 19 Apr 2020 12:43:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9454017#M12188</guid>
      <dc:creator>OceanHydroAU</dc:creator>
      <dc:date>2020-04-19T12:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Making input red in our panels so the user knows the values they put are bad</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9455051#M12189</link>
      <description>&lt;P&gt;Yes, I had forgotten about that property for string value inputs and it actually should be fairly easy to use those for what you need.&amp;nbsp; All of the complicated work that would get very messy can be handled by the UnitManager object.&amp;nbsp; When the value changes in the text box you can take the current string and use the UnitManager.&lt;A href="http://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/UnitsManager_isValidExpression.htm" target="_blank"&gt;isValidExpression&lt;/A&gt;&amp;nbsp;to determine if the input is a valid value for the unit type you're using.&amp;nbsp; If it is then, you can use the UnitManager.&lt;A href="http://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/UnitsManager_evaluateExpression.htm" target="_blank"&gt;evaluateExpression&lt;/A&gt;&amp;nbsp;to convert the string to a floating point number in internal units (centimeters if you're working with lengths).&amp;nbsp; You can then use this value to do any additional custom numerical checks you need to do to validate the number.&amp;nbsp; If it's OK, you don't do anything.&amp;nbsp; If it's not, you can set the isValueError to True.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 05:55:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9455051#M12189</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-04-20T05:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Making input red in our panels so the user knows the values they put are bad</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9456344#M12190</link>
      <description>&lt;P&gt;Brilliant tip!&amp;nbsp; I'm still learning the UI, and had no idea you'd exposed all the "expression hard work" for us to so easily use &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 14:13:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/9456344#M12190</guid>
      <dc:creator>OceanHydroAU</dc:creator>
      <dc:date>2020-04-20T14:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Making input red in our panels so the user knows the values they put are bad</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/11660303#M12191</link>
      <description>&lt;P&gt;It would be nice if &lt;STRONG&gt;ALL&lt;/STRONG&gt; user Inputs would support a&amp;nbsp;.&lt;STRONG&gt;isValueError&lt;/STRONG&gt; property and something like a &lt;STRONG&gt;.valueErrorMessage&lt;/STRONG&gt; property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having the same challenge of being able to indicate &lt;U&gt;which&lt;/U&gt; input(s) have an error and &lt;U&gt;what&lt;/U&gt; the error is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;STRONG&gt;ValidateInputsEvent&lt;/STRONG&gt; allows the &lt;STRONG&gt;OK&lt;/STRONG&gt; button to be disabled to prevent in valid input(s) to be accepted. But, there is no good way to provide the user any feedback as to &lt;U&gt;which&lt;/U&gt; inputs(s) are invalid and &lt;U&gt;why&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 21:27:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/making-input-red-in-our-panels-so-the-user-knows-the-values-they/m-p/11660303#M12191</guid>
      <dc:creator>markSJVQS</dc:creator>
      <dc:date>2023-01-05T21:27:46Z</dc:date>
    </item>
  </channel>
</rss>

