PDA

View Full Version : I'd like to create new layers, for the Images I have inserted...


droak
2006-03-13, 06:56 PM
I have inserted dozens of images, which have a common naming convention:

H728-4501 REV A_01
H728-4501 REV A_02
H728-4501 REV A_03

Which were inserted from:

T:ENG FILESDRAWINGSDRAWINGSCD to Server GOV DrawingsElectric BoatLET
Trunk DrawingsH728-4501 REV A_01.tif
T:ENG FILESDRAWINGSDRAWINGSCD to Server GOV DrawingsElectric BoatLET
Trunk DrawingsH728-4501 REV A_02.tif
T:ENG FILESDRAWINGSDRAWINGSCD to Server GOV DrawingsElectric BoatLET
Trunk DrawingsH728-4501 REV A_03.tif

I would like to have these images placed on their own layers and named the same as the file name.

Previously, I have:

(setq dir "T:ENG FILESDRAWINGSDRAWINGSCD to Server GOV DrawingsElectric BoatLET Trunk Drawings")

So I should be able to use DIR to name the layers.

1) Should I create a layer and make it current and then insert an images, and then continue that sequence until I have inserted the entire list of images?

2) Or, should I insert all the images and then move them to their newly created layers?

Darrell

.T.
2006-03-13, 07:24 PM
Hi Darrell,

Do you want the whole path in the layer name? The layer name is limited to 255 characters, so it will fit, but it requires stretching the layer dialog box or scrolliing sideways to be able to view them.

How about just adding:


(command "-layer" "m" (substr item 1 (- (strlen item) 4)) "")


in your foreach loop. This will set the layer to the filename of the image (without the path or extension) before the image is inserted.

droak
2006-03-13, 07:45 PM
That did exactly as I needed

Thank you