daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Apr 19th, 2018 22 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import clr
  2.  
  3. clr.AddReference("RevitServices")
  4. import RevitServices
  5. from RevitServices.Persistence import DocumentManager
  6. from RevitServices.Transactions import TransactionManager
  7. doc = DocumentManager.Instance.CurrentDBDocument
  8.  
  9. clr.AddReference("RevitAPI")
  10. from Autodesk.Revit.DB import *
  11.  
  12. fec = FilteredElementCollector(doc).OfClass(ViewSheetSet).GetElementIterator()
  13. SetList=[]
  14. fec.Reset()
  15. for f in fec:
  16.     SetList = [f for f in fec]
  17.     #Получаем все id
  18.     IdList = map(lambda x:x.Id, SetList)
  19. OUT = map(lambda x:x.Name, SetList)
  20.  
  21. #Удаляем все id в тразнакции
  22. TransactionManager.Instance.EnsureInTransaction(doc)
  23. for i in IdList:
  24.     doc.Delete(i)
  25. TransactionManager.Instance.TransactionTaskDone()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top