Xref color gray scale

Dear All,

Is there any way to get all attached xref in greyscale (both in model and layouts) without changing color of each xref layer.

The point is that if there a new layer added in my xref, this layer will not be in gray scale and I will have to change it manually every single time.

I am used to insert my xrefs on a dedicated layer (called xref_layer).

I expected the color of this layer will be propagated on all objects defined by layer in my xref.

What is the ggod way to handle this ?

TY for your help

Comments

  • quote: "... insert my xrefs on a dedicated layer (called xref_layer).
    ... the color of this layer will be propagated on all objects defined by layer in my xref.
    "

    I think that would work if everything in the xref is on layer 0. Can you put everything on that layer?

    If not, each Bylayer object will have the color of that layer in the main file. If there's no layer with that name in the main file, or if you bind the xref so that it has its own layer names, then it will have the color of that layer in the xref.

  • What about your dedicated layer xref_layer being given color 'ByBlock' (in Properties bar) after insertion?
    (No I think that doesn't work - so what's ByBlock for?). I know I've solved this one in the past.

  • ByBlock is an option for elements in a block. It assigns the block's properties to the element.

    It might be useful here, since an xref is like a block in some ways. Maybe if all the entities in the xref have ByBlock color, and the insertion of the xref has ByLayer color. I'm not sure. I don't use xrefs or ByLayer properties.

  • Assuming that the xrefs contains only entities with their colour set to bylayer (colours haven't been explicitly set), then you can quickly update the xref layer colours using the -LAYER command and a wild card naming filter to apply the chosen colour to just xref layers. You can also use this command to reset layer settings back to those in the xref.

    https://help.bricsys.com/en-us/document/command-reference/l/-layer-command

    Using some LISP you could create some macros to allow you to do this quickly

    (defun C:XrfColourGray ( / ColourNum)
    (princ "\nChange all loaded Xref layers to grayscale")
    (setq ColourNum 9) ; colour to set all xref layers to
    (command "._LAYER" "_C" ColourNum "*|*" "") ; Use a layer name filter to change the colour for just xref layers
    (prin1)
    )

    (defun C:XrfColourReset ( )
    (princ "\nReset all loaded Xref layer colours to defaults")
    (command "._LAYER" "_X" "_C" "*" "" "") ; Reset xref layer colour to defaults
    (prin1)
    )

    Jason Bourhill

    CAD Concepts Ltd

    cadconcepts.co.nz