Advance Steel Forum
Welcome to Autodesk’s Advance Steel Forums. Share your knowledge, ask questions, and explore popular Advance Steel topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit 2020 warning "A transaction or sub-transaction was opened but not closed"

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
4541 Views, 2 Replies

Revit 2020 warning "A transaction or sub-transaction was opened but not closed"

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?

2 REPLIES 2
Message 2 of 3
Sebastian_Eiche
in reply to: Anonymous

Maybe this is better to ask in the Revit Forum or not?

Smiley Very Happy


Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

Message 3 of 3
ChristianBlei
in reply to: Anonymous

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

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report