Python/Javascript REPL/console?

Python/Javascript REPL/console?

ittay.dror
Advocate Advocate
1,038 Views
2 Replies
Message 1 of 3

Python/Javascript REPL/console?

ittay.dror
Advocate
Advocate

I'd like to drive Fusion 360 by typing commands in a console (my use case is that I can't seem to be able to set a home position for a joint and hope it is a bug in the GUI and that using the API i'll be able to do it). In Sketchup there's a Ruby console where I can type Ruby expressions that are evaluated and can work with the model. Is there something like this for Fusion 360? 

0 Likes
1,039 Views
2 Replies
Replies (2)
Message 2 of 3

marshaltu
Autodesk
Autodesk

Hello,

 

Please refer to the following thread. Some client implemented the application how to do remote control for Autodesk Fusion 360. That can probably give some clues how drive Fusion 360 by "console".  

 

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/remote-control-for-autodesk-fusion-360/m-p...

 

Thanks,

Marshal



Marshal Tu
Fusion Developer
>
0 Likes
Message 3 of 3

ekinsb
Alumni
Alumni

I'm not exactly sure what you're looking for, but there is one other option. In the Fusion 360 UI you can turn on the display of the "TEXT COMMANDS" window.  You do this in the "View" option within the File menu.  When the "TEXT COMMANDS" window is displayed you can choose the "Py" option in the lower-right corner.  Now you can access and use the Python API from here.  For example, if you type the following lines it will show you how many features exist in the root component

 

from adsk.core import *

from adsk.fusion import *

app = adsk.core.Application.get()

des = app.activeProduct

des.rootComponent.features.count


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog