<?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 Occurrence Attributes in CommandInputChangedHandler in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/occurrence-attributes-in-commandinputchangedhandler/m-p/7828708#M16601</link>
    <description>The code below changes the occurrence attribute when called from the CommandCreatedHandler, but when I call this function in the CommandInputChangedHandler, it clears the selection input and does not permenantly change the occurrence attribute. Any help would be appreciated, as I am just beginning. def addOccurrenceAttribute(occurenceName, value): try: product = _app.activeProduct design = adsk.fusion.Design.cast(product) design.rootComponent.allOccurrences.itemByName(occurenceName).attributes.add("group","name",value) except: _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))</description>
    <pubDate>Mon, 05 Mar 2018 19:09:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-05T19:09:11Z</dc:date>
    <item>
      <title>Occurrence Attributes in CommandInputChangedHandler</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/occurrence-attributes-in-commandinputchangedhandler/m-p/7828708#M16601</link>
      <description>The code below changes the occurrence attribute when called from the CommandCreatedHandler, but when I call this function in the CommandInputChangedHandler, it clears the selection input and does not permenantly change the occurrence attribute. Any help would be appreciated, as I am just beginning. def addOccurrenceAttribute(occurenceName, value): try: product = _app.activeProduct design = adsk.fusion.Design.cast(product) design.rootComponent.allOccurrences.itemByName(occurenceName).attributes.add("group","name",value) except: _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))</description>
      <pubDate>Mon, 05 Mar 2018 19:09:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/occurrence-attributes-in-commandinputchangedhandler/m-p/7828708#M16601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-05T19:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Occurrence Attributes in CommandInputChangedHandler</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/occurrence-attributes-in-commandinputchangedhandler/m-p/7830450#M16602</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The model changes made in InputChanged event handler would be rolled back because they are intermediate. I would recommend to do that in CommandExecuteEvent handler, which is best practice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Marshal&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 09:57:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/occurrence-attributes-in-commandinputchangedhandler/m-p/7830450#M16602</guid>
      <dc:creator>marshaltu</dc:creator>
      <dc:date>2018-03-06T09:57:10Z</dc:date>
    </item>
  </channel>
</rss>

