Use a Fusion 360 Python script to use "SaveAs" to save a part to a specific folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Support,
Can anybody update the following script to allow me to use "SaveAs" to save a part to a specific folder?
import adsk.core, adsk.fusion, traceback
def run(context):
ui = adsk.core.UserInterface.cast(None)
try:
app :adsk.fusion.Application = adsk.core.Application.get()
ui = app.userInterface
doc :adsk.core.Document = app.activeDocument
dataProject :adsk.core.DataProject = app.data.dataProjects[0]
rootFolder :adsk.core.DataFolder = dataProject.rootFolder
PartFileName = "TEST-FILE"
doc.saveAs(PartFileName, rootFolder, '', '')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
I NEED TO USE SAVEAS TO SAVE A "TEST-FILE" TO THE FOLDER
Project Files > Projects > 1070 - Drive Shaft
I want, for test purposes, to use SaveAs to save a part to a folder called:
"Project Files" > "Projects" > "1070 - Drive Shaft"
Please see the attached picture.
Many thanks in advance!!
Darren