Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All.
Is there a way to close all files open in the invisible mode.
Or I just could clean up inventor memory.
Thaks
Solved! Go to Solution.
Hi All.
Is there a way to close all files open in the invisible mode.
Or I just could clean up inventor memory.
Thaks
Solved! Go to Solution.
For iLogic, you would have to have at least one visible document in order to run the rule.
Dim oApp As Inventor.Application = ThisApplication Dim oDoc As Document For Each oDoc In oApp.Documents oDoc.Close(TRUE) Next
This will close all documents in your Inventor session (tested working). I did not find a flag to use to identify Invisible documents.
If you could be sure that the display name of every document was unique, you could compare the DisplayName of the document to the collection ThisApplication.VisibleDocuments and skip the close if it matches. That might look something like this. (Not tested)
Dim oApp As Inventor.Application = ThisApplication Dim oDoc, vDoc As Document Dim isVisible As Boolean = False For Each oDoc In oApp.Documents For Each vDoc In oApp.Documents.VisibleDocuments If oDoc.DisplayName.Equals(vDoc.DisplayName) Then isVisible = True End If If Not isVisible Then oDoc.Close(True) End If isVisible = False Next Next
I hope this helps.