Author Topic: MgdDbg | Sheet Set Manager?  (Read 3228 times)

0 Members and 1 Guest are viewing this topic.

BlackBox

  • King Gator
  • Posts: 3770
MgdDbg | Sheet Set Manager?
« on: December 20, 2012, 08:57:00 PM »
In a previous thread Tony educated me to the fact that MgdDbg is not dynamic (as it could/should be), so i was wondering if anyone has worked with enhancing it (MgdDbg) to also handle the Sheet Set Manager API?

Not that I couldn't use it for snooping information to use in efficiency initiatives of our own, but I am asking now as I am attempting to diagnose the cause of the bust in Civil 3D's Plans Production Tools... Specifically how the relationship between reportedly dynamic Matchline Labels for View Frame Groups, breaks when manually revising Sheet information via SSM.

TIA
"How we think determines what we do, and what we do determines what we get."

Jeff_M

  • King Gator
  • Posts: 4095
  • C3D user & customizer
Re: MgdDbg | Sheet Set Manager?
« Reply #1 on: December 20, 2012, 10:11:20 PM »
There is no managed API for SSM, it's all COM, so I don't think the MgdDbg will help with that. And good luck with the PPT/SSM relationship. I jumped through all kinds of hoops with Autodesk support about this, with the final answer being "That's something we don't expose and is pretty convoluted even from our perspective" (paraphrased). Something about ObjectIds/Handles being stored that require a certain order of operations. Renaming sheets/layout tabs breaks that order.

I think the email exchange I had with them is on my old PC, as I didn't see it in a quick look on this one. I'll see if I can locate it over the weekend.

BlackBox

  • King Gator
  • Posts: 3770
Re: MgdDbg | Sheet Set Manager?
« Reply #2 on: December 21, 2012, 01:55:16 AM »
As always, thanks for the excellent information/clarification, Jeff.

