×
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

UG Versioning

UG Versioning

UG Versioning

(OP)
Hi,

I use the following versioning rules in my ug_english.def file, so my assemblies will load the latest version of part from defined search paths.

My question is what is meant by this command line? - Assemblies_VersionSubstitution:\\3a\\5
To what section of the PartNameFormat does the 3a and 5 refer?

My part numbers look like
fc_100200_1.prt < fc_100200.prt < fc_100200_a.prt

This old thread, thread561-122752: Versioning Table for As Saved, touched on versioning, but did not answer my question.  I have looked in UG Help, but it does not explain how parenthesis groups and sections relate.

Thanks in advance for your help.
Bil McLaughlin
Design Engineer
Rolls-Royce Corp.

!           ******************************************
!           **          PART NAME VERSIONS          **
!           ******************************************
!
! The following rules are used to describe the part names the system will use
! when searching for the version of a part for an assembly. The syntax for the
! rules follows the Regular Expressions used by the UNIX system.  Leaving the
! rules blank means the system does not recognize versions of files and will
! compare complete part names when searching for parts.
! Examples follow.
!
!
! This pattern specifies the general format of versioned part names.
!
Assemblies_PartNameFormat:(([a-z]+_)[0-9]+)((_([0-9]+))|(_([a-z]+))|)
!
! This value decides which portion of the Assemblies_PartNameFormat rule is the
! version independent portion of the name.  It consists of 2 back-slashes "\\"
! followed by the number of the section.
!
Assemblies_PartNameSubstitution:\\1
!
! This value is used to match all versions of a part in a directory.
! It consists of the  Assemblies_PartNameSubstitution  rule specifying the
! version independent portion of the name along with the section of the
! Assemblies_PartNameFormat  rule specifying the pattern for the part version.
!
Assemblies_PartNameMatch:\\1((_([0-9]+))|(_([a-z]+))|)
!
! This value decides which portion of the Assemblies_PartNameMatch rule
! is the version portion of the name.
!
Assemblies_VersionSubstitution:\\3a\\5
!
! This value decides the sorting order that will be used to determine the latest
! version of a file if several exist.
! Note: A valid option must be specified even if file versioning is not being used.
!
Assemblies_VersionType: ALPHANUMERIC

RE: UG Versioning

I haven't checked this for certain, but try without the \\ double backslashes.

Best Regards

Hudson

RE: UG Versioning

(OP)
Hudson,

The way I understand it the \\ designate which set of parenthesis to look at for version substitution (\\3\\5a). I just don't know how to correctly label the parenthesis sets in the part format -
??                ???          ??
1 2              34 5         6 7
(([a-z]+_)[0-9]+)((_([0-9]+))|(_([a-z]+))|)

And, what does \\5a refer to?

This may not be, so much a UG question as a syntax question.

Bil McLaughlin

RE: UG Versioning

Regular expressions, each group is (). From left to right \1 is the first group \2 is the second, and so on.

I would define what is the name rule in the first line define, then in the second line use \1 then add what the revision rules are. I can give an example if needed.

-Dave Tolsma
http://groups.google.com/group/NX_CAX/

RE: UG Versioning

(OP)
Dave,
An example would be most helpful.
Bil McLaughlin

RE: UG Versioning

([a-zA-Z]?[a-zA-Z]?[0-9]{5,8}(|[-dwg]))(|(_){1}([a-zA-Z]{1}))

\1

\1(|(_){1}([a-zA-Z]{1}))

\2


- The first line defines the entire valid naming convention. There are two main groups, one is the name, the other is the version.
- The second line \1 says to NX that this is the part name
- Third line uses block one (\1) then put the same text for the revision as defined in line one
- Fourth tells nx that  block 2 (\2) is the revision rule

I use something called Regex Coach to figure out the rules. Do a Google Search for it and you'll find it. The only issue is NX doesn't support many of the common Regex shortcuts, so need to be aware of that. I also put my range in as lower a-z or Upper A-Z which doesn't matter in NX but do it for future proofing in case they replace the regex solver, like they did after NX2 sometime.

hope this helps

-Dave Tolsma
http://groups.google.com/group/NX_CAX/

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