×
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

Remove old suffix when cloning an assembly
3

Remove old suffix when cloning an assembly

Remove old suffix when cloning an assembly

(OP)
When cloning an assembly, how could I get rid of the old suffix in the file name?
i.e.: abcd_rev01 -> abcd

Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V8.5 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks


RE: Remove old suffix when cloning an assembly

Good question, I am looking forward to see the responses.
But don't forget to specify what version of NX you are on.

RE: Remove old suffix when cloning an assembly

(OP)
Just upgraded to Version 9.0 and my signature too.

Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks


RE: Remove old suffix when cloning an assembly

Michael,

Under naming tab

set your default output directory

hit Define naming rule button

check Replace

base string abcd_rev01

with

add/replace/rename string abcd

Brian Marchand-Die Designer
http://www.armotool.com/
NX 9.0.2.5 / PDW
Dell Precision T7610 w/Xeon ES-2609
16G Ram - Nvidia Quadro K5000
Win 7 Pro x64

RE: Remove old suffix when cloning an assembly

(OP)
Brian, as we checked together it was not possible to replace the suffix totally.

In the example “abcd” contains letters and numbers and I don’t want “ _rev01” at all in the new project.

Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks


RE: Remove old suffix when cloning an assembly

3
Removing part of the existing file name is a bit beyond what the cloning tool can do, but you can accomplish it with only a little more work on your part.
  1. Start the clone operation, specify a log file for output, and turn on the 'dry run' option.
  2. Add your files as necessary.
  3. Define a naming rule (replace), enter "_rev" as the base string and "__" as the replace string. This will turn "abcd_rev01" into "abcd__01"; you don't have to use a double underscore as the replace string, but use something that will yield a unique string to find later.
  4. Execute the clone operation (double check that you are in dry run mode first).
  5. Open the clone log file in a text editor that supports regular expression search and replace. I prefer notepad++, but there are others.
  6. Change the line: "&LOG Default_Naming_Technique: NAMING_RULE" to "&LOG Default_Naming_Technique: USER_NAME" and delete the following line (the one that lists the naming rule originally used).
  7. Use search and replace, use "__\d{1,2}" for the search string and nothing for the replacement.
  8. Save the file, start another clone operation. On the "log files" tab, choose "load and apply existing log file", choose your edited log file and run the clone operation.

www.nxjournaling.com

RE: Remove old suffix when cloning an assembly

Whats the meaning of the \d{1,2} part of the search string?

Brian Marchand-Die Designer
http://www.armotool.com/
NX 9.0.2.5 / PDW
Dell Precision T7610 w/Xeon ES-2609
16G Ram - Nvidia Quadro K5000
Win 7 Pro x64

RE: Remove old suffix when cloning an assembly

(OP)
Thanks Cowski, I didn't try it; but sounds like it will work.

Most of yesterday I wasted by manually changing the files with "save as" and now have other work to catch-up with. Next time I will try it.

I feel that the NX developers have not thought of this situation. They have allowed to add/modify suffixes but not the delete.

Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks


RE: Remove old suffix when cloning an assembly

Brian,
The "\d" is regular expression shorthand for "any digit [0-9]". The {1,2} specifies the quantity of the previous search item; in this case it will look for at least 1 digit and at most 2 digits. There are other ways we could have used to get the same result; the more you know about your data, the better you will be able to craft an expression to find exactly what you want.

A good reference site for regular expressions is:
http://www.regular-expressions.info/

www.nxjournaling.com

RE: Remove old suffix when cloning an assembly

Awesome, thanks

Brian Marchand-Die Designer
http://www.armotool.com/
NX 9.0.2.5 / PDW
Dell Precision T7610 w/Xeon ES-2609
16G Ram - Nvidia Quadro K5000
Win 7 Pro x64

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