Subject: Persistent AttributeError on doc.editManager / design.designFeatures Despite Reinstalls (Fusion 2601.0.90 x86_64)

Subject: Persistent AttributeError on doc.editManager / design.designFeatures Despite Reinstalls (Fusion 2601.0.90 x86_64)

jim.williams3KCWF
Observer Observer
188 Views
2 Replies
Message 1 of 3

Subject: Persistent AttributeError on doc.editManager / design.designFeatures Despite Reinstalls (Fusion 2601.0.90 x86_64)

jim.williams3KCWF
Observer
Observer

Hi everyone,

 

I'm encountering a persistent and unusual issue when trying to use the Fusion 360 Python API. Core properties required for design modification seem to be missing from the API objects, specifically doc.editManager and design.designFeatures.

 

Environment:Fusion 360 Version: 2601.0.90 x86_64 (Educational License)

Operating System: Windows 11

Running Scripts: Via the standard "Scripts and Add-Ins" dialog.

 

Problem Description:

 

When running Python scripts, I consistently get an AttributeError when trying to access doc.editManager. The deprecated design.undoManager also fails with the same error.

 

Crucially, further testing revealed that other core properties are also missing, notably

design.designFeatures.

However, basic API access does work:

adsk.core.Application.get() succeeds.

app.userInterface succeeds.

app.activeDocument returns a valid FusionDocument object.

app.activeProduct returns a valid Design object.

Many other properties like doc.name, doc.products, design.rootComponent, and design.unitsManager are accessible without error.

Diagnostic Script Output:

I ran a diagnostic script (Attempt B from a debugging session) to test various attributes.

 

Here is the script Attempt B:

 

# --- Attempt B: Check Other Attributes) ---
import adsk.core, adsk.fusion, traceback

