Hi All-

I just modified a routine I have that allows me to export all of the layers in a drawing with and their values (i.e., color, linetype, lineweight, plot style name, plot and description) to an external text file. I have another routine that I modified that will read the layer text file and recreate all of the layers. After some fussing, I have been able to get most of it to work except for the Plot Style name value. I am using the following code to add the value to a layer that already exists in the drawing.

(vl-load-com)
(setq lyrnam "A-wall" lyrpltstyl "BLACK")
(setq lyrobj (vla-item (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) lyrnam))
(vla-put-plotstylename lyrobj lyrpltstyl)

For some reason the above code will not work. Any help is greatly appreciated. Thank you.

Manuel A. Ayala