Well I tried it with file "241-242_MASTER FDN PLAN" and layer "COMPRESSOR_SHED_FDN"
Result is layer "241-242_MASTER FDN PLAN|COMPRESSOR_SHED_FDN"
Worked on ACAD2000 and 2004 with extnames set to 1 or 0
No problems.
PS this is without the QuoteItIfNecessary routine.
Yes, that is what nentsel returns. However when I re-use that layer name in the layer command in XRC.lsp the first space in the name is read as an enter and blows up. Hence the QuoteItIfNecessary routine. If you have another way around it, Please let me know.
BTW,
(if (= (length (last xrpick)) 1)
(setq xrlist (entget (car xrpick))) ; nested one deep
(setq xrlist ???????????????
)
(if (= (length (last xrpick)) 1)
(setq xrlist (entget (car xrpick))) ;then pull the list from the standard nentsel call.
(setq xrlist (entget (nth (- xrnested 2) (last xrpick)))) ;else last last our way back up to the top block definition
);end if
the second xrlist is for nested xrefs. I wanted to step back up to the top nested level, otherwise when selecting blocks created on layer 0 that are in an xref, I'd only change the color of layer 0. That's the first way I found around it.
Oh, I like the trapping non complex objects part and losing the xrnested variable. Thanks.