PDA

View Full Version : TIFF insertion to make multiple DWG files



grouch19
9th Mar 2012, 01:23 am
Hi All,

I have about 200 TIFF images (all Geo-refferenced)
I need to make a separate DWG file for each one which simply has the associated image attached.

Essentially my final outcome needs to be:
001.TIF
001.DWG

So I need the DWG file to be named the same as the TIFF.

I can import and save them one by one but this is pretty time consuming.

Any suggestions on how to do this automatically?

I have 3 sets of images to do this for and each is a different pixel size. I have completed one set and I was wondering if i could take the set that I have completed and somehow manipulate them to find the other group of images without having to open each DWG and attach the new image.

Any ideas would be appreciated!

Cheers

Emigrato
9th Mar 2012, 08:33 am
You can build (in a spreadsheet) a script file to achieve the goal "one tif to one dwg", then save it as text file e.g. C:\TIF2DWG.SCR on root of C disk, like this:

_new . _mapiinsert c:\001.tif _n _zoom _e _save c:\001 _close
_new . _mapiinsert c:\002.tif _n _zoom _e _save c:\002 _close
.
.
.
_new . _mapiinsert c:\200.tif _n _zoom _e _save c:\200 _close

When you have it, do the following steps:

1] open a brand new empty DWG
2] set FILEDIA to 0
3] command _SCRIPT
4] issue C:\TIF2DWG
5] enjoy the show
6] when it stops, set FILEDIA back to 1

Now you should have your 200 .DWG on C root, each with its own TIF inside.

Of course, the script supposes that your TIF files are on C:\ but you can easily edit the path with Notepad.

During the building of the .SCR file, to automatically generate the column 001.tif, 002.tif... 200.tif, you may use the old-school Dos command:
dir /b *.tif > grouch19.txt

http://novara.orangespace.pl/cadtutor/smile.gif

grouch19
13th Mar 2012, 03:08 am
Thank you so much Emigrato. This is exactly what I needed!!!!
Can not thank you enough for the help
Cheers :D