VERICUT Users' Forum

Due to relentless spammers, we are no longer automatically accepting new forum registrations. If you wish to register for this forum, please send an e-mail to:

You are not logged in.

#1 2018-05-02 22:56:17

Registered: 2014-06-05
Posts: 10

Parsing program message strings

Hello all,

I'm having trouble with something that should be easy, hoping someone has a solution.

Our post outputs tool messages that look like this: (T217 CEM). I want to parse the "217" and the "CEM" from this string for setting two variables.

I can read through the string character by character but this is very cumbersome. Is there an easier way to do this?

Thank you.


#2 2018-05-18 13:18:45

VERICUT Specialist
From: Le Mans, France
Registered: 2004-10-14
Posts: 130

Re: Parsing program message strings


You have GetCommentString which can get the comments into a variable, for example in sin840d.ctl it is configured in "Start Of Block processing" with OT="CommentString".
Once the comment is read, "(T217 CEM)" in your case, you can the function INDEX to find "(" and ")" and " " then use the function SUBSTR with the INDEX's found with INDEX function



Board footer