检测 bgplot 或发布
在autocad 2014中,我使用以下方法来检测绘图是通过发布打开还是被绘制为背景图。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
}
}
现在是2016年,findfile返回值没有“ac发布”或“bgplo”,当发布大量绘图时,它们都被视为正常打开的文件。
**** Hidden Message ***** 不确定-你可能想看看Autodesk.AutoCAD.Publishing.AboutToBeginBackgroundPublishingEventArgs
干杯
页:
[1]