While trailing your lead with this issue, it's at least good to know that I am on the right track. I know that SSM hasn't been improved for many years, but only having COM access is also pretty disappointing... Yet explains why FDOT spent thousands of taxpayer dollars to build a Sheet Set Organizer app that sits on top of multiple Sheet Sets, rather than simply add the nested sheets in appropriate sub-sets (they're Microstation/VBA developers).

This issue aside, I'm less than impressed with C3D's PPT in general.
« Last Edit: December 21, 2012, 08:33:47 AM by RenderMan »
"How we think determines what we do, and what we do determines what we get."

Tortiz

  • Guest
Re: MgdDbg | Sheet Set Manager?
« Reply #3 on: December 21, 2012, 03:47:55 PM »
I've been looking into coding some tools to make the plan and profile production tools in Civil 3D work better for me but I keep running into a brick wall with the API..... :-(

BlackBox

  • King Gator
  • Posts: 3770
Re: MgdDbg | Sheet Set Manager?
« Reply #4 on: January 15, 2013, 12:18:17 PM »
In my effort to resolve an issue in this thread... How would I go about allowing MgdDbg to monitor Civil 3D specific events, etc. (loaded question, I know)?  :?

"How we think determines what we do, and what we do determines what we get."

BlackBox

  • King Gator
  • Posts: 3770
Re: MgdDbg | Sheet Set Manager?
« Reply #5 on: January 15, 2013, 06:35:38 PM »
In my effort to resolve an issue in this thread... How would I go about allowing MgdDbg to monitor Civil 3D specific events, etc. (loaded question, I know)?  :?

Am I correct that I would have to go through AecBaseMgd.dll, and AeccDbMgd.dll using IlSpy, and basically hard-code the Civil 3D specific Events, etc. as needed essentially making an AeccMgdDbg project, and then recompile?

Never mind that this would still need to be manually updated for each additional version thereafter.
"How we think determines what we do, and what we do determines what we get."

Jeff H

  • Needs a day job
  • Posts: 6150
Re: MgdDbg | Sheet Set Manager?
« Reply #6 on: January 15, 2013, 08:06:12 PM »
Here is how its done with MgdDbg.
Code - C#: [Select]
  1.  
  2.  public void
  3.         EnableEvents(Database db)
  4.         {
  5.             db.AbortDxfIn += new EventHandler(event_AbortDxfIn);
  6.             db.AbortDxfOut += new EventHandler(event_AbortDxfOut);
  7.             db.AbortSave += new EventHandler(event_AbortSave);
  8.             db.BeginDeepClone += new IdMappingEventHandler(event_BeginDeepClone);
  9.             db.BeginDeepCloneTranslation += new IdMappingEventHandler(event_BeginDeepCloneTranslation);
  10.             db.BeginDxfIn += new EventHandler(event_BeginDxfIn);
  11.             db.BeginDxfOut += new EventHandler(event_BeginDxfOut);
  12.             db.BeginInsert += new BeginInsertEventHandler(event_BeginInsert);
  13.             db.BeginSave += new DatabaseIOEventHandler(event_BeginSave);
  14.             db.BeginWblockBlock += new BeginWblockBlockEventHandler(event_BeginWblockBlock);
  15.             db.BeginWblockEntireDatabase += new BeginWblockEntireDatabaseEventHandler(event_BeginWblockEntireDatabase);
  16.             db.BeginWblockObjects += new BeginWblockObjectsEventHandler(event_BeginWblockObjects);
  17.             db.BeginWblockSelectedObjects += new BeginWblockSelectedObjectsEventHandler(event_BeginWblockSelectedObjects);
  18.             # if !ACAD2007
  19.             Database.DatabaseConstructed += new EventHandler(event_DatabaseConstructed);
  20.             # endif
  21.             db.DatabaseToBeDestroyed += new EventHandler(event_DatabaseToBeDestroyed);
  22.             db.DeepCloneAborted += new EventHandler(event_DeepCloneAborted);
  23.             db.DeepCloneEnded += new EventHandler(event_DeepCloneEnded);
  24.             db.DwgFileOpened += new DatabaseIOEventHandler(event_DwgFileOpened);
  25.             db.DxfInComplete += new EventHandler(event_DxfInComplete);
  26.             db.DxfOutComplete += new EventHandler(event_DxfOutComplete);
  27.             db.InitialDwgFileOpenComplete += new EventHandler(event_InitialDwgFileOpenComplete);
  28.             db.InsertAborted += new EventHandler(event_InsertAborted);
  29.             db.InsertEnded += new EventHandler(event_InsertEnded);
  30.             db.InsertMappingAvailable += new IdMappingEventHandler(event_InsertMappingAvailable);
  31.             db.PartialOpenNotice += new EventHandler(event_PartialOpenNotice);
  32.             db.ProxyResurrectionCompleted += new ProxyResurrectionCompletedEventHandler(event_ProxyResurrectionCompleted);
  33.             db.SaveComplete += new DatabaseIOEventHandler(event_SaveComplete);
  34.             db.SystemVariableChanged += new Autodesk.AutoCAD.DatabaseServices.SystemVariableChangedEventHandler(event_SystemVariableChanged);
  35.             db.SystemVariableWillChange += new Autodesk.AutoCAD.DatabaseServices.SystemVariableChangingEventHandler(event_SystemVariableWillChange);
  36.             db.WblockAborted += new EventHandler(event_WblockAborted);
  37.             db.WblockEnded += new EventHandler(event_WblockEnded);
  38.             db.WblockMappingAvailable += new IdMappingEventHandler(event_WblockMappingAvailable);
  39.             db.WblockNotice += new WblockNoticeEventHandler(event_WblockNotice);
  40.             # if !ACAD2007
  41.             Database.XrefAttachAborted += new EventHandler(event_XrefAttachAborted);
  42.             #endif
  43.             db.XrefAttachEnded += new EventHandler(event_XrefAttachEnded);
  44.             db.XrefBeginAttached += new XrefBeginOperationEventHandler(event_XrefBeginAttached);
  45.             db.XrefBeginOtherAttached +=new XrefBeginOperationEventHandler(event_XrefBeginOtherAttached);
  46.             db.XrefBeginRestore += new XrefBeginOperationEventHandler(event_XrefBeginRestore);
  47.             db.XrefComandeered += new XrefComandeeredEventHandler(event_XrefComandeered);
  48.             db.XrefPreXrefLockFile += new XrefPreXrefLockFileEventHandler(event_XrefPreXrefLockFile);
  49.             db.XrefRedirected += new XrefRedirectedEventHandler(event_XrefRedirected);
  50.             db.XrefRestoreAborted += new EventHandler(event_XrefRestoreAborted);
  51.             db.XrefRestoreEnded += new EventHandler(event_XrefRestoreEnded);
  52.             db.XrefSubCommandAborted += new XrefSubCommandAbortedEventHandler(event_XrefSubCommandAborted);
  53.             //see why this is commented out below in the DisableNotifications()
  54.             //db.XrefSubCommandStart += new XrefSubCommandStartEventHandler(event_XrefSubCommandStart);
  55.         }
  56.  

You could use reflection to run through and grab events but that would probably be more suited for a tool like MgdDbg, but for applications just subscribe to events needed.

BlackBox

  • King Gator
  • Posts: 3770
Re: MgdDbg | Sheet Set Manager?
« Reply #7 on: January 16, 2013, 12:35:08 AM »
Thanks Jeff, I downloaded the source code project some time ago... I'll make a copy and start digging through Civil 3D references.
"How we think determines what we do, and what we do determines what we get."

Jeff H

  • Needs a day job
  • Posts: 6150
Re: MgdDbg | Sheet Set Manager?
« Reply #8 on: January 16, 2013, 01:48:29 AM »
Sorry to get off topic here but is Civil docs as bad ACA and MEP? I gave up on them and haven't even checked 2013 but 2012 they were still shipping 2010 version which was nothing but a list of the methods headers.

BlackBox

  • King Gator
  • Posts: 3770
Re: MgdDbg | Sheet Set Manager?
« Reply #9 on: January 16, 2013, 10:36:24 AM »
Sorry to get off topic here but is Civil docs as bad ACA and MEP? I gave up on them and haven't even checked 2013 but 2012 they were still shipping 2010 version which was nothing but a list of the methods headers.

No worries; I cannot find it in a quick search, but there was a thread that had Tony, Kean, yourself (I believe), where Jeff_M corrected my complaint about Civil 3D Documentation to Kean, saying that it (C3D Docs) have been more and more comprehensive with each release (paraphrasing)... Perhaps that is due to Civil 3D being a newer product line, and each release has so many new API's exposed? *not sure*
"How we think determines what we do, and what we do determines what we get."