Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select only 5 characters

1 REPLY 1
SOLVED
Reply
Message 1 of 2
fg
Participant
513 Views, 1 Reply

Select only 5 characters

Hello, I wanted to know if it is possible to create a macro that makes me select only the first 5 characters of the name of the NC program. For example my program is called GG444_EXEMPLE_LAV and I want to select only GG444. It can be done?

Labels (2)
1 REPLY 1
Message 2 of 2
LasseFred
in reply to: fg

is taken from Macro Programming Guide page 78

Substrings:
The substring function returns part of the string. You can define where the substring starts and its length. The original string is unchanged.
The basic structure is:
string substring( string str, int start, int length)
For example:
PRINT = substring("Scooby doo", 2, 4)
The command window displays the result, ooby.

 

 

______________________
Lasse F.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report