save document dynamo revit
# Enable Python support and load DesignScript library
import clr
# Import DocumentManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
# The inputs to this node will be stored as a list in the IN variables.
pathSave = IN[0]
# Place your code below this line
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
IsSaved = False
# Save active document
try:
doc.SaveAs(pathSave)
IsSaved = True
except:
pass
# Return
OUT = IsSaved