Custom Toolholder Addin not working

Custom Toolholder Addin not working

Anonymous
618 Views
6 Replies
Message 1 of 7

Custom Toolholder Addin not working

Anonymous
Not applicable

HI I am trying to get an addin working (addin file attached) and getting an error code (screenshot attached).  The addin is a file downloaded from John Saunders' website and he seemed to get it working fine. 

 

The error seems to be that a Tcl wasn't installed properly?

 

Any suggestions on how to get this addin working so I can model my SK toolholders for crash avoidance?

 

Many thanks.

0 Likes
Accepted solutions (1)
619 Views
6 Replies
Replies (6)
Message 2 of 7

boopathi.sivakumar
Autodesk
Autodesk

Hi @Anonymous 

I am not a mac user so could not check what's going wrong but i am suspect it something with the tkinter python module alternatively you can use the attached script file 

and change the filename in the top as you wish

filename = "/Users/username/directory/toolHoder.json"
 
i hope this script should work fine 

Boopathi Sivakumar
Senior Technology Consultant

0 Likes
Message 3 of 7

Anonymous
Not applicable

Hi, and thank you so much for the help. I tried to do what you said and I think that I was partly successful.  I can now see the SK6 Toolholder on the fusion360 Tool Library page (screenshot attached), but its seems to be listed under the "document" tab.  However, when I go  to the Tool Library and try to create a tool, the SK6 Toolholder does not show up in the "holder" tab (screenshot attached).  I still only get the toolholder options that are native to Fusion.  I have also attached the script so that you can see the file location where I put the script.  Any ideas?

 

Thank you very much.

0 Likes
Message 4 of 7

boopathi.sivakumar
Autodesk
Autodesk
Accepted solution

@Anonymous

Your filename should have the extension json. Not the.py

 

filename = "/Users/a/Library/Application Support/Autodesk/Autodesk Fusion 360/API/
AddIns/Tool Holder.py"

 

Filename is basically a directory with file name you want to store the tool library locally in your pc. Then you have to import the same json file into your local tool library.

Once you run the script and select the body it will create a json file in the directory you mentioned. Then go to Tool library import the created json file. 


Boopathi Sivakumar
Senior Technology Consultant

0 Likes
Message 5 of 7

Anonymous
Not applicable

Hi and thank you so much for the help.  I made the changes that you suggested.  I was getting a strange error code (screenshot attached).  For some reason, if I put the ToolHolder script in the "AddIns/ToolHolder" folder with just the .json filename, then nothing works.  However, if I put two script files in that same folder, .json and also .py then for some reason it works, but it outputs a .py file.  Then I edit the .py file extension to .json and I can point the Fusion Tool Library to that file and it works fine.  Very convaluted, but it works now to I'm just going to do it that way.

 

Many thanks for your help and all the best.

0 Likes
Message 6 of 7

boopathi.sivakumar
Autodesk
Autodesk

@Anonymous 

Probably i may not explained clearly if you edit the Tool Holder.py file and you will see the 

app = adsk.core.Application.get()
ui  = app.userInterface
filename = "/Users/a/Library/Application Support/Autodesk/Autodesk Fusion 360/API/
AddIns/Tool Holder.py"       #<< here you have to change .json instead .py

def createHolder():  

And you need to change that name as Tool Holder.json or whatever.json

so that your output file will be created as .json


Boopathi Sivakumar
Senior Technology Consultant

0 Likes
Message 7 of 7

Anonymous
Not applicable

Hi, I tried just having the .json file in the "AddIns/ToolHolder" folder, but I got an  error code.  However, when I put both a .json file and also a .py file in the "AddIns/ToolHolder" folder then it works and outputs a .py file that I can import into my Tool Library.  I just have to edit the extension so that it is .json instead of .py.  I tried to do it with just  the .json file but I could not get it to work.

 

Anyway, I really appreciate your help and it is working now so I think all is well.

 

Many thanks for all of your help.

0 Likes