Thanks for staying with me dlanorh. I really do appreciate it. I see my mistake as you mentioned, my synat was incorrect I did "LAYER1","LAYER2","LAYER3" when I should have done "LAYER1, LAYER2, LAYER3". And I also needed to say what to happen to each grouping before setting out the next list of layers. Thank you for showing me what I had done wrong.
So these xrefs will change from project to project. You said that there is a way to select a specific x-ref then the match pattern can be altered to include a unique part of the x-ref file name. I would like feature as well. So in your code here:
(setq c_doc (vla-get-activedocument (vlax-get-acad-object))
c_lyrs (vla-get-layers c_doc)
);end_setq
And please correct me if this wrong. This where you set the variable "c_doc" to be able to grab document objects (such as color,layer name, linetypes) from the document we are in. In the next line you set c_lyrs to be the layer name from the (vla-get-layers c_doc). Right? And as you stated the code then "tests if the first part of the layer name matches the specific x-ref file. If it does it drops into the condition (cond) statement." And between these two parts there would be a need for another variable and that variable would have to set, by user input, so it could replace the
(if (wcmatch (strcase (vlax-get lyr 'name)) "PROJECT#-HC*");This should uniquely identify a single x-ref
So that "PROJECT#-HC" is what the user types in or more preferable clicking the xref in the drawing. So it checks everything before the "|" to make sure it is part of the specific xref. Then goes through the layers and checks to see if they match and makes the according adjustments. Something like that? Thanks again for keeping with me.