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: 

VBNet code required for closing 'Open Documents in Session'

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
571 Views, 5 Replies

VBNet code required for closing 'Open Documents in Session'

Hi all,

Using VB.Net 2010 I am able to create/copy a new 'Standard' Project (silent operation).
My Standard Project has some sub-assemblies and parts. In the new 'Standard' Project some sub-assemblies are replaced with the new sub-assemblies using silent operation. The new sub-assemblies are also created/copied with VB.Net. When the replacements are done Inventor opens the new 'Standard' Project. All works fine no challenges here.

The challenge is that when I close the new 'Standard' Project there are still 'Open Documents in Session' and therefore I am unable to start the program again unless I close and restart Inventor. My guess is that I am not cleaning up Inventor's memory.

Can someone please point me in the right direction.
Many thanks in advance.

5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Hi again,

 

InvCompOcc = Nothing

InvComOccEnum = Nothing

docFile = Nothing

 

do not give me the result I am looking for, there are still 'Open Documents in Session'

Message 3 of 6
nagwani
in reply to: Anonymous

Hi There,

 

Have you tried Documents.CloseAll().

 

-Ishwar

Message 4 of 6
Anonymous
in reply to: nagwani

Hi Ishwar,


Thanks for your suggestion but I was a bit unclear. The program is not closing the assembly, it is the user who closes the assembly, that where this issue occures.

 

JJ

Message 5 of 6
amitnkukanur
in reply to: Anonymous

Hi,

 

Did you find the way to close all documents, because i am also dealing with same issue.

 

 

rgds

Amit

Senior Software Engineer
Message 6 of 6
santoshr0114
in reply to: Anonymous

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

Post to forums  

Autodesk Design & Make Report