How to change BlockReference display color?

101 Views Asked by At

When I loaded the drawing (AutoCAD *.dwg), many blocks display as white color so they are not good for readability. I dump their information and I see Color = Color.Black and ColorMethod = ByLayer. Which mean they should show in black but instead they show in white. I try to Explode() then apply Color.Black but it does not work either.

1

There are 1 best solutions below

0
ilCosmico On

You need to loop through the Block entities and change the color there.

Beware the entity.ColorMethod property controls where the color comes from:

  1. byEntity uses the entity.Color.
  2. byLayer uses the layer color (the layer is identified by the entity.LayerName)
  3. byParent inherits the color of the BlockReference.