- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is it possible to use the SaveAsInventorDWG method to save an Inventor drawing (.idw or .dwg) without triggering a save dialog?
I am opening Inventor in the background with
inventorApp = (Application)System.Activator.
CreateInstance(invType);
inventorApp.Visible = false;
Then I open a drawing and try to save as an inventor drawing with
drawing.SaveAsInventorDWG(path, SaveCopyAs: true);
But I get a dialog asking if I'd like to save my changes even if I'm trying to save it as a completely different file. I've also tried
drawing.SaveAsInventorDWG(path, SaveCopyAs: false);
without luck. This doesn't happen with all drawings, but if Inventor is running in the background, it seems like no dialogs should appear if I'm not making any changes to the document. Not sure why trying to "save as" the inventor drawing to a different location dirties the document.
If I simply use the SaveAs method (instead of SaveAsInventorDWG), this problem is nonexistent. But it saves as an AutoCAD dwg with multiple files if there is more than one sheet.
Edit: I guess I could use the IsInventorDWG property and the System.IO.File.Copy method to simply copy .dwg files to a different location, but this doesn't help with .idw files.
Solved! Go to Solution.