Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created October 27, 2020 06:08
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/a8674dfefc9f5fe49ff03f9e54f8e698 to your computer and use it in GitHub Desktop.
Save chuongmep/a8674dfefc9f5fe49ff03f9e54f8e698 to your computer and use it in GitHub Desktop.
import re
def tolist(obj1):
if hasattr(obj1,'__iter__') : return obj1
else : return [obj1]
result = []
#Preparing input from dynamo to revit
items = tolist(IN[0])
for item in items:
result.append(re.sub(r" ?\([^)]+\)", "", item))
OUT = result
@chuongmep
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment