This week a new Fusion 360 update went out. There are a few API related enhancements in this update and one big announcement.
- User Specified Program Path - You can now specify the location where Fusion will look for existing scripts and add-ins and where new scripts and add-ins will be created. You do this using a new setting in the Preferences dialog, as shown below. The default path was deep and in a system folder. With this you can choose the location of your programs. This path is not saved as part of your cloud preferences but is a local preference. This allows you to have a different path on different computers.
A big benefit of being able to choose your script and add-in location is that this can be a folder that is synced to the cloud using any of the available file syncing services.
Change in Adding Script or Add-In - A small change has been made to how you add a script or add-in to the list of known scripts and add-ins. The "Scripts and Add-Ins" dialog allows you to select a script or add-in anywhere on your computer and Fusion 360 will remember it after that. You do that by using the green "+" button on the "Scripts and Add-In" dialog, as shown below. This also helps to resolve a security issue on Mac where selecting just the file didn't provide access to the other files in the folder. Selecting a folder provides access to its entire contents.
Clicking the green plus will display a browse dialog where you can browse to and select the script or add-in. The change is that previously you had to pick the file that represented the script or add-in. This tended to be confusing because these files will have different file extensions depending on which language the script or add-in was written and it was possible that there could be multiple code files that the main file depended on. The change is that you no longer select the file but now choose the folder that contains all of the files of the script or add-in.
- Change to ModelParameter.createdBy property - The createdBy property of the ModelParameter object was changed in the previous update so that it will return the object that caused the parameter to be created. There are cases where the creating object isn't currently supported by the API so the createdBy property doesn't have anything to return. In the last update, when this occurs it results in an exception. This has been changed in this update to that the property returns null instead.
- Clearing a List - A problem was reported on the forum quite a while ago regarding being able to empty the list associated with a DropDownCommandInput. This has been resolved in this update with the addition of the clear method to the ListItems object.
- Additional Feature Support - Support for copying or cutting and pasting a body is now supported through the API. Basic query support it now also available for the offset face feature (which is created in the UI using the "Press Pull" command).
- External References - Additional functionality related to external references has been added to the API.
The full list of changes can be found on the What’s New page of the Fusion API help.