Assign Colour of objects ByLayer

Hi

As per attached file, I have created a graph which selects all the objects within a layer and change to a new layer assigned. I can assign the objects under the new layer with a colour from colour palette. But I wanted to assign colour with ByLayer colour. Could you help me to assign colour ByLayer.

Hi @shashimanandhar1417,

I’m not sure which version of Civil 3D you are using, but if you’re able to update to Civil 3D 2025.1, then this is quite easy. You can simply plug in a string that says “ByLayer”.


In older versions, you can do a workaround with the Arkance Systems package. However you will need an object in your dwg that already has color by layer.

Not perse. You can also use the GetColorByACI value 256 for ByLayer or 0 for ByBlock.

In Civil 2D 2025.1 you will find these nodes in The Civil Nodes package.

1 Like

uuuu This is good to know. Thanks @Anton_Huizinga

Thank you all for all your helps and suggestions. I know you might have given the right solution but the node “Object.SetColor” from Camber Package worked for me.