Navigation:  CADtools Tools > Batch Process's >

CADtools Ustn Batch Remap Rasters

Previous pageReturn to chapter overviewNext page

The CADtools raster file remapping tool works as follows:

 

1. The remapping defintions MUST be defined in the file C:\CADtools_Ustn\vba\RasterFileRemap.csv. You may need to create that directory and file.

2. The remapping definition is simply a CSV files with 2 columns, the 'Old Path' and the 'New path'.

3. The remapping can remap both particular files (i.e remap Raster-1.jpg to Raster-2.jpg) or remap all files in a particular directory (i.e. remap all files in the backgrounds\ directory to the same filename in the Xrefs\ directory). The directory paths can be either relative directories or absolute directories.

4. The remapping can be run against a single file using the keyin vba run [CADTools_Tools]RasterFile.Raster_ReMap_Path or against a batch of files using the 'Batch Process' tool and the 'CADtools_Raster_Remap.txt' command file. See CADtools_Ustn_Batch_Process

 

An example RasterFileRemap.csv file can be copied from P:\Program Files\Oasys\CADtools_Ustn\Common\Columbus\Settings\CADtools_Ustn\Vba

 

An example RasterFileRemap.csv file

The following example shows capabilities of remapping both files and directories

 

Raster_Remap_excel_example

 

Using the above remapping file, the following results are expected

 

All Files in the old file path will be remapped to the same file name of the same file type in the new file path.

 

All JPG's in the old file path will be remapped to the same file name in the new file path.

 

All JPG's in the old file path will be remapped to BMP's of the same file name in the new file path.

 

only the specified filenames in the old file path will be remapped to the same file name in the new file path, requires an entry on a separate line for every file you require to be remapped.

   OldFilepath\Filename1.jpg, NewFilepath\Filename1.jpg

   OldFilepath\Filename2.jpg, NewFilepath\Filename2.jpg

 

One file can be replaced with a new file name Note: the location, rotation, clips etc would remain the same as the old file

 

One file type can be replaced with a new file type ie JPG to BMP Note: the location, rotation, clips etc would remain the same as the old file

 

File in old file path can be remapped to a New file name & type in another directory Note: the location, rotation, clips etc would remain the same as the old file

 

 

Notes

 

1. Full path must be included in both the old and new columns

 

2. When remapping all files in a directory, you must include a *

 

3. If you don't want to remap all of the files that are in a directory you must make an entry on a separate line that include file path & file name

 


Direct link to this topic:

© 2013 Arup