Same block reference but different colours

Same block reference but different colours

Anonymous
Not applicable
378 Views
2 Replies
Message 1 of 3

Same block reference but different colours

Anonymous
Not applicable

Suppose i have a block reference like chair..

And i have 20 chairs with same block reference type..

Is it possible to change  10 chair's colour to red and 10 chair's colour to green?

 

If we try to change the block reference colour in block editor manually..colour of all 20 chairs is being changed..

Is there a way to have different colours through .NET code as specified above...

 

 

0 Likes
379 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor

The easiest way of doing it is to compose the block definition by having all entities in the block on layer "0".

 

Then, you simply place the block references on different layers with different colour.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

JamesMaeding
Advisor
Advisor

@Anonymous

You can also set entity colors to "byblock" and then change the block color to whatever you want.

That way the blocks can all be on same layer.

The major downside is anyone xreffing the file cannot change the colors, they are not bylayer so choose carefully between layer control and hardcoded block colors.

 

I mention that more to show when byblock color is useful, but honestly I have never used it once. I live in xref world so hardcoding is almost never allowed in base files.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Likes