Did you guys ever find an answer for this? It looks like I am after almost the exact same thing for different reasons. When we create a project it goes through a number of scrutinies by different members of the company as every project is different with different calculations needed. This means that they will refer to a page number and I must be able to navigate to that page number without counting down the drawings.
I could number the drawings as I add them but just as is says in this thread I often have to insert drawings into the middle of a project and require an automated re-numbering In the drawing names
Under Projects, there should be a 'Project Wide Update/Retag' icon. This will go through and update all the sheet numbers in a project. I believe that you would have to run the title block update to then transfer the new sheet number to the appropriate area.
You would still have to change the file name to reflect the change in sheet number, but is easier than having to also open each dwg to change the sheet number.
IF you use the Bulk Rename Utility ( http://www.bulkrenameutility.co.uk/Main_Intro.php ) just remember to close the project before you do the renaming.
Then before you open the project again, you have to remember to edit the wdp file and change the file names located at the end of the file. This is also where the drawing descriptions are kept.
The format is as follows
===Drawing Description 1
===Drawing Description 2
===Drawing Description 3
Relative path and filename
If there is no drawing description set, the line itself may not show in the wdp file.
The relative path is the path from where the wdp file is located to where the file is located. For example a dwg located in the same folder will just show as the file name where as a dwg in a sub directory will show as sub directory\filename.
Hi there I have since found a lisp that renumbers my filenames to an attibute value in the border. It was not written by me but as noted in the LISP by
Tony Tanzillo and modified by Tim Willey. The LISP is below. Copy into a notepad file and save as batchrename.txt , then change extension to lsp .
Change the A2 in (setq BlkName "A2") to the block name that contains the attribute value you would like the sheet renamed to, and change the SHT in (setq TagName "SHT") to the attribute you would like to use for the renaming. Seems to work ok if there are no errors, but stops dead if there are errors without notification. You need to ensure there are no files with the same attibutes with the same values in them (ie trying to rename two files with same filename), and ensure the block you are asking it to look for are in the files you need to rename. I am no expert in lsp so if you are able to improve its error checking capability please advise as it is most useful. LISP is below:
(defun c:BatchRename (/ *error* Directory-Dia BlkName TagName Dir dbxApp FileName RenameList )
(defun *error* (msg)
(if dbxApp (vlax-release-object dbxApp))
(setq dbxApp nil)
(defun Directory-Dia ( Message / sh folder folderobject result)
;; By Tony Tanzillo
;; Modified by Tim Willey
;; 16 Will let you type in the path
;; 64 Will let you create a new folder
0 ; This is the bit number to change.
(vlax-get-property folder 'Self)
(vlax-get-property FolderObject 'Path)
(if (/= (substr result (strlen result)) "\\")
(setq result (strcat result "\\"))
(setq BlkName "A2") ; update to your block name
(setq TagName "SHT") ; update to your attribute's tag value
(if (setq Dir (Directory-Dia "Select directory to rename."))
(if (< (atoi (setq oVer (substr (getvar "acadver") 1 2))) 16)
(vla-GetInterfaceObject (vlax-get-acad-object) "ObjectDBX.AxDbDocument")
(vla-GetInterfaceObject (vlax-get-acad-object) (strcat "ObjectDBX.AxDbDocument." oVer))
(foreach file (mapcar (function (lambda (x) (strcat Dir x))) (vl-directory-files Dir "*.dwg" 1))
(if (vl-catch-all-error-p (vl-catch-all-apply 'vla-Open (list dbxApp file)))
(prompt (strcat "\n *Error opening file: " file))
(vlax-for lo (vla-get-Layouts dbxApp)
(vlax-for obj (vla-get-Block lo)
(= (vla-get-ObjectName obj) "AcDbBlockReference")
(= (vla-get-Name obj) BlkName)
(foreach att (vlax-invoke obj 'GetAttributes)
(if (= (vla-get-TagString att) TagName)
(setq FileName (vla-get-TextString att))
(setq RenameList (cons (cons file FileName) RenameList))
(setq FileName nil)
(setq dbxApp nil)
(foreach i RenameList
(null (cdr i))
(not (vl-file-rename (car i) (strcat Dir (cdr i) ".dwg")))
(prompt "\n *Was not able to rename: " (car i))
I have saved this as a README.txt to advise how to use it Hope it is useful.
THE BATCHRENAME.LSP CHANGES THE AUTOCAD FILENAME TO THE SHT ATTRIBUTE VALUE.
ZIP TARGET PROJECT THROUGH PRINT UTILITY EXCLUDING DATABASE (DURING NORMAL USE REMOVING FILES IN THE ACE PROJECT MANAGER LEAVES THE FILE BEHIND IN PROJECT FOLDER. USING THE ZIP UTILITY ENSURES ONLY PROJECT FILES ARE ZIPPED UP WHICH CAN BE EXTRACTED TO THE O&M FOLDER)
UNZIP ABOVE ZIP FILE PROJECT INTO THE CORRECT O&M DRAWING FOLDER
TYPE APPLOAD IN ACE
CLICK STARTUP SUITE CONTENTS
CLICK ADD AND BROWSE TO WHERE BATCHRENAME.LSP IS SAVED
SELECT AND CLICK OPEN
YOU SHOULD NOT HAVE TO DO STEP 3 AGAIN UNLESS YOUR SETTINGS BECOME CORRUPT
CALL LISP BY TYPING BATCHRENAME
POINT TO CORRECT O&M FOLDER CONTAINING THE DWG'S
HIT ENTER AND DRAWINGS SHOULD RENAME TO THE SHEET VALUES.
OPTIONAL: USE BULK RENAME SOFTWARE TO ADD THE DRAWING NUMBER PREFIX (STW REQUIRES THIS)
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.
Upgrading to a 2015 product? Make sure to check these out 1st!