Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add-in to add custom threads

Message 1 of 4
281 Views, 3 Replies

Add-in to add custom threads


I've got some custom threads that I often need to use in Fusion360. I know that they can be added to the Thread command with this technique, but I'm getting a bit fed up of having to do that every time Fusion is updated (3 times this week for me). Is this something that I can put into an add-in so that I can install them in a more-friendly manner than copying the .xml file out of my Git repo into the depths of the Fusion360 install? 


I'm relatively comfortable cobbling together scripts in Python, and have programming experience elsewhere but it's not clear to me whether the API has this capability. Can it?

Message 2 of 4
in reply to: tjslo

Hi @tjslo .


There is a part in the library published by @thomasa88 that uses an excellent method to get the folder path. 


If you use this method, you should be able to get the correct path even after the update.
I think this is the way to go for the ThreadData folder.

        threadDataFolder = app.userInterface.workspaces.itemById('FusionSolidEnvironment').resourceFolder.replace(
            '/UI/FusionUI/Resources/Environment/Model', '/Server/Fusion/Configuration/ThreadData')


I think you can check if the xml file exists, and if not, you can copy it.

Message 3 of 4
in reply to: kandennti

There's also


I got a report that the installer on the autodesk site might install a broken version. Due to an injury I can't do any work at the moment, but the github should work fine. (Be sure to download a release or do submodule update).

Message 4 of 4
in reply to: tjslo

Thanks both. I've marked both these answers as solutions because @thomasa88 's ThreadKeeper is basically the same as the thing that I was in the process of writing using @kandennti 's advice. @thomasa88 your solution is definitely the most elegant (and quickest since there's no work for me). Good stuff.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report