How to obtain a letter of NC program name in post-processing

How to obtain a letter of NC program name in post-processing

Genericxg
Advocate Advocate
745 Views
6 Replies
Message 1 of 7

How to obtain a letter of NC program name in post-processing

Genericxg
Advocate
Advocate

How to obtain a letter in the NC program name by judging a statement or script. For example,

I want to get the letter marked (S) in the picture.

pp.jpg

0 Likes
Accepted solutions (1)
746 Views
6 Replies
Replies (6)
Message 2 of 7

Genericxg
Advocate
Advocate

This is the judgment of obtaining the last letter of the name

%p(NC Program Name)%.substring(%p(NC Program Name)%.length-1,%p(NC Program Name)%.length).toUpperCase() == "M"
What should I do to get the middle letter S

0 Likes
Message 3 of 7

Jonathan_Artiss19
Advisor
Advisor

What are the other variables? Or does the name only have an S or no S in it?

Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

0 Likes
Message 4 of 7

Genericxg
Advocate
Advocate

Yes.

The name has S.

0 Likes
Message 5 of 7

rafael.sansao
Advisor
Advisor
Accepted solution

This?

%p(NC Program Name)%.substring(2, 3).toUpperCase() == "S"

Rafael Sansão

OptiNC - www.optinc.tech

EESignature

Message 6 of 7

Genericxg
Advocate
Advocate

 

How to write it in the script?

0 Likes
Message 7 of 7

Genericxg
Advocate
Advocate

Thank you @rafael.sansao

0 Likes