Call Fusion from Command line with python script argument?

Call Fusion from Command line with python script argument?

Anonymous
Not applicable
1,652 Views
3 Replies
Message 1 of 4

Call Fusion from Command line with python script argument?

Anonymous
Not applicable

Is it possible to launch Fusion from the command prompt and pass it an argument to run a python script? Something like:

 

> fusion -script box.py

 

 

If not, I think it would be awesome to add this feature.

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

ekinsb
Alumni
Alumni

This is not currently possible.  There will be support for add-ins in the near future, which is essentially a script that runs automatically whenever Fusion is started.  That might be another and possibly better solution for whatever you're trying to do.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 3 of 4

Anonymous
Not applicable

So what I was think was writing a program that called Fusion and automatically starts a python script that opens a socket. Then send information to Fusion through that socket. That way I could drive Fusion from another program and not be restricted by the Fusion environment.

 

I was thinking about this mainly so that I could use a Python program using Qt in a separate Python instance (using my local Python install with all the libraries and not have a Qt conflict) send the commands through the socket to a "translator" script running in Fusion.

 

You could do this now, just need to open Fusion manually and start the script.

 

This could even be opened up to a server running in Fusion on one machine receiving inputs from multiple other machines/devices/etc.

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hi onlyjus

 

Have you found a way to do this?

Thanks

0 Likes