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: 

Fusion 360 API Python "include file"

1 REPLY 1
Reply
Message 1 of 2
isocam
95 Views, 1 Reply

Fusion 360 API Python "include file"

Can anybody help?

 

Is it possible, in a Fusion 360 Python script, to use the "include file" command?

 

I have a very long Python script that I would like to break down into several smaller Python scripts and I want to use the "include file" command if possible.

 

For example....

 

include('Module01.py')

include('Module02.py')

include('Module03.py')

include('Module04.py')

 

etc

etc

 

Many thanks in advance!

 

Darren

1 REPLY 1
Message 2 of 2
tomjulier
in reply to: isocam

If it's in the same folder:

 

 

from .Module01 import *

 

 

To use a relative path e.g. ../Library/Module01.py:

 

 

from ..Library.Module01 import *

 

 

 

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