×
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

CUSTOM PROPERTIES FOR FILE NAME

CUSTOM PROPERTIES FOR FILE NAME

CUSTOM PROPERTIES FOR FILE NAME

(OP)
Hi,
Company std for file names is as follows "xxxx_yyyy.slddrw". "xxxx" is our PN and "yyyy" is other PN seperated with underscore. I use custom properties for title block information. Our title block part number section is for "xxxx" only.

I want to have a prefix "$PRP:" for custom properties linked to file name but that will evaluate "xxxx" only.

Is there a way to accomplish this task? Hope this is clear.

Thanks in advance,
SWCADMAN

RE: CUSTOM PROPERTIES FOR FILE NAME

Try setting the part number to a value $PRP:"SW-File Name"
this will use the file name of the part.

I am assuming that you are wanting to use this in the custom properties of the solid not in the drawing

RE: CUSTOM PROPERTIES FOR FILE NAME

rporter is on the right track.  for example, we use:

xxxx-yyyy-nnn for (real - actual hardware) part names.  But drawings are only xxxx-yyyy and the -nnn bit is for different configurations. Ie: different (but similar) parts detailed on the same drawing.

For reasons I wil not go into, we have both SolidWorks part (file) names done as xxxx-yyyy-nnn and xxxx-yyyy with different configurations -nnn (go figure!!!)  Anyway it all worked out fine.

Actually now (note the tense of the last sentence)we use SmarTeam PDM and we have auto-annotation of Drawing formats done through it and some custom API's.   

I was - and he did. So at least I didn't get coal.....
OK, OK, It's a reference to my holiday sig. "Be naughty - Save Santa a trip..."

RE: CUSTOM PROPERTIES FOR FILE NAME

(OP)
$PRP:"SW-File Name" will evaluate the whole filename. I know this. I only want the first 4 characters of the file name to appear in the title block of the drawing  without having to create a custom property for "xxxx" and having to input this value for every drawing.

RE: CUSTOM PROPERTIES FOR FILE NAME

I don't recall any way for SW to do that.
The only way I think is possible, is to use an Excel based DT, and, with string functions, calculate the property (I am supposing that you have a xxxx_yyyy.sldprt). Then link the title block to that property.

Regards

RE: CUSTOM PROPERTIES FOR FILE NAME

(OP)
Thanks macPT. You gave me an idea to work on...when I come up with a string function that works, I'll post it.

Kind Regards,
SWCADMAN

RE: CUSTOM PROPERTIES FOR FILE NAME

Try LEFT(cell_with_xxxx_yyyy;4). That will return the first 4 left characters of string.

Good Luck

RE: CUSTOM PROPERTIES FOR FILE NAME

(OP)
The following excel string returns the first 4 characters of the file name regardless of directory location.

=LEFT(MID(CELL("filename"),SEARCH("",CELL("filename"))+1, SEARCH("",CELL("filename"))-SEARCH("[",CELL("filename"))-1),4)

Now all I have to do is get it to work with SW custom properties...

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