Add additional (users) warnings and errors to protocol

Hello!

I have a several big scripts in CADINP included to SSD tasks. Theese scripts use a lot of IF-ELSE conditions and I wand to see the results of user paremeters in protocol of calculation.

For example, i calculate some coeff. and check it to refeference value. If it is bigger - I want to have an error in protocol (not in plb) - gren cross label and user warnnings.

Can i do this?

Hello Apex,
I’m interested in your topic.
Have you find out how to do it, or something similar?
It would be awesome to be able to print values or warnings in the protocol window, in order to know when it’s no longer useful to continue the run and it can be stopped, and to not have to wait until the report is created.

+prog template urs:82
head
let#flag 1

if #flag==0
txb ERROR
dummy text to make errror
else
txb no errors
endif

end

Thanks Mico!
I didn’t knew that! But unfortunately it doesn’t appear in the protocol window, only in the report :cry:.
I was looking for something that I can look while its running. Do you have any hint for this?
Thanks in advanced

I think, there is nearly no way.
Instead “txb error” you could trigger a programm-error (I think, you don’t want an error) or a -warning.
Therefore you should know/write a module-specific warning-instruction. Not funny.

Or you ask Sofistik, if they could spent such a general, user-controllable warning-instruction for all modules. (Generally you can take for instance “ECHO nonsens” as error-trigger.)

If printing in console is neccesary my idea is to use dbg# command:
+prog template urs:82
head
let#flag 0

if #flag==0
dbg#8
let#error ‘YOUR’
let#error ‘ERROR’
let#error ‘NUMBER’
let#error ‘123’
dbg#0
make error
else
txb no errors
endif

end

1 Like

That was it!
Thank you so much