×
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

A Note in NX7.5 with a substring of <W@$SH_PART_NAME> without "_dwg1"

A Note in NX7.5 with a substring of <W@$SH_PART_NAME> without "_dwg1"

A Note in NX7.5 with a substring of <W@$SH_PART_NAME> without "_dwg1"

(OP)
Hi,

<W@$SH_PART_NAME> gave me drawing_part_name_dwg1 for example

I would like to have a note with "drawing_part_name" instead of "drawing_part_name_dwg1"

I found a grip programm in: http://www.eng-tips.com/viewthread.cfm?qid=329148 to obtain attribut FILENAME

then CTRL-E

full_name = ug_askPartAttrValue( "FILENAME" )

name_without_dwg1 = replaceString( nom_complet, "_dwg1.prt", "" )

It's a little bit complex

Is it possible to have an easy method ?

TIA

Regards
Didier Psaltopoulos
http://www.psi-cad.com

RE: A Note in NX7.5 with a substring of <W@$SH_PART_NAME> without "_dwg1"

If you are using the master model method and you want the name of the model (not the drawing), use <W@$SH_MASTER_PART_NAME>.

www.nxjournaling.com

RE: A Note in NX7.5 with a substring of <W@$SH_PART_NAME> without "_dwg1"

(OP)
Hi Cowski,

I already know that but I don't want to use this solution

Regards
Didier Psaltopoulos
http://www.psi-cad.com

RE: A Note in NX7.5 with a substring of <W@$SH_PART_NAME> without "_dwg1"

You can eliminate the grip program by using ug_askcurrentworkpart().

CODE

name = replacestring(ug_askcurrentworkpart(), "_dwg.prt", "") 

If/when the part name changes, you will need to run "update for external change" to update the expression.

www.nxjournaling.com

RE: A Note in NX7.5 with a substring of <W@$SH_PART_NAME> without "_dwg1"

(OP)
Hi Cowski,

It's OK, thanks a lot

Regards
Didier Psaltopoulos
http://www.psi-cad.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