inest file giving wrong Document Type Enumerator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am writing a piece of iLogic to speed up our CNC nesting process. I want to be able to bulk save and rename the sheet assemblies you get after selecting multiple sheets in nesting and clicking the create 3D model button. I can find the unsaved assemblies but I am trying to detect and exclude the .inest file and its giving me some trouble.
I am currently in the write some code and make sure the computer is giving me the information I want stage of the program. I have the following code with several dummy files open:
Logger.Debug("Open Documents: " & ThisApplication.Documents.Count)
Dim oUnsavedDocs As New ArrayList
Logger.Debug("View Frames " & ThisApplication.ViewFrames.Count)
Logger.Debug("Views " & ThisApplication.Views.Count)
For Each oAppVeiw As Inventor.View In ThisApplication.Views
'For Each oDoc As Inventor.Document In ThisApplication.Documents
oDoc = oAppVeiw.Document
Logger.Debug(oDoc.DisplayName)
Logger.Debug("Dirty: " & oDoc.Dirty)
Logger.Debug("Type: " & oDoc.DocumentType.ToString)
If oDoc.FileSaveCounter<1 Then
oUnsavedDocs.Add(oDoc)
Logger.Debug("Times Saved: " & oDoc.FileSaveCounter)
End If
If oDoc.DocumentType = kNestingDocument Then
Logger.Debug("HELLO")
End If
Next
Logger.Debug("Size of oUnsavedDocs: " & oUnsavedDocs.Count)
Everything is doing what is expected, except the .inest file is logging as a kAssemblyDocumentObject. It was detecting the difference between parts, assemblies and drawings. For whatever inest files are not reading the proper kNestingDocument I would expect. Am I reading the documentation wrong or is this weird?
I can try and isolate the file another way but this should be easier.
thanks,