<?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: Problem renaming model parameters in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9725943#M10842</link>
    <description>&lt;P&gt;Looks like the screen shot of the error was removed.&lt;/P&gt;&lt;P&gt;It said:&lt;/P&gt;&lt;P&gt;Attribute Error: 'None Type' object has no attribute 'value'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 18:33:55 GMT</pubDate>
    <dc:creator>brad.bylls</dc:creator>
    <dc:date>2020-09-02T18:33:55Z</dc:date>
    <item>
      <title>Problem renaming model parameters</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9725938#M10841</link>
      <description>&lt;P&gt;I am trying to rename and reset values of model parameters.&lt;/P&gt;&lt;P&gt;Everything I find in the forums and help files say this should work, but no luck.&lt;/P&gt;&lt;P&gt;Here is the code I am using:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; product =&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;app.activeProduct&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;param&amp;nbsp;=&amp;nbsp;product.rootComponent.modelParameters.itemByName(&lt;/SPAN&gt;&lt;SPAN&gt;'d1'&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp; &amp;lt;&amp;lt; This line seems ok, no error&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;param.value&amp;nbsp;=&amp;nbsp;BodyLength&amp;nbsp; &amp;lt;&amp;lt;&amp;nbsp; This line throws the error below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;param.name&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Screw_Length'&amp;nbsp; &amp;lt;&amp;lt; I reversed these two and this one also throws the error&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:30:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9725938#M10841</guid>
      <dc:creator>brad.bylls</dc:creator>
      <dc:date>2020-09-02T18:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem renaming model parameters</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9725943#M10842</link>
      <description>&lt;P&gt;Looks like the screen shot of the error was removed.&lt;/P&gt;&lt;P&gt;It said:&lt;/P&gt;&lt;P&gt;Attribute Error: 'None Type' object has no attribute 'value'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:33:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9725943#M10842</guid>
      <dc:creator>brad.bylls</dc:creator>
      <dc:date>2020-09-02T18:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem renaming model parameters</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9726195#M10843</link>
      <description>&lt;P&gt;Brad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;itemByName will return None if there is no item with that name in the collection. It will not raise an exception in this case (because it isn't really an error, the search was successful just with no result found). So you should check the returned parameter is not None to determine if the search found any match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kris&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 20:34:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9726195#M10843</guid>
      <dc:creator>KrisKaplan</dc:creator>
      <dc:date>2020-09-02T20:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem renaming model parameters</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9728280#M10844</link>
      <description>Thanks Kris.&lt;BR /&gt;I'll try to figure out where in the code it needs to go.&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Sep 2020 18:23:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-renaming-model-parameters/m-p/9728280#M10844</guid>
      <dc:creator>brad.bylls</dc:creator>
      <dc:date>2020-09-03T18:23:15Z</dc:date>
    </item>
  </channel>
</rss>

