.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Plotting events: How to know if it was a preview or the actual plot itself?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
autocart
515 Views, 4 Replies

Plotting events: How to know if it was a preview or the actual plot itself?

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! 😉

4 REPLIES 4
Message 2 of 5
norman.yuan
in reply to: autocart

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

Drive CAD With Code

EESignature

Message 3 of 5
autocart
in reply to: 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

Message 4 of 5
norman.yuan
in reply to: autocart

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

Drive CAD With Code

EESignature

Message 5 of 5
autocart
in reply to: 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).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost