.NET

Reply
Contributor
s.jabs
Posts: 12
Registered: ‎08-15-2007
Message 1 of 2 (482 Views)

Project Navigator and Sheet Sets in AutoCAD Architecture 2010

482 Views, 1 Replies
01-12-2010 02:24 PM
Anyone have any success programatically updating the Sheet Set data with the Project Navigator configuration?

My office uses a custom program to create project directories, update our Intranet-based project list, and populate the Project Navigator .apj (text) file. However, I'm unable to edit the Sheet Set file (.dst) because it's in a compiled format. The Sheet Set file thus has the standard text entries in it, and whenever a user edits the project, he/she has to deal with that ugly "Project Navigator and the Sheet Set Manager are out of sync" prompt, which I'd like to avoid.

From within AutoCAD Architecture, I can access the Sheet Set data with Lee Ambrosius's COM code (see his AU 2009 CP318-4 class), but when I make changes this way, Project Navigator complains it cannot access the data as it may have been editted elsewhere. Closing Project Navigator and reopening it fixes this, but only when you do it manually (i.e.: a SendStringToExecute call doesn't work).

I've been fooling around with the AecProjectBaseMgd .NET library, but can't figure out a way to access the Sheet Set data from there.

So I'd either like to edit the .dst file from outside of AutoCAD, or figure out a way to update the data on certain events (such as after selecting a project in ProjectBrowser).
Contributor
Pavlukas
Posts: 17
Registered: ‎11-06-2007
Message 2 of 2 (482 Views)

Re: Project Navigator and Sheet Sets in AutoCAD Architecture 2010

01-19-2010 06:54 AM in reply to: s.jabs
Look library COM ->AcSmComponents17 1.0 Type Library

using ACSMCOMPONENTS17Lib
AecXProject 5.7 Type Library

ProjectBaseManager mgr = ProjectBaseServices.Service.ProjectManager;
string currentPath = mgr.CurrentProjectFileName.Location;
Project proj = mgr.OpenProject(OpenMode.ForRead, currentPath, mgr.CurrentProjectFileName.Name, true);
AcSmSheetSetMgr SheetSetMgr = new AcSmSheetSetMgr();
AcSmDatabase db = SheetSetMgr.FindOpenDatabase(currentPath + mgr.CurrentProjectFileName.Name + ".dst");
AcSmSheetSet SheetSet = db.GetSheetSet();
IAcSmEnumComponent comp = db.GetSheetSet().GetSheetEnumerator();
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.