Multi-Batch Home  |  PipeDbase-Utility Home  |

Multi-Batch  Newsletter
September 9 2013

Welcome to the Multi-Batch Newsletter. The purpose of this Newsletter is to pass on new routines and useful information when using Multi-Batch. There are also other tips which you may find useful, if not now then sometime in the future.

Newsletter Topics:


What's New in Multi-Batch 14
Rename Files in Windows Explorer using Excel and DOS
Multi-Batch - Using the AutoCAD GATTE command to change attributes
Multi-Batch - In AutoCAD 2014 - Change Xref Path Type
Multi-Batch - Using Reverse Quote ` to handle Wild Card characters
Multi-Batch - Sort the order of drawings by a field in the file name

*New Program Release*

CADWorx Database Utility

For all users of CADWorx Plant we have released a new program PipeDbase-Utility. This is a quick and easy way to check the integrity of the pipe models using the CADWorx Database. [Read More]


New Reduced Price

Full Licence:
Single Licence is now - $39
Site Licence: - [Read More]

Single Upgrade Licence - $16
Site Licence - [Read More]

If your company has previously purchased Multi-Batch you can upgrade to the latest version without having to install the old version

Multi-Batch Routine Help and other Useful Information

What's New in Multi-Batch 14

  • Updated for release AutoCAD 2014 & AutoCAD LT 2014
  • Routine creation wizards updated
  • Routines Added. Xref can now change path type between Full and Relative and vice versa
  • Updated to latest version of Installshield
  • Digital signature added

Rename Files using Excel and DOS

Have you ever needed to rename a folder full of files. An easy way to do this is by creating two columns in Excel, one of old file names and one of new file names, then using DOS to rename the files. The process can be broken into three stages. Stage 1 create a list of the files in the folder and open this in Excel, stage 2 create the formula with the DOS command Rename and stage 3 copy/paste the results into Notepad and run this in DOS mode to quickly rename all files.

Stage 1:
You need to get a list of the drawings that you want to rename, the easiest way is use the DOS command DIR. Open Notepad and add this line DIR *.DWG /B > DWGlist.csv save this file as DRG_LIST.BAT. Copy this file to the folder containing the drawings you want to get a list of and in Windows Explorer double click on the file DRG_LIST.BAT, this will create a file called DWGlist.csv, double click on this file and it will open in Excel. 
Creating the .BAT file saves you having to open the DOS Command Prompt and navigate through the folders using the CD (Change Directory) command.

Stage 2:
In Excel you now have a column containing the existing file names. In the second column add the names you want these files to be renamed too. In the third column we will use the DOS command Rename, the Excel formula is  ="RENAME " & CHAR(34) & A1 & CHAR(34) & " " & CHAR(34) &  B1 & CHAR(34) drag this down into the other cells. To see sample Excel file
Click Here.
The formula part CHAR(34) adds a semicolon into the formula allowing you to rename files with a space in the name.

This is what you will see in the Excel file

2610-PI-039.dwg            12-00175 167.dwg         RENAME "2610-PI-039.dwg" "12-00175 167.dwg"
2610-PI-038.dwg            12-00175-168.dwg         RENAME "2610-PI-038.dwg" "12-00175-168.dwg"
2610-PI-051.dwg            12-00175-169.dwg         RENAME "2610-PI-051.dwg" "12-00175-169.dwg"

Stage 3:
Open Notepad and Copy/Paste the Entire third column into it, Next save this file as DRG_LIST_Rename.BAT and in Windows Explorer copy it to the folder containing the set of drawings you want to rename, double click on this file and it will quickly rename all the files for you.

I would advise you to back up the files into another folder before you start.  

Multi-Batch - Using the AutoCAD GATTE command to change attributes

From AutoCAD help: Gatte - Globally changes attribute values for all instances of a specified block.

When you specify a new value for one of the attributes, it replaces all values with the same attribute tag name. Gatte also works through all tabs at once and if there is already a value assigned to the attribute, Gatte replaces it with the new value.

Since this is an express Tool command type in Gatte on the AutoCAD command line to make sure it is available. The routine below is used in Multi-Batch.

;Update all blocks of NAME/Attribute with same value
;Block Name
;Attribute Name
;Value to Set Attribute

Multi-Batch - Change Xref Path Type

In AutoCAD 2014 you can now batch change the Xref path type from relative to full and vice versa. 

;Changes Xref Path Type - Full to Relative
;Name of Xref to change path. Use * to select all
;Changes Xref Path Type - Relative to Full
;Name of Xref to change path. Use * to select all


Multi-Batch - Using Reverse Quote ` to handle Wild Card characters

This came up on the AutoCAD LT discussion group with the solution provided by David Tosh. The problem arose when the user wanted to batch change title block attributes. One of the attributes was named DEPT#, when trying to change this attribute the octothorpe symbol (#) is treated as a wild-card character and stops the routine. To resolve this you precede the wild-card character with a reverse quote (`) in our example you call the attribute tag DEPT`# in the Multi-Batch routine. The # is now, not interpreted as a wild-card character.

From AutoCAD help - List Layers Using Wild-Card Characters:
You can use wild-card characters in the Search box of the Layer Properties Manager to list layers by name. For example, if you enter 02* in the Search box, all layers that begin with the characters 02 are listed. The following wildcards are available:



# (pound)

Matches any numeric digit

@ (at)

Matches any alphabetic character

. (period)

Matches any non-alphanumeric character

* (asterisk)

Matches any string and can be used anywhere in the search string

? (question mark)

Matches any single character; for example, ?BC matches ABC, 3BC, and so on

~ (tilde)

Matches anything but the pattern; for example; ~*AB*matches all strings that don't contain AB

[ ]

Matches any one of the characters enclosed; for example, [AB]C matches AC and BC


Matches any character not enclosed; for example, [~AB]C matches XC but not AC


Specifies a range for a single character; for example, [A-G]C matches AC, BC, and so on to GC, but not HC

` (reverse quote)

Reads the next character literally; for example, `~AB matches ~AB

Note To find a layer name that contains a wild-card character, precede the character with a reverse quote (`) so that it is not interpreted as a wild-card character.


Multi-Batch - Sort the order of drawings by a field in the file name

In this example we have a drawings named 150-STM-5896-VP-65 and 100-STM-6898-VP-65 but we want them to sort the list by the fourth field, in this case 5896 and 6898.

  • From the Main Screen click on the Options menu
  • Click on Properties
  • Click on the Advanced tab
  • In the Sort By Field select to switch on the field sort option.
  • There is now a “Sort by Field” button on the main screen.
  • Select the field number and the name delimiter. For example you wish to sort the file name 350-150-STM-5896-VP-65 by the field 5896 then you would set the Field Delimiter to - and the Field Number to 4
  • Once you have the files listed and a routine assigned press the “Sort by Field” button. This creates another list with the selected fields which you can sort by clicking on the header

If you would like to provide feedback on what you would like to see in this Newsletter or any ways you would like to improve Multi-Batch, click on this link. Contact Us:

If you wish to subscribe to this Newsletter click on this link. Subscribe to Newsletter