Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Close Documents Documents opened by API

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
amitnkukanur
2689 Views, 5 Replies

Close Documents Documents opened by API

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
5 REPLIES 5
Message 2 of 6
santoshr0114
in reply to: amitnkukanur

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....

 

Regards
Santosh
Message 3 of 6
amitnkukanur
in reply to: santoshr0114

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
Message 4 of 6
marcosmateo
in reply to: amitnkukanur

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!

Message 5 of 6
marcosmateo
in reply to: amitnkukanur

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!

Message 6 of 6

hi, where did you find Documents.CloseAll



---
LTF

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

Post to forums  

Autodesk Design & Make Report