Thank you, MP, for a very comprehensive answer, which solved my problem and also introduced me to a lot of new concepts.
The only reason I was trying to do it with group codes is that's all I know. I learned lisp on Release 10 and never went beyond that. I was wondering what all this vla- stuff was. It sounded extra-terrestrial. But I'll definitely try to learn something about it now. That short code you wrote to show plotstyles is so much simpler than what I thought I'd have to do.
And I've always wanted to take a snapshot of group codes like that. Very nice! But I don't see anything in that code about selecting a layout. Data1 and data2 just look like variables. How did you get the two layouts in there?
What I've been doing till now is saving a file as DXF-text and then pawing through it with a word processor. Crude, yes, but that's where I found the 690. All the layouts I looked at had a 688 or 692 following the 70 if Display Plotstyles was off, and a 690 if it was on. That matches up with the bitcoding system you showed, since 512 + 128 + 32 + 16 + 2 = 690. I found that if I changed the 688's and 692's (only when preceded by 70, CR, and three spaces) to 690's using the word processor's Replace function, that did what I wanted. But I see now that I was unknowingly removing the bitcode 4 from the 692's. And of course a lot of time is wasted saving each file as DXF-text, and then opening it in Atlantis, and then saving it and going back to DWG format.
Again, many thanks for a solution and a quantum leap in my knowledge of lisp.