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: 

Does not work [Command Inputs API Sample]

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
kandennti
276 Views, 2 Replies

Does not work [Command Inputs API Sample]

This is [Command Inputs API Sample], but it doesn't work and can't be debugged.
(Fusion360 Ver2.0.6658)

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

 

It is inconvenient not to work because it is very helpful in determining the design.

 

By commenting the following part, it is possible to display it, although it is not the intended operation.

1.png

2 REPLIES 2
Message 2 of 3
PinRudolf
in reply to: kandennti

Hi Kandennti,

 

Try running the code in the terminal. You'll get an error saying that the global call should be done before the first refference to that parameter. Basically move global _rowNumber to the top of the function.

 

Somehow the method from the example used to work in the past. However when you wanted to 'compile' using CPython you also had to comply to this rule (so it's not new in python 3.7 and whas already there in 3.5). I'm not sure where is came from but it seems to be a standard python rule now.

Message 3 of 3
kandennti
in reply to: PinRudolf

Thanks PinRudolf.

 

I didn't know the rules.

I hope that the sample will be corrected soon.

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