示例#1
0
 def by_name_or_element_ref(cls, reference):
     """
     Mixin for collectible elements.
     This is to help cast elements from name, elemente, or element_id
     """
     if isinstance(reference, str):
         return cls.by_name(reference)
     elif isinstance(reference, DB.ElementId):
         return Element.from_id(reference)
     else:
         return cls(reference)
示例#2
0
 def siblings(self):
     """ Returns all assembly types """
     return [Element.from_id(t) for t in self._revit_object.GetSimilarTypes()]
示例#3
0
 def __iter__(self):
     """ Iterator: Wrapped """
     for element in self._element_id_set:
         yield Element.from_id(element)