Adding a script in Fusion 360 is a straightforward process that allows you to extend the software's functionality, automate repetitive tasks, and create custom features. Whether you're using a sample script or one developed by the community, integrating it can significantly boost your productivity.
Understanding Scripts and Add-Ins in Fusion 360
Fusion 360 supports both scripts and add-ins. While often used interchangeably, there's a subtle distinction:
- Scripts typically run once to perform a specific task, then finish. They are usually written in Python or JavaScript.
- Add-Ins are more persistent, often running in the background or adding new commands to the Fusion 360 user interface, staying active until you stop them. They can also be written in Python or C++.
Both are managed through the same interface within Fusion 360.
Step-by-Step Guide to Adding a Script or Add-In
Here’s how to install a script or add-in in Fusion 360:
1. Access the Scripts and Add-Ins Dialog
The first step is to open the central hub for managing your extensions.
- On the Fusion 360 toolbar, navigate to the Utilities tab.
- Within the Utilities panel, click on Add-Ins, then select Scripts and Add-Ins.
- Tip: You can often find this under
File > Add-Ins > Scripts and Add-Ins
in older versions or different UI configurations.
- Tip: You can often find this under
2. Select Your Script or Add-In
Once the "Scripts and Add-Ins" dialog box appears, you will see two main tabs: Scripts and Add-Ins.
- For Sample Scripts/Add-Ins: On the respective tab (Scripts or Add-Ins), you'll see a list of pre-installed sample scripts or add-ins. You can select one from this list to explore its functionality.
- For Custom Scripts/Add-Ins from Your Computer:
- Click the green + (plus) icon next to "My Scripts" or "My Add-Ins" at the bottom of the dialog.
- This will open a file browser. Navigate to the folder where your script (
.py
for Python,.js
for JavaScript) or add-in's main file is located. - Select the script file or the folder containing the add-in's manifest file (e.g.,
manifest.addin
). - Click Open or Select Folder.
3. Locate Your Script/Add-In Folder
It's crucial to understand where Fusion 360 expects scripts and add-ins to be placed for easy management.
- Default Locations:
- Windows:
%APPDATA%\Autodesk\Fusion360\API\Scripts
orAddins
- macOS:
~/Library/Application Support/Autodesk/Fusion360/API/Scripts
orAddins
- Windows:
- When you use the
+
icon to add from your local computer, you are typically pointing Fusion 360 to that location, rather than moving the files. For best practice, it's often recommended to place script folders directly into one of these paths before adding them via the dialog.
4. Running Your Script or Add-In
Once added, you can run your extension:
- In the "Scripts and Add-Ins" dialog, select the script or add-in from the list.
- Click the Run button.
- For add-ins, you might also see an Enable checkbox. Checking this will often make the add-in launch automatically when Fusion 360 starts.
Practical Insights for Script Management
- Downloading Scripts: Many useful scripts and add-ins are available on the Autodesk App Store or GitHub. Always download from reputable sources.
- Installation Method: Some add-ins come with their own installers, simplifying the process. For others, you'll manually copy the folder to the appropriate Fusion 360 API directory (
Scripts
orAddins
) and then use the+
button in the "Scripts and Add-Ins" dialog to register it. - Debugging: If a script doesn't run, check the "Text Command" window at the bottom of Fusion 360 for error messages. These can provide clues for troubleshooting.
- Updating Scripts: To update an existing script, simply replace the old script files in their designated folder with the new versions. Fusion 360 will typically recognize the changes upon restart or re-running the script.
- Disabling/Removing: You can disable an add-in by unchecking the "Run on Startup" box, or completely remove a script/add-in by selecting it and clicking the Remove button in the dialog. This usually removes its entry from Fusion 360, but you might need to manually delete the files from your API folder if you want them gone permanently.
Example: Adding a Simple Python Script
Let's say you have a Python script named create_box.py
that automatically creates a simple box in your design.
- Save the script: Place
create_box.py
into a folder, for example,C:\MyFusionScripts\create_box
. - Open Fusion 360.
- Go to Utilities > Add-Ins > Scripts and Add-Ins.
- In the "Scripts and Add-Ins" dialog, on the
Scripts
tab, click the + (plus) icon. - Navigate to
C:\MyFusionScripts\create_box
and select thecreate_box.py
file. Click Open. - The
create_box
script will now appear in your list of "My Scripts." - Select
create_box
and click Run. A new box will appear in your Fusion 360 canvas.
Quick Reference: Adding Scripts/Add-Ins
Action | Steps |
---|---|
Access Dialog | Utilities > Add-Ins > Scripts and Add-Ins |
Add from Local Computer | Click + icon on Scripts or Add-Ins tab, navigate to file/folder, click Open /Select Folder |
Run a Script | Select script from list, click Run |
Enable Add-In on Startup | Select add-in, check Run on Startup box |
Default Script Location (Windows) | %APPDATA%\Autodesk\Fusion360\API\Scripts |
Default Add-In Location (Windows) | %APPDATA%\Autodesk\Fusion360\API\Addins |
By following these steps, you can effortlessly integrate custom functionality into Fusion 360, streamlining your design and manufacturing workflows.