Removing the last 2 charters of a part attribute
Removing the last 2 charters of a part attribute
(OP)
Is the are was to remove or replace the last 2 charters of a part attribute.
For example in Excel I can use the SUBSTITUTE command like this:
=SUBSTITUTE("DRAWING_D10",10,20)
and the value in the cell would be DRAWING_D10
I am using NX8.5
For example in Excel I can use the SUBSTITUTE command like this:
=SUBSTITUTE("DRAWING_D10",10,20)
and the value in the cell would be DRAWING_D10
I am using NX8.5





RE: Removing the last 2 charters of a part attribute
In GRIP, you could read the attribute, then use substr to get a substring of the attribute, add your new characters and then resave the attribute to the file.
I'm sure it can be done in a journal, too.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Removing the last 2 charters of a part attribute
www.nxjournaling.com
RE: Removing the last 2 charters of a part attribute
I think this is just what I needed. I went
Expressions is set the TYPE = STRING
Then tried this:
charReplace("YYYnXX" , "n", "-")
The expression now = YYY-XX
I have to play with it some more, but this was just what I was looking for.
Thanks, cowski!