Any way to bring up a custom message box via post processor

Having problems with or questions about SheetCam? Post them here.
Post Reply
mancavedweller
Posts: 161
Joined: Tue Feb 25, 2014 6:53 am

Any way to bring up a custom message box via post processor

Post by mancavedweller »

Hi Les,

is there any way to have a custom messagebox displayed on screen during post processing, if a specific condition is found.

Example, something like this (I just made up "post.Messagebox"):

Code: Select all

if (Var > 10) then
         post.Messagebox("Your Var is greater than 10, post processing aborted")
end
And also if possible, is there any way to cancel post processing.
Is there any code I can add in my "if" statement that aborts the post processing.

So in a nutshell, an error message box pops up on screen and post processing is aborted.

Thanks,

Keith.
User avatar
Les Newell
Site Admin
Posts: 3660
Joined: Thu May 11, 2006 8:12 pm

Re: Any way to bring up a custom message box via post processor

Post by Les Newell »

what you want is:
post.Error("Your Var is greater than 10, post processing aborted")
This will print your error message in the post processor dialog and stop the post. If you want to warn that there could be a problem without aborting use post.Warning("You have been warned")
Both of these will force the post processor progress dialog to stay open so you can read the message(s).

If you want to print the value of a variable at the same time you can use something like this:
post.Error("Your Var is ", myVar, ". Maximum is 10, post processing aborted")
mancavedweller
Posts: 161
Joined: Tue Feb 25, 2014 6:53 am

Re: Any way to bring up a custom message box via post processor

Post by mancavedweller »

Thanks Les,

that is absolutely magic. That really baked my biscuit.

Can't believe I've had Sheetcam all these years and never delved into variables.

Keith.
Post Reply