Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created August 20, 2020 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/93bc80327dc9809fd83458b9188e441d to your computer and use it in GitHub Desktop.
Save chuongmep/93bc80327dc9809fd83458b9188e441d to your computer and use it in GitHub Desktop.
import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReferenceToFileAndPath(r"F:\revit\Dynamo\API\2.Debug Python Dynamo\SheduleToExcelDll\SheduleToExcelDll\SheduleToExcelDll\bin\Debug1\SheduleToExcelDll.dll")
import SheduleToExcelDll
from SheduleToExcelDll import Class1
#TransactionManager.Instance.ForceCloseTransaction()
TransactionManager.Instance.EnsureInTransaction(doc)
TestClass = Class1()
#TestClass.FilterSelect()
#TestClass.RotateAll()
#TestClass.CreateSweepWithMultipleLoops()
#TestClass.ExportAllSchedulesToOneExcel()
TransactionManager.Instance.TransactionTaskDone()
OUT = TestClass.test#dir(TransactionManager.Instance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment