public void OpenSheetSet() { // User Input: editor equals command line // To talk to the user you use the command line, aka the editor Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; PromptStringOptions pso = new PromptStringOptions("\nHello Nadia! \nWhat Sheet Set would you like to open?"); pso.DefaultValue = @"C:\Users\rhale\Documents\AutoCAD Sheet Sets\Squid666.dst"; pso.UseDefaultValue = true; pso.AllowSpaces = true; PromptResult pr = ed.GetString(pso); // Get a reference to the Sheet Set Manager object IAcSmSheetSetMgr sheetSetManager = default(IAcSmSheetSetMgr); sheetSetManager = new AcSmSheetSetMgr(); // Open a Sheet Set file AcSmDatabase sheetSetDatabase = default(AcSmDatabase); //sheetSetDatabase = sheetSetManager.OpenDatabase(@"C:\Users\Robert\Documents\AutoCAD Sheet Sets\Expedia.dst", false); sheetSetDatabase = sheetSetManager.OpenDatabase(pr.StringResult, false); // Return the namd and description of the sheet set MessageBox.Show("Sheet Set Name: " + sheetSetDatabase.GetSheetSet().GetName() + "\nSheet Set Description: " + sheetSetDatabase.GetSheetSet().GetDesc()); // Close the sheet set sheetSetManager.Close(sheetSetDatabase); }
internal SheetSetMgr() { _sheetSetMgr = new AcSmSheetSetMgr(); }