SHARE
TWEET

FlippedDoor

IvaSerge Mar 1st, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import clr
  2. clr.AddReference('RevitAPI')
  3. import Autodesk
  4. from Autodesk.Revit.DB import *
  5.  
  6. clr.AddReference("RevitServices")
  7. import RevitServices
  8. from RevitServices.Persistence import DocumentManager
  9. from RevitServices.Transactions import TransactionManager
  10.  
  11. doc = DocumentManager.Instance.CurrentDBDocument
  12.  
  13. mirroredDoors = list()
  14. normalDoors = list()
  15. outlist = list()
  16.  
  17.  
  18. # получение всех элементов категории OST_Doors кроме их типов
  19. doors = FilteredElementCollector(doc).\
  20.         OfCategory(BuiltInCategory.OST_Doors).\
  21.         WhereElementIsNotElementType().\
  22.         ToElements()
  23.        
  24. for door in doors:
  25.     doorHand = door.HandFlipped
  26.     if not(doorHand):
  27.         normalDoors.append(door)
  28.     else:
  29.         mirroredDoors.append(door)
  30.  
  31. outlist.append(normalDoors)
  32. outlist.append(mirroredDoors)
  33.  
  34. OUT = outlist
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