<?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 formFeatures.add() hard crashes fusion, when in direct editing mode in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/formfeatures-add-hard-crashes-fusion-when-in-direct-editing-mode/m-p/14174737#M22893</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am writing a subd- to tspline converter that allows converting tspline objects back and fourth to subd. i am trying to do TSplineBodies.addByTSMDescription, but in order to access it, i have to have a form feature created. I need the t-spline body to be "live" as it is, when regularly working with tspline bodies in direct editing mode (enabling and disabling timeline for the import works, however i loose the editable tspline, as it gets converted to Brep, when formFeature finishes).&lt;BR /&gt;The ui route for adding a Tspline body with a .tsm file also works in direct mode (the insert T-spline command), but .tsm it is not exposed through the importManager [adding tsm support in the import manager would probably be an easier and more elegant fix]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;adding a script, that causes fusion to crash if timeline is dissabled&lt;BR /&gt;&lt;BR /&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.core, &lt;/SPAN&gt;&lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.fusion, &lt;/SPAN&gt;&lt;SPAN&gt;traceback&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;run&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;context&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ui&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;None&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;app&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.core.Application.get()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ui&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;app&lt;/SPAN&gt;&lt;SPAN&gt;.userInterface&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;design&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.fusion.Design.cast(&lt;/SPAN&gt;&lt;SPAN&gt;app&lt;/SPAN&gt;&lt;SPAN&gt;.activeProduct)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;root&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;design&lt;/SPAN&gt;&lt;SPAN&gt;.rootComponent&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;#fusion hard crashes if executed in direct/no timeline mode), while works fine in parametric&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;root&lt;/SPAN&gt;&lt;SPAN&gt;.features.formFeatures.add()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;except&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;ui&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ui&lt;/SPAN&gt;&lt;SPAN&gt;.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'Failed:&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;{}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;traceback&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;format_exc&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;p.s.&amp;nbsp;[pipe feature also crashes in direct mode, however i overcame that with a sweep].&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 22 Jun 2026 17:23:48 GMT</pubDate>
    <dc:creator>vytska4301</dc:creator>
    <dc:date>2026-06-22T17:23:48Z</dc:date>
    <item>
      <title>formFeatures.add() hard crashes fusion, when in direct editing mode</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/formfeatures-add-hard-crashes-fusion-when-in-direct-editing-mode/m-p/14174737#M22893</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am writing a subd- to tspline converter that allows converting tspline objects back and fourth to subd. i am trying to do TSplineBodies.addByTSMDescription, but in order to access it, i have to have a form feature created. I need the t-spline body to be "live" as it is, when regularly working with tspline bodies in direct editing mode (enabling and disabling timeline for the import works, however i loose the editable tspline, as it gets converted to Brep, when formFeature finishes).&lt;BR /&gt;The ui route for adding a Tspline body with a .tsm file also works in direct mode (the insert T-spline command), but .tsm it is not exposed through the importManager [adding tsm support in the import manager would probably be an easier and more elegant fix]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;adding a script, that causes fusion to crash if timeline is dissabled&lt;BR /&gt;&lt;BR /&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.core, &lt;/SPAN&gt;&lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.fusion, &lt;/SPAN&gt;&lt;SPAN&gt;traceback&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;run&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;context&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ui&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;None&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;app&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.core.Application.get()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ui&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;app&lt;/SPAN&gt;&lt;SPAN&gt;.userInterface&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;design&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.fusion.Design.cast(&lt;/SPAN&gt;&lt;SPAN&gt;app&lt;/SPAN&gt;&lt;SPAN&gt;.activeProduct)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;root&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;design&lt;/SPAN&gt;&lt;SPAN&gt;.rootComponent&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;#fusion hard crashes if executed in direct/no timeline mode), while works fine in parametric&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;root&lt;/SPAN&gt;&lt;SPAN&gt;.features.formFeatures.add()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;except&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;ui&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ui&lt;/SPAN&gt;&lt;SPAN&gt;.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'Failed:&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;{}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;traceback&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;format_exc&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;p.s.&amp;nbsp;[pipe feature also crashes in direct mode, however i overcame that with a sweep].&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 Jun 2026 17:23:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/formfeatures-add-hard-crashes-fusion-when-in-direct-editing-mode/m-p/14174737#M22893</guid>
      <dc:creator>vytska4301</dc:creator>
      <dc:date>2026-06-22T17:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: formFeatures.add() hard crashes fusion, when in direct editing mode</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/formfeatures-add-hard-crashes-fusion-when-in-direct-editing-mode/m-p/14175252#M22894</link>
      <description>&lt;P&gt;The issue occurs because formFeatures.add() is strictly designed for Parametric Modeling (Timeline enabled) In Fusion 360, a Form Feature acts as a historical container that transitions the workspace into the Sculpt Environment Calling it in Direct Modeling (No Timeline) confuses the core engine and causes an immediate hard crash .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the workarounds and fixes to solve this in your script:&lt;span class="lia-unicode-emoji" title=":hammer_and_wrench:"&gt;🛠&lt;/span&gt;️ Recommended Workarounds1. Execute the Native UI Command (Best for .tsm Files)Since the official "Insert T-Spline" UI command works perfectly in Direct Mode&amp;nbsp; you can trigger it programmatically using its Command ID. This bypasses the missing importManager support How: Use app.userInterface.commandDefinitions.itemById('FusionTSpIn_cmd').execute() to launch the native import dialog. Prevent Crashes Using Design Type ValidationAlways check the active design mode before attempting to create historical features. This ensures your script exits safely instead of crashing the software &lt;span class="lia-unicode-emoji" title=":laptop_computer:"&gt;💻&lt;/span&gt; Crash-Safe ImplementationHere is how you can update your script to check the design environment type and avoid the hard crash&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        design = adsk.fusion.Design.cast(app.activeProduct)
        root = design.rootComponent
        
        # 1. Check if the timeline is disabled (Direct Design)
        if design.designType == adsk.fusion.DesignTypes.DirectDesignType:
            ui.messageBox('Error: formFeatures.add() cannot be used in Direct Modeling Mode.\nPlease enable the timeline or use native import commands.')
            return
            
        # 2. This will only run safely in Parametric Mode
        formFeature = root.features.formFeatures.add()
        
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you find this post helpful? If it gave you one or more solutions,&lt;/P&gt;&lt;P&gt;don't forget to click the Accept Solution button and leave a &amp;lt; like !&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2026 00:54:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/formfeatures-add-hard-crashes-fusion-when-in-direct-editing-mode/m-p/14175252#M22894</guid>
      <dc:creator>Radwan-Almsora</dc:creator>
      <dc:date>2026-06-23T00:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: formFeatures.add() hard crashes fusion, when in direct editing mode</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/formfeatures-add-hard-crashes-fusion-when-in-direct-editing-mode/m-p/14175758#M22896</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/19092244"&gt;@Radwan-Almsora&lt;/a&gt;&amp;nbsp;can you please stop posting ai generated comments to like farm? your suggestions in multiple of my posts just re-state the issues i have using fusion api in direct editing mode&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2026 09:08:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/formfeatures-add-hard-crashes-fusion-when-in-direct-editing-mode/m-p/14175758#M22896</guid>
      <dc:creator>vytska4301</dc:creator>
      <dc:date>2026-06-23T09:08:23Z</dc:date>
    </item>
  </channel>
</rss>

