- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help?
I have the following Python script file....
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
# get active document
doc :adsk.core.Document = app.activeDocument
# get data folder
dataProject :adsk.core.DataProject = app.data.dataProjects[0]
rootFolder :adsk.core.DataFolder = dataProject.rootFolder
# exec saveAs
doc.saveAs('hoge', rootFolder, '', '')
msg = f'You have saved the active document to\n'
msg += f' project "{dataProject.name}" with the name "{doc.name}".'
ui.messageBox(msg)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Please see the attached picture.
Then you run the script it saves a file called 'hoge' to the "Assets" LIBRARIES (Ringed In Blue).
Does anybody know how to modify the script so that it saves a file called "hoge" to any of the folders in the
"Project Files" directory, for example "1040 - Darrens Test Folder" or "2000 - Cromar Platform - OLD" etc etc
Many thanks in advance!
Darren
Solved! Go to Solution.