I have a program that works well with Navisworks Simulate 2012. I am getting it to run with Navisworks Simulate 2014. I have gotten it to compile just fine. It uses one instance of Simulate to open a list of DWG files into a single model, then clears the document and does the same thing again with a different list. In Navisworks 2014, I get an access violation when trying to open a file after using the Clear method on the document object. The NWD i am opening before appending the DWG files is the same file for each list. It opens fine for the first list. The error occurrs the second time I attempt to open it. This works without error in Simulate 2012.
Is there somethign I need to do to the Document object to prepare it to open a document after a clear? Is attempting to open the same NWD after using Clear an issue?
I can put the function that opens and attaches files into a demo program and see if I get the same results.
I have created a demo and was not able to replicate the behavior. The program is complex and invovles database interaction to get the locations of the files. Not sure why the same code would not work. However, I was able to open the same file a second time after Clear() with my demo. I will have to figure out what is preventing the open from working in my non-demo program. Thank you for your help.