[CommandMethod("SheetViewWrite")]
using AXDBLib; //<----- this
public void SheetViewWrite()
{
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
// object acadDatabase = acDoc.Database.AcadDatabase;
AcadDatabase acadDatabase
= new AcadDatabase
(); //<----- lets see if this works
string ssFilePath = userInput("\nEnter Sheet Set Name: ");
Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
AcSmSheetSetMgr mgr
= new AcSmSheetSetMgr
(); AcSmDatabase db
= new AcSmDatabase
();
try
{
db = mgr.OpenDatabase(ssFilePath, true);
}
catch (System.Exception ex)
{
ed.WriteMessage(ex.ToString());
return;
}
AcSmSheetSet ss = db.GetSheetSet();
ss.Sync(acadDatabase); /// <--- Here
mgr.Close(db);
}