Close Documents Documents opened by API

Close Documents Documents opened by API

amitnkukanur
Collaborator Collaborator
2,900 Views
5 Replies
Message 1 of 6

Close Documents Documents opened by API

amitnkukanur
Collaborator
Collaborator

Hi,

 

I am doing a customization in inventor 2012 using vb.net as development language.

I am opening and closing the documents in background, in this process some of documents are left open and not closed as the result draughtsman is not able to change the project. Even though active document is closed inventor show few documents in extreme right bottom corner.

 

My problem is am tring to figure out how to close these active documents. I am trying to find out Active Document closing event if any.

 

Requesting to provide a idea to this problem on how i can close those documents which i opened using API in single shot

 

Cheers,

Amit

Senior Software Engineer
0 Likes
Accepted solutions (1)
2,901 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Accepted solution

Hi Amit,

 

Below three steps might help you out.

 

  1. You can have a List containing filename's which are opened using API and the close them by using Document.Close
  2. You can iterate through the Documents object and see if there are any visible documents, if not perform Document.CloseAll
  3. Rather than keeping all the documents which are opened using API in session, why don't you close them once your work is done.

You can use Documents.CloseAll to close all in a single shot.

 

What operations are performed by the documents which are opened using API also matters....

 

0 Likes
Message 3 of 6

amitnkukanur
Collaborator
Collaborator

Hi Santosh,

 

Thanks for reply.

 

I used the Documents.CloseAll to close all open documents in a single shot by creating a new button

 

 

Cheers,

Amit

Senior Software Engineer
0 Likes
Message 4 of 6

Anonymous
Not applicable

Hi amitk

 

i have the similar problem but i not have idea how to resolve, you may shared your code or your solution....please?

 

thank you!

0 Likes
Message 5 of 6

Anonymous
Not applicable

Hola amitk

 

tengo el mismo problema pero yo no tengo idea de cómo resolver, usted puede compartir su código o su solución .... por favor?

 

Gracias!

0 Likes
Message 6 of 6

Anonymous
Not applicable

hi, where did you find Documents.CloseAll

0 Likes