I was actually a little intrigued by DOSLIB as I had never heard of it before!
Try the revised version of the code, it only needed a small change.
Just add the preset layer color after layer name in each element of the layercodes
[code](defun c:test (/ laycode lay_name fname oldlay path test);laycodes is a list of a drawing paths, layer names and preset colors.;Each list within laycodes contains 3 elements ( );The first element is the block path.;The second element is the layer name associated with the block;The third item in a list references the layer color ;Any blocks found to come from a particular path will be inserted on a preset layer;If the layer does not exist it will be created and a layer color assigned to ir;;eg;("K:\\CAD\\Block\\arrow" "A-------O2-" 1);A block inserted from "K:\\CAD\\Block\\arrow" will be inserted on layer "A-------O2-" which has a color 1;;Note the path is case sensitive (setq laycodes '( ("K:\\CAD\\Block\\arrow" "A-------O2-" 1);
Yes ...
I was looking into tool palletes.
problem is .. that in this office all architects or 90% of them use 19 inch screens.
With couple of toolpalletes it really require some screen.space.
besides I do not know how they work from a network server.
I tried once and I had bad experiance.
But maybe I did not try enough
I have my palettes set to AutoHide. That way they only take up a thin strip on the side of the screen.
The palette is just a place holder for the block not a container. You can drag a block from a drawing onto the palette. Then when you drag a block from that palette AutoCAD goes and gets the block definition from the drawing you used to create the block. That is why I have a few drawings in our symbols folder that contain the blocks I want. If I need to update a block it can be done in one drawing that is under my control, not a project specific GA that somebody else could modify. Also my drawing will not get renamed or moved - a real problem to palettes if the source file ceases to exist.