Store files to document folder

Store files to document folder

Anonymous
Not applicable
543 Views
2 Replies
Message 1 of 3

Store files to document folder

Anonymous
Not applicable

Hello all,

 

I hope this question wasn't asked before, at least I couldn't find a post where this issue was discussed.

 

I made a script that generates a csv file. Now, I want to write the csv to the same folder as where my Fusion document is stored. How should I accomplish this?

 

Looking something like this:

        filename = currentfolder
        output = open(filename, 'w')
        output.writelines(csvStr)
        output.close()

Thanks!

0 Likes
Accepted solutions (1)
544 Views
2 Replies
Replies (2)
Message 2 of 3

goyals
Autodesk
Autodesk
Accepted solution

You need to upload the file to the current folder. May be you can try this API http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-1c9053e3-c33c-4d9c-b2fb-84a43e21f2e6. Thanks



Shyam Goyal
Sr. Software Dev. Manager
Message 3 of 3

Anonymous
Not applicable

THank you Goyals. I already came past that, and I have used that, but I thought there should be a smarter way..

 

Anyway, thank you!

0 Likes