Skip to content

Commit

Permalink
Update element.py
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantondahmen committed Nov 9, 2020
1 parent 985c8b5 commit 4d002e9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions revitron/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,22 @@ def isNotOwned(self):
return str(revitron.DB.WorksharingUtils.GetCheckoutStatus(revitron.DOC, self.element.Id)) != 'OwnedByOtherUser'


def isType(self):
"""
Checks whether an element is a type or not.
Returns:
bool: True if element is a type.
"""
className = self.getClassName()
return (className.endswith('Type') or
className.endswith('Symbol') or
className == 'MEPBuildingConstruction' or
className == 'SiteLocation' or
className == 'BrowserOrganization' or
className == 'TilePattern')


def set(self, paramName, value, paramType = 'Text'):
"""
Sets a parameter value.
Expand Down

0 comments on commit 4d002e9

Please sign in to comment.