View Full Version : Using VB.Net 2005 with AutoCAD Map 3D 2007 - Db.SaveAs is causing problems
bweir
2007-02-12, 06:16 PM
Using VB.Net 2005 with AutoCAD Map 3D 2007.
Trying to save a drawing using the Autodesk.AutoCAD.DatabaseServices is giving me grief. The resulting files are sometimes corrupted or the viewports turn off. The code goes something like this.
Dim Db As New Autodesk.AutoCAD.DatabaseServices
Db.ReadDwgFile(FileName)
Db.SaveAs(DestFile, Autodesk.AutoCAD.DatabaseServices.DwgVersion.AC1015)
Bobby C. Jones
2007-02-13, 02:42 PM
Using VB.Net 2005 with AutoCAD Map 3D 2007.
Trying to save a drawing using the Autodesk.AutoCAD.DatabaseServices is giving me grief. The resulting files are sometimes corrupted or the viewports turn off. The code goes something like this.
Dim Db As New Autodesk.AutoCAD.DatabaseServices
Db.ReadDwgFile(FileName)
Db.SaveAs(DestFile, Autodesk.AutoCAD.DatabaseServices.DwgVersion.AC1015)
It sounds like the default Database constructor is building a default database. When you create the database tell it not to create a default database.
//C#
Database databaseFromFile = new Database(false, true);
bweir
2007-04-04, 07:55 PM
Thanks, I'll give it a whirl!
bweir
2007-04-12, 02:43 PM
Thanks Bobby that seams to have solved my problem.
Bobby C. Jones
2007-04-13, 09:33 PM
Thanks Bobby that seams to have solved my problem.
Glad that worked :-)
yshih
2010-05-12, 04:21 PM
Thanks a lot for the comments.
dbNew = new Database(false, true); Also fixed my problem as well.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.