Name cad files from excel

Name cad files from excel

denis_phelan
Participant Participant
532 Views
2 Replies
Message 1 of 3

Name cad files from excel

denis_phelan
Participant
Participant
Hi,
How would you go about the following:

When I start a new construction job I need approx 70 cad files. They need to follow a job specific naming convention eg 4000-E101, 4000-E102. The naming convention changes depending on the client.

Is there a way of listing the file names in excel and get cad to read excel file and create all the files.

I generally have the file name listed on the layout tab and use the file name in drawing title also.

Another option
I have template files set up eg 3999-E101, 3999-E102 so really want to rename them to 4000-E101 , change their title in the title block and tab name.

What adds a bit of confusion is that some of the cad files have two layouts in them so layout 3999-E101 and 3999-E102 could be in the one cad file.

Where could I start or is this just too complicated to do.
0 Likes
Accepted solutions (1)
533 Views
2 Replies
Replies (2)
Message 2 of 3

dbroad
Mentor
Mentor
Accepted solution

What takes longer: naming the files or drawing the files?  Isn't this something you do a drawing at a time?  If you are just copying files from one job to another and want to add customer prefixes, just open the folder in windows, shift+right click, choose "command window" and enter the following in the command window: for (%a) in (*.dwg) do ren "%a" "<customerprefix>%a"

 

If you are copying files from one job to another and need to convert the prefix, put this batch file in an executable path on your disk.  Follow the same instructions as before except:  ChangePrefix "oldprefix" "newprefix" "*.dwg" at the command window

 

::ChangePrefix.bat  oldprefix newprefix  fileMask
@echo off
setlocal
for %%A in ("%~1%~3") do (
  set "fname=%%~A"
  call ren "%%fname%%" "%~2%%fname:*%~1=%%"
)

I personally don't believe in putting customer info in filenames.  I use the folder name to hold that. That way all the xrefs still work.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 3

denis_phelan
Participant
Participant
Thanks.

Drawing takes longer.

I'm trying to save myself a little time per file which adds up to a lot of time over the year.

Xrefs work fine as they are all relative path.

The reason for the customer specific file name is that they have a system that reads the drawing names to track changes in files.

I send them the cad file each time.
0 Likes