×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

getting the attribut without the first 11 letters
2

getting the attribut without the first 11 letters

getting the attribut without the first 11 letters

(OP)
Hello i need your help,
is it possible to get an attribute in the drafting application in a table but get only for example the attribute value without the fiorst 11 letters. For example in the part is an attribute abc = 11111111111abcdef.
I want in the drafting application getting the attribute but without the first 11 letters. Íf yes, how is the code to make this?
Thanks

RE: getting the attribut without the first 11 letters

What version of NX?
Assuming NX 9 (will be similar in other versions), open the expressions dialog, switch the listed expressions to "attribute expressions", look for the expression that references your desired attribute (let's assume it is p1). Now make a new string expression with the formula subString(p1, 12,1000). The 12 tells the function to start with the 12th character in the given string, the 1000 can be any number equal to or larger than the number of characters in the given string.

www.nxjournaling.com

RE: getting the attribut without the first 11 letters

Cowski, Glad to see that you can use more characters in the substring command than are in the actual string. PTC Creo does not and errors on that command if the initial string lnegth is longer than the last character it is looking for.

A solution is to use the length() function in combination with the substring function.

name = substring(p1,12,length(p1)) will always return the 12th through the end of the p1 string.
If p1 is 11111111111abcdefghi, then name will be abcdefghi

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: getting the attribut without the first 11 letters

Nice - I wanted to use the length() function, but the wording of the function parameters made it sound like it would only work with a list.

www.nxjournaling.com

RE: getting the attribut without the first 11 letters

(OP)
Thank you. it works

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources