×
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

attribute from part of "part name"

attribute from part of "part name"

attribute from part of "part name"

(OP)
I need to have my own "callout" that is a part of the "name part"
com0000_000_P001_EXAMPLE.PRT
i need to create a attribute MYCALLOUT= 001
inside the part for all the part of the assembly.
i find this thread but i don't know how modify this.
thread561-365279: Refile and add attribute
thread561-316998: NX 6 ASSIGNING FIND NUMBER ATTRIBUTE AT DRAWING LEVEL
I need to do that to create some exploded view of some subassembly
without lose a univocal "callout"

NX 7.5 64bit
NX 9.0.3.4 MP4 64bit

www.studiotreccani.com

RE: attribute from part of "part name"

Do you want this attribute added at the component level so it can be unique in each assembly, or added at the part level?

com0000_000_P001_EXAMPLE.PRT

Is the callout location consistent within the part name? From your example, I'd guess it starts after "_P" and ends at the next "_". Is this always the case?

I see you have NX 7.5 and 9 listed in your signature, which version will this code be run on?

www.nxjournaling.com

RE: attribute from part of "part name"

(OP)
Hi,
1)To be clear, when after the command i will open the single "component/part"(example a "...screw.prt")
I'll need to see MYCALLOUT, so to see the univoque callout at every level of the
assembly (and decide later where to create the explode view)

2)Yes is always the case, keep in mind that a case of name could be COM0000_000_P001_PLATE.PRT

3)The best is both but if is not possible NX9

Thank in advance.

NX 7.5 64bit
NX 9.0.3.4 MP4 64bit

www.studiotreccani.com

RE: attribute from part of "part name"

Here is one way to do it in the expression editor:
  1. get the name of the current work part
  2. split the name at the underscore character
  3. get the third section of the part name
  4. remove the first character of the resulting string
In the picture below, I created 4 expressions and named them so they would show up in order. The names can be whatever you want; you could even combine them into a single (large) expression. If the part name changes, you will have to use "update for external change" to update the expressions (they won't update automatically).

Once you have the callout as an expression, you can create a callout attribute and link to this value. If you use the parts list command, you can set it up to use your attribute for the callout instead of the default value.

www.nxjournaling.com

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