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: 

Listing project's folders/files using local/cached data

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
ltomuta
173 Views, 2 Replies

Listing project's folders/files using local/cached data

I'm drafting a quick script but the performance is extremely poor as attempting to list project's file structure leads to countless server side API calls.

 

Is there a way to
a) get the entire  file structure in one call (folders and/or files)?

b) tell the API that the local cache will suffice (without putting Fusion on offline mode, even if that would work) ? 

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

Hi @ltomuta .

 

DataHubs, DataFolders, and DataFiles can now be accessed faster than before by using the asArray method.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-1BB4CB50-4CBA-4FD6-9250-C2CC501B9058 

 

This is a good reference.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/access-file-tree-structure/m-p/10373517 

 

 

If you really need the local cache data, you can get the path to the folder with the following text command

Cache.path

 

I also used the path of the local cache folder with this add-in.

https://github.com/kantoku-code/Fusion360_Rescue_F3D/blob/main/Rescue_F3D/Rescue_F3D_core.py#L95 

Message 3 of 3
ltomuta
in reply to: kandennti

Excellent. This is exactly what I was looking for. Thank you!

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