Reply

Cancelling a BeforeDocumentPrint Event in draft

Hi everybody,

 

I'm working in an addin to avoid printing a draft if one of the drawing views is outdated.

 

When the event is raised it checks the status of the drawing views and if one of them is outdated it shows a popup message advertising the user and gives him the option to continue or cancel.

 

If the user acepts the draft is printed normally.

 

How can I interrupt the process if the user select the cancel option?

 

I've read older posts in the forum that says there is no way (at post time) but I don't know if any of the 'gurus' has found a solution recently).

 

I'm working in VB.NET 2013

 

Thanks anyway.

 

 

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET
5 REPLIES

Re: Cancelling a BeforeDocumentPrint Event in draft

What I know is that there has nothing changed since these lasts posts.

You won't be able to interrupt the print process from inside the BeforeDocumentPrint event unless you kill the Edge.exe process ;-)

Having said this, doesn't mean that it is like that, it's just I don't know of any way to do that.

Re: Cancelling a BeforeDocumentPrint Event in draft

What I feared...

Thanks anyway, Martin
Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Cancelling a BeforeDocumentPrint Event in draft

In situations like this, my mind always goes back to my early days of programming and thoughts like "I wonder if I could take the printer offline to stop the print". 

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Cancelling a BeforeDocumentPrint Event in draft

Just taking the printer offline may not cause the print job to be executed immediatly, as with printer spoolers, the job will get printed as soon as you take the printer online again.

You will have to remove the print job from the queue before ;-)

Re: Cancelling a BeforeDocumentPrint Event in draft

Technically correct as always Martin. My point was, when faced with an API wall like this, my mind typically strays to it's "creative place". ;-)

Jason Newell
Applications Architect
www.jasonnewell.net