<?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: Creating New Document from Add-In in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14314595#M23171</link>
    <description>&lt;P&gt;This seemed to work on my end, though the functionality working within the command as well makes me think that it only really effects whether the creation can be undone. Some of the recent changes to the versioning/part numbering system have caused me to take a bit of a step back from utilizing the API for this intent so I have not spent much time validating whether this is the case or not.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2026 16:56:27 GMT</pubDate>
    <dc:creator>alden_360</dc:creator>
    <dc:date>2026-10-15T16:56:27Z</dc:date>
    <item>
      <title>Creating New Document from Add-In</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14276320#M23095</link>
      <description>&lt;P&gt;Hello, I have been doing some testing on my end with regards to creating files and deriving parts to them, which seems to be working well. I just noticed however that the tool tips for both the Documents.add and Document.saveAs methods have this in their descriptions:&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.&lt;/FONT&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this still true in the API and if it is is there any workaround that anyone has found? Code that was working on my end is below. Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def command_execute(args: adsk.core.CommandEventArgs):
    # General logging for debug.
    futil.log(f'{CMD_NAME} Command Execute Event')
    des = adsk.fusion.Design.cast(app.activeProduct)

    ...

    target_body: adsk.fusion.BRepBody = selection.body  # Store body
    active_doc = des.parentDocument
    folder = active_doc.dataFile.parentFolder

    new_doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType, True)
    new_design: adsk.fusion.Design = new_doc.products.itemByProductType('DesignProductType')
    new_comp = new_design.rootComponent
    der_feats = new_comp.features.deriveFeatures
    der_input = der_feats.createInput(des)
    der_input.sourceEntities = [target_body]
    der_feat = der_feats.add(der_input)
    new_doc.saveAs('new_file', folder, '', '')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2026 20:54:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14276320#M23095</guid>
      <dc:creator>alden_360</dc:creator>
      <dc:date>2026-09-23T20:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating New Document from Add-In</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14278536#M23099</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I need to do something that is not allowed inside a Command Event, I use a Custom Event.&lt;/P&gt;&lt;P&gt;This way you can make any operation under the Fusion's main thread but outside the boundary of the commands events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find how to deal with a Custom Event in the following sample:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-85edd118-c2a4-11e6-b401-3417ebc87622" target="_blank"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-85edd118-c2a4-11e6-b401-3417ebc87622&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this can help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jorge Jaramillo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2026 15:05:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14278536#M23099</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2026-09-25T15:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating New Document from Add-In</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14283972#M23116</link>
      <description>&lt;P&gt;Hi Jorge, thanks for the tip. I'll give that a try!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 14:34:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14283972#M23116</guid>
      <dc:creator>alden_360</dc:creator>
      <dc:date>2026-09-30T14:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating New Document from Add-In</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14291107#M23134</link>
      <description>&lt;P&gt;Hello &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14563454"&gt;@alden_360&lt;/a&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just circling back: Were you able to figure this out, or do you still need a hand? Let us know by giving us an update on where you are at so the community can help guide you with next steps if possible.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2026 10:13:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14291107#M23134</guid>
      <dc:creator>navya_gelli</dc:creator>
      <dc:date>2026-10-06T10:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating New Document from Add-In</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14314595#M23171</link>
      <description>&lt;P&gt;This seemed to work on my end, though the functionality working within the command as well makes me think that it only really effects whether the creation can be undone. Some of the recent changes to the versioning/part numbering system have caused me to take a bit of a step back from utilizing the API for this intent so I have not spent much time validating whether this is the case or not.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2026 16:56:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/creating-new-document-from-add-in/m-p/14314595#M23171</guid>
      <dc:creator>alden_360</dc:creator>
      <dc:date>2026-10-15T16:56:27Z</dc:date>
    </item>
  </channel>
</rss>

