Hi everybody!
I want to react onto a sucessfully completed plot.
Unfortunately the preview fires the plotting events too. And since the plot can still fail also after a successful preview, I need to know in the event context if it was/is a preview plot or the normal plot itself. Unfortunately in no plotting event can I find access to this info. Did I overlook something? Any ideas?
Somewhere else I read about using a command-reactor with the commandEnded event listening for the "PLOT" command, but the commandEnded event is also triggered when I cancel the plot. So there I have the problem of identifying if it was successful or not.
Of course I *could* write my own whole plotting command completely from scratch, but I dont want to do that.
One other thought I also had, since I am only concerned about plotting to pdf, was to combine the commandEnded event with a system check for the file (if it was created/updated), but I still hope that this issue could be solved more easily and more reliably.
Please ... help ... Korben Dallas. Your Leeloo. Thx! 😉
Solved! Go to Solution.
Solved by norman.yuan. Go to Solution.
What event you are handling?
I'd assume you handle Autodesk.AutoCAD.PlotReactormanager's event. In this case, you just handle BeginPlot event. in the event handler, you test beginPlotEventArgs.PlotType to see what type of plotting begins: BackgroundPackaging, BackgroundPlot, Plot, or Preview.
Norman Yuan
Norman, you are super!!!!!
I thought that must be it when I first saw the beginPlotEventArgs.PlotType property. But the chm-help-file only comes up with the DatabaseServices.PlotType Enum, which is is something else. Under the PlottingServices namespace it does not appear in the chm as a Class or Enum. I finally now found it (with your help) in the context sensitive autocomplete feature of the C# ExpressEdition IDE.
Thank you, Norman!!!
But to Autodesk I want to say many "thanks" for making me spend almost a whole afternoon on such a stupid mistake in the chm file.
Regards, Stephan
I agree with what you said about the CHM help document coming with ObjectARX. There are simply too many mistakes, out-of-date information. I guess, in the tight economic situation, autodesk placed all available recourses to rush out new version each year and only tries seriously update its documents every a few Acad releases.
So, I always fire up VS and go to Object Browser first. Then go to the CHM help for possible more details (in most cases, no more details one can find there).
Norman Yuan
Object Browser is a good hint, thx. I have to start using it much more (actually I am not used to using it at all).