Code Red > .NET
File New
DBARANAS:
I wonder if anyone has ever made a new .dwg file by just passing the file name directly without user interaction.
I can't find anything in *.Autodesk.AutoCAD.ApplicationServices and was hoping to find a .net way or maybe a DllImport
I keep project names in a datagridview and want to do all the file chores within my app and lock things up a bit. :evil:
Glenn R:
Do it all the time.
DBARANAS:
--- Quote from: Glenn R on September 29, 2006, 07:46:41 AM ---Do it all the time.
--- End quote ---
I was thinking that this must be common
You can Open and Close a file like this so easy....but no .New
--- Code: --- ApplicationServices.Application.DocumentManager.CloseAll()
ApplicationServices.Application.DocumentManager.Open("c:\test.dwg", False)
--- End code ---
Chuck Gabriel:
I think you want the Add method of the DocumentCollection object (which DocumentManager is an instance of).
Alexander Rivilis:
--- Quote from: Dave Baranas on September 29, 2006, 05:53:22 AM ---I wonder if anyone has ever made a new .dwg file by just passing the file name directly without user interaction.
--- End quote ---
What about:
--- Code: ---Database db = new Database(true,false);
// Adding entities, etc.
//...
db.SaveAs(newDwgFileName,DwgVersion.Current);
--- End code ---
Or I've not understand question?
Navigation
[0] Message Index
[#] Next page
Go to full version