Delete Maskined Region from Revit Document using C# -


i want delete maskined region revit document using c#. error : modifying forbidden because document has no open transaction. exception: modificationoutsidetransactionexception

you have 2 options:

change transactionmode automatic @ class attribute

[transaction(transactionmode.automatic)] 

open transaction within command

transaction tr = new transaction(commanddata.application.activeuidocument.document); tr.start("command name here");  // code  tr.commit(); 

also posted here.


Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -