Does not work [Command Inputs API Sample]

kandennti
Mentor
Mentor

Does not work [Command Inputs API Sample]

kandennti
Mentor
Mentor

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

0 Likes
Reply
Accepted solutions (1)
437 Views
2 Replies
Replies (2)

PinRudolf
Advocate
Advocate
Accepted solution

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.

1 Like

kandennti
Mentor
Mentor

Thanks PinRudolf.

 

I didn't know the rules.

I hope that the sample will be corrected soon.

0 Likes