This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# collection of Dynamo Python functions. | |
# credits: archi-lab, MEPover, Bimorph, Clockwork, Rhythm and many more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' Example of a Transaction Decorator function. | |
This allows you to create functions that make changes to the revit document | |
without having to repeat the code to start/commit transactions. | |
Just add the revit_transaction decorator and a transaction will be started before | |
your function is called, and then commit after the call.''' | |
from functools import wraps | |
from Autodesk.Revit.Exceptions import InvalidOperationException | |
def revit_transaction(transaction_name): |