Community
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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Command Inputs API Sample (Python) Issues

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
mjobson32CFL
492 Views, 4 Replies

Command Inputs API Sample (Python) Issues

Hi, 

 

I'm trying to learn to program in Python and learn the API (i;m not a programmer), but the Command Inputs API Sample isn't fully working in Python:

 

http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-e5c4dbe8-ee48-11e4-9823-f8b156d7cd97

 

Line 39 and 99 have errors. and If i turn 99 into a comment (#) then 125 becomes a problem.. then 126 etc etc.

 

So i am guessing there is something it keeps referring to (maybe an expression) that has changed in fusion 360 in some way.

 

It's really late.. Any chance someone could send me updated code that actually works out of the box. (eg. every time i select something it shoots up error msgs.)

 

Kinda hard to learn and play in this state.

 

I want to learn it, but viewing samples in this state makes it decidedly unfun.

 

Thanks.

4 REPLIES 4
Message 2 of 5
ekinsb
in reply to: mjobson32CFL

Thanks for pointing out this issue.  That sample has a dependency on some resource files but that's not identified anywhere and the files aren't easily available.  I'll see if I can correct that for the next release.  I've attached the resource files.  Just unpack the zip into the folder where the script is.  So you should see the .py and .manifest files of your script and now there should also be a "resources" folder.  Now it should work.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 5
mjobson32CFL
in reply to: ekinsb

Thanks Brian,

 

Where do i find the zip?

Message 4 of 5
ekinsb
in reply to: mjobson32CFL

It helps if I actually attach it. Smiley Happy

 

Here it is.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 5
mjobson32CFL
in reply to: ekinsb

Thanks. Works nicely now.

 

I'm going to have a good look at this and your Spur Gear script.

 

Fusion has integrated scripts really nicely. If made properly, it would be hard to tell user generated scripts from the main software. That is really cool!

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