I hope I am using the correct name for the topic.
Here is a quick overview of what I am trying to accomplish:
- Open detached central model
- clean it out
- standardize according to internal guidelines
This is done through a series of small scripts which will be run consecutively through the dynamo player. Some scripts execute in less than two minutes. Some are a bit chunkier and require close to ten minutes. In any case, I would like to prompt the user to save the file after the better part of scripting has been executed.
I can do this with a postable command, but I would like to point to the directory, and pre-set the file name.
Is it possible to point to the directory and specify the file name in the save-as dialogue:
Here is the script I’ve hijacked:
import clr
clr.AddReference(‘RevitAPI’)
clr.AddReference(‘RevitAPIUI’)
import Autodesk
from Autodesk.Revit.UI import RevitCommandId
from Autodesk.Revit.UI import UIApplication
from Autodesk.Revit.UI import ExternalCommandData
clr.AddReference(‘RevitServices’)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
RunIt = IN[0]
if RunIt == True:
CmndID = RevitCommandId.LookupCommandId(‘ID_FILE_SAVE’)
CmId = CmndID.Id
uiapp.PostCommand(CmndID)
errorReport = ‘Success’
else:
errorReport = ‘Set IN[0] to true’
#Assign your output to the OUT variable
OUT = errorReport