I use Advance Steel API to model member and joint in Revit. Code is working fine in Revit 2019.2. Now I recompiled in Revit 2020 using new DLL, setup similar to Revit 2019.2. Program is executed, I can debug and tract. I got warning "A transaction or sub-transaction was opened but not closed, All changes to the active document made by External command will be discarded."
Exactly same code, work in Revit 2019, but not Revit 2020. Is there something special in Revit 2020 I need change?
In same exe, Revit related commands works fine, but not those related to Advance Steel API.
As all Advance Steel expert are here. I post it here instead of Revit Forum.
Any idea or suggestion?
Solved! Go to Solution.
Solved by ChristianBlei. Go to Solution.
Maybe this is better to ask in the Revit Forum or not?
Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph
If this information was helpful, please use the Accept as Solution function, this make it easier for other users
Hi,
there are changes to the API from AS2019 to AS2020.
A change is that you have explicitly commit a transaction now, otherwise the chnges will get descarded.
That is what the message is about.
So Do:
Documentmanager.LockCurrentDocument Using transaction= transactionmanager. startTransaction // do your stuff transaction.commit end Using DocumentManager.UnlockCurrentDocument
There is a knowledgebase article here about these changes.
HTH,
Christian Blei
Can't find what you're looking for? Ask the community or share your knowledge.