def run(context😞
    ui = None
    results = "" # Accumulate results here for the message box

    try:
        # --- Setup ---
        app = adsk.core.Application.get()
        if not app:
            results += "ERROR: Failed to get Application object!\n"
            # Cannot show message box if app failed
            return # Exit early
        ui = app.userInterface
        if not ui:
            # Cannot show message box if ui failed, should not happen if app worked
             results += "ERROR: Failed to get UserInterface object!\n"
             # If we can't UI, we can't report failure easily. Exit.
             return

        doc = app.activeDocument
        if not doc:
            results += "ERROR: No active document found.\n"
            ui.messageBox(results + "\nPlease open or create a design.", "Setup Error")
            return

        design = app.activeProduct
        if not design or design.objectType != adsk.fusion.Design.classType():
             if doc.products:
                  design = doc.products.itemByProductType("DesignProductType")

        if not design:
            results += "ERROR: Could not get active Design object.\n"
            ui.messageBox(results, "Setup Error")
            return

        # --- Attribute Tests ---
        results += f"--- Testing Attributes ---\n"
        results += f"Doc Type: {type(doc)}\n"
        results += f"Design Type: {type(design)}\n\n"

        # Test Document Attributes/Methods
        results += "Testing Document Object:\n"
        try:
            name_val = doc.name
            results += f"  SUCCESS: doc.name = {name_val} (Type: {type(name_val)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing doc.name - {type(e).__name__}: {e}\n"

        try:
            # Try getting dataFile - might be None for unsaved doc, which is OK
            df = doc.dataFile
            if df is None:
                results += f"  INFO: doc.dataFile is None (Expected for unsaved doc)\n"
            else:
                id_val = df.id # Now try getting ID
                results += f"  SUCCESS: doc.dataFile.id accessed (Type: {type(id_val)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing doc.dataFile.id - {type(e).__name__}: {e}\n"

        try:
            prod_val = doc.products
            results += f"  SUCCESS: doc.products accessed (Type: {type(prod_val)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing doc.products - {type(e).__name__}: {e}\n"

        # Test Design Attributes/Methods
        results += "\nTesting Design Object:\n"
        try:
            root_val = design.rootComponent
            results += f"  SUCCESS: design.rootComponent accessed (Type: {type(root_val)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing design.rootComponent - {type(e).__name__}: {e}\n"

        try:
            units_val = design.unitsManager.defaultLengthUnits
            results += f"  SUCCESS: design.unitsManager.defaultLengthUnits = {units_val} (Type: {type(units_val)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing design.unitsManager... - {type(e).__name__}: {e}\n"

        try:
            feat_val = design.designFeatures
            results += f"  SUCCESS: design.designFeatures accessed (Type: {type(feat_val)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing design.designFeatures - {type(e).__name__}: {e}\n"


        # --- Original Test ---
        results += "\n--- Original Manager Test ---\n"
        try:
            manager = doc.editManager
            results += f"  SUCCESS: doc.editManager accessed (Type: {type(manager)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing doc.editManager - {type(e).__name__}: {e}\n" # Show exception type

        try:
            manager_undo = design.undoManager
            results += f"  SUCCESS: design.undoManager accessed (Type: {type(manager_undo)})\n"
        except Exception as e:
            results += f"  FAILURE: Accessing design.undoManager - {type(e).__name__}: {e}\n" # Show exception type

        # --- Display Results ---
        ui.messageBox(results, "Attribute Test Results (Attempt B)")

    except Exception as e:
        # Catch errors during the overall script execution
        final_error = f"FATAL SCRIPT ERROR:\n{type(e)}\n{str(e)}\n{traceback.format_exc()}"
        if ui:
            ui.messageBox(final_error, "Fatal Script Error")
        # We still can't rely on print
        # print(final_error)
 

Here is the exact output received in the ui.messageBox:

 

--- Testing Attributes ---
Doc Type: <class 'adsk.fusion.FusionDocument'>
Design Type: <class 'adsk.fusion.Design'>

Testing Document Object:
SUCCESS: doc.name = Untitled (Type: <class 'str'>)
INFO: doc.dataFile is None (Expected for unsaved doc)
SUCCESS: doc.products accessed (Type: <class 'adsk.core.Products'>)

Testing Design Object:
SUCCESS: design.rootComponent accessed (Type: <class 'adsk.fusion.Component'>)
SUCCESS: design.unitsManager.defaultLengthUnits = mm (Type: <class 'str'>)
FAILURE: Accessing design.designFeatures - AttributeError: 'Design' object has no attribute 'designFeatures'

--- Original Manager Test ---
FAILURE: Accessing doc.editManager - AttributeError: 'FusionDocument' object has no attribute 'editManager'
FAILURE: Accessing design.undoManager - AttributeError: 'Design' object has no attribute 'undoManager'
Use code with caution.
Text

 

Additionally, I observed that standard print() statements within scripts are not appearing in the Text Commands panel, even though ui.messageBox works correctly. Flushing stdout (sys.stdout.flush()) did not resolve this print issue.

 

Troubleshooting Steps Already Taken:

 

Verified the script is running from the "Scripts and Add-Ins" dialog.

 

Confirmed a design document is open and active in the Design workspace.

 

Tested multiple simple and diagnostic scripts.

 

Performed a full Repair install of Fusion 360.

 

Performed a full Uninstall and Reinstall of Fusion 360.

 

Performed a full clean reinstall of Windows and then reinstalled Fusion 360. 

 

Tested running Fusion 360 "As Administrator": [Result: No Change].

 

Temporarily disabled third-party Antivirus/Security Software: [Result: No Change].

 

Question:

 

Given that core object retrieval and some properties work, but essential properties like editManager and designFeatures are missing even after complete system and application reinstalls, what could be causing this? Is this a known issue with build 2601.0.90, a potential licensing side-effect, a deep environment/permission problem not cleared by reinstalls, or something else?

 

Any insights or further diagnostic steps would be greatly appreciated.

 

Thank you!

0 Likes
189 Views
2 Replies
Replies (2)
Message 2 of 3

RajkumarIlanchelian
Autodesk
Autodesk

@jim.williams3KCWF The version you have is a very old version. Can you please update to the latest 2601.0.90 ? This likely should address your issue is my guess. 

Rajkumar Ilanchelian
Autodesk Fusion

Join Fusion Insider

0 Likes
Message 3 of 3

jim.williams3KCWF
Observer
Observer

Apologies the version is actually up to date after the fresh installation.

 

Performed a full clean reinstall of Windows and then reinstalled Fusion 360. Version 2601.0.90 x86_64

 

I have updated the post and added the script 'script Attempt B'

 

I wonder if you could run 'script Attempt B' and see if you have any issues?

0 Likes