Author Topic: detecting bgplot or publish  (Read 1425 times)

0 Members and 1 Guest are viewing this topic.

sybold

  • Newt
  • Posts: 62
detecting bgplot or publish
« on: February 02, 2016, 01:56:45 PM »
with autocad 2014 i used the following to detect if a drawing was being opened by publish or was being plotted as a background plot.
Code: [Select]
private void docs_DocumentCreated(object sender, DocumentCollectionEventArgs e)
{
string str = HostApplicationServices.Current.FindFile(e.Document.Name, e.Document.Database, FindFileHint.Default);
if (str.Contains("AcPublish") | str.Contains("BGPlot")) {
//' just plot drawing, no action
} else {
//' normal opening a drawing, show custom document management form
}
}

now with 2016, the findfile return value doesn't have the "acpublish" or "bgplot" in it, and when publishing a lot of drawings they all are being treated as a normal being opened file.

BlackBox

  • King Gator
  • Posts: 3770
Re: detecting bgplot or publish
« Reply #1 on: February 02, 2016, 07:07:45 PM »
Not sure - you may want to see what's included in Autodesk.AutoCAD.Publishing.AboutToBeginBackgroundPublishingEventArgs

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