Save modification document , and make active document to unactive

Save modification document , and make active document to unactive

dor_r
Contributor Contributor
956 Views
6 Replies
Message 1 of 7

Save modification document , and make active document to unactive

dor_r
Contributor
Contributor

Hello,

I am trying save the active document when the file is in modification 

and i get this error  "Operation is not permitted when there is any open sub-transaction, transaction, or transaction group."

How can i prevent this error?

 

 

And how can i make my activeuidDocument to be unactive?

Thanks

 

 

0 Likes
Accepted solutions (1)
957 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Dor,

 

Thank you for your query.

 

It is a bit weird.

 

Normally, this message would only be produced if you have started a transaction in your external command and not terminated it.

 

You can terminate it either by committing it, or rolling back the changes.

 

Here is more on the topic of transaction handling:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.53

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 7

dor_r
Contributor
Contributor

Thanks for your answer

I found the open transaction.

About the second question 

How can I make the active document to unactive?

 

 

 

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk

Dear Dor,

 

Thank you for your update and appreciation.

 

I am glad it helped.

 

The only way to make a document inactive that I can think of is to activate another one instead.

 

This can be achieved, e.g., using OpenAndActivateDocument:

 

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 7

dor_r
Contributor
Contributor

First of all let me say thank you for the response.

If I want to close the active document

and open the main page of Revit

(i don`t want to open another one)

how can i do that?


0 Likes
Message 7 of 7

dor_r
Contributor
Contributor

I want to go to the main screen (see attached picture)

From the active documen 

How can i do that?

thanks

0 Likes