Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Task Scheduler with batch renaming of PartNo?

Status
Not open for further replies.

TheFerruccio

New member
Aug 16, 2012
36
I think I might need a macro for this, because I have done extensive searching and I have not found precisely what I want.

I have parts with the PartNo set to XXX-XXXX-M001 and I want to, say, rename them all to something like CAT-DOGS-M001, changing the first 8 characters in the string. I am not allowed to modify this computer in any way, so no programs other than what SolidWorks has to offer are at my disposal.

I have attempted setting things up with the task scheduler, but I was reading the tables wrong, and it seems that a row for the "File Name or Type" category does not correspond to that rows on the next table. It seems that the only thing that this supports is to name all the files the same thing for some given property, which is precisely what I do not want.

There are many parts that take a long time to open, so I am hoping that there exists some kind of way, internal to SolidWorks, where I can do this simple process. I really wish batch renaming accepted regular expressions.
 
Replies continue below

Recommended for you

I am not sure if I can use a pack and go, because I just want to modify the drawings at this point. I will do another pack and go to see if I can group the drawings together and link them up with the parts a little bit better.
 
I was basically hoping that I would not have to generate hundreds of new files doing this. Doesn't pack and go do just that? It recreates everything.
 
If I understand correctly, you have a custom property assigned to each file called PartNo. You want to globally change the value of the property. The new value will be a common string plus the original string.

This sounds like a perfect task for a macro. Look into the FixProperties macro on Lenny's site.

It may not be exactly what you are looking for, but it should be a good start. Additionally the PartNoProperty macro could be of some help. That macro was something Lenny assisted me with several years ago. It created a custom property and populated it with a portion of the file name.

-Dustin
Professional Engineer
Pretty good with SolidWorks
 
There are two things here:

1 Open an existing part, rename it and overwrite the existing one.

2 Existing part has a property with some value and you wan't to overwrite that.

So which one of it is you looking for (my guess is 1). Either of both of these can be done with macro.

Deepak Gupta
CSWE, CSWP, CSDA
SW 2012 SP4.0 & 2013 PR1
Boxer's SolidWorks™ Blog
SolidWorks™ Rendering Contest

 
You can do both with SlidWorks Explorer
You can edit properties
Rename parts, assemblies, drawings
reconnect references, replace ect.
 
Gupta65, both of your options look the same to me. I want to do, basically, that. I have a bunch of objects and drawings that have a certain property called PartNo or Drawing Number, and I want to rename the first part of the string for all those parts. If I cannot do that, I want to at least be able to do a batch rename, where each part and drawing has a different and unique name.

I went onto SolidWorks explorer, and I do not see how I can edit properties with what I see. It just looks like a list of files with columns named: Name, Size, Type, Date Modified, Attributes (this column is blank), Full path.
 
Question: Are you working with a vault system /PDM system?
Enterprise PDM?

 
On the right side of the Explorer screen you will have a tree search it and find the parts, assy and dwgs that you want to change.
if you need to change the name (file name)right click on your object, change name.
for your configurations i sent you some info.
go to SWX Explorer help

hopefully this helps you
don't kill the messenger if it doesn't!
 
 http://files.engineering.com/getfile.aspx?folder=cd45d86d-cc84-4033-83b7-e443b13f88ef&file=SWX_Explorer_02.jpg
TheFerruccio, both the options are different: One is renaming the file i.e. changing their file name (this will break the references with drawings and assemblies if not done properly) and other is simply change a property value inside the file (no reference will be broken).

Deepak Gupta
CSWE, CSWP, CSDA
SW 2012 SP4.0 & 2013 PR1
Boxer's SolidWorks™ Blog
SolidWorks™ Rendering Contest

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor