Handling Errors in RevitPythonShell

Handling Errors in RevitPythonShell

Anonymous
Not applicable
1,018 Views
2 Replies
Message 1 of 3

Handling Errors in RevitPythonShell

Anonymous
Not applicable

i tried error handling structure as:

try:

  # my code

except Exception as e: print e

 Most of times there are transactions started but did not committed. How to catch and close all  current opened transactions ?

i tried Events.ProgressChangedEventArgs but can not figured out how to close transactions.

is there any way to use an external editor (IDE) likes Jupyter or VS code to code and test Python Script instead of RevitPythonShell ?

0 Likes
1,019 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks  a alot Jeremy. Could you point out an example written in Python for debug program ? While transactions command is simple, debug example is complicate and in C++ only.

 

0 Likes