Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CUSTOM PROPERTIES FOR FILE NAME 1

Status
Not open for further replies.

SWCADMAN

Mechanical
Jan 12, 2004
37
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
 
Replies continue below

Recommended for you

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

 
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..."
 
$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.
 
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
 
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
 
Try LEFT(cell_with_xxxx_yyyy;4). That will return the first 4 left characters of string.

Good Luck
 
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...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor