×
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

Pulling a single number out of a filename?

Pulling a single number out of a filename?

Pulling a single number out of a filename?

(OP)
Hello-

Is there a way to have a file named 123-456R1 and then have the drawing sheet pull out the 1 for the revision block and the 123-456 into the revision number? We are not using PDM.

Thanks

Tim

RE: Pulling a single number out of a filename?

I don't know of any clean way without writing some kind of API. You should look into PDM.

Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP1.1 / PDMWorks 05
ctopher's home site

RE: Pulling a single number out of a filename?

Can be done in api or with design tables or custom properties.

The problem with doing it in api is you need some comanality to strip the other characters away, in other words the data "1" or x would always have to be the last characther or always follow the only R so you can apply some rules to finding it correctly.

I recomend setting a simple design table and creating the custom proptery $PRP@Rev then make your note 123-456R$PRP@Rev this will cover your drawing number, make the rev callout note just $PRP@Rev.  We use this method for many custom notes we control through the models file.

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