Change hatch transparency to block library

Change hatch transparency to block library

DaveBarlowSmith
Enthusiast Enthusiast
3,667 Views
25 Replies
Message 1 of 26

Change hatch transparency to block library

DaveBarlowSmith
Enthusiast
Enthusiast

Hello,

We have a furniture block library of hundreds of items.

 

Each block will be placed on a "Furniture New" or "Furniture Existing" layer.

Each block uses the following layers:

"Furniture Hatch" - set by block, Transparency is currently set by layer.

"Furniture Outline" - Either set by layer for the external lines and Colour 9 for internal lines.

 

What I want to do is have anything on "Furniture Existing" to be transparent, however to make it work I have to edit the block and change the hatch transparency from ByLayer to ByBlock.

 

Is there a way to batch edit the hatch properties, or will I have to edit every block individually?

 

Thanks

 

Dave

0 Likes
Accepted solutions (2)
3,668 Views
25 Replies
Replies (25)
Message 2 of 26

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> Is there a way to batch edit the hatch properties, or

>> will I have to edit every block individually?

Are all block-definitions in one drawing or are that all separate dwg-files?

If all is in one dwg-file then upload the file and I convert the hatches from bylayer to byblock.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 26

DaveBarlowSmith
Enthusiast
Enthusiast

Alfred,

 

There are 2 main block libraries, but a number of smaller libraries that I use to store unfinished, or temporary blocks.

Also the example I gave was simplified, I think there are 2 hatch layers which would require changing.

If you could look at the 2 main ones that would be great.

Do you have some sort of routine that batch changes the transparency?

 

Kind regards

 

Dave

0 Likes
Message 4 of 26

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> If you could look at the 2 main ones that would be great.

Each one is one drawing with multiple block-definitions or is every block a separate dwg?

 

>> Do you have some sort of routine that batch

>> changes the transparency?

It's written in a few minutes as long as the rules are clear.

 

- alfred -

 

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 26

ChicagoLooper
Mentor
Mentor

If you put the "furniture" on a layer dedicated to just the new furniture blocks, you can give that new layer transparency. In the Layer Properties palette, go to the column next to Lineweight and you'll see a column named Transparency. The default value is zero, or no transparency. The highest is 100, or completely clear. Change the value from 0 to 50, or thereabouts. When you plot, check the Plot transparency box in the Plot options sections of the Plot dialog.

Chicagolooper

EESignature

0 Likes
Message 6 of 26

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> If you put the "furniture" on a layer dedicated to just the new furniture

>> blocks, you can give that new layer transparency

That would make the whole block transparent, not just the hatch within the block.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 7 of 26

ChicagoLooper
Mentor
Mentor

Yes, absolutely it would. It probably would look a lot better too. Afterall, it's proposed furniture, not existing. If the outlines are solid and the hatch transparent, furniture would look half existing and half proposed, and that's confusing.

Chicagolooper

EESignature

0 Likes
Message 8 of 26

DaveBarlowSmith
Enthusiast
Enthusiast

I've just had a quick test changing the "Furniture Existing" layer to 90% transparent. See attached pdf.

 

The yellow chair is set to Furniture Existing while the pink chair is Furniture New.

There is no difference in transparency.

I believe I will have to change the hatch inside the block to transparency ByBlock, so back to Alfred's suggestion.

But I think you are correct regarding the transparency of the outline, that also should change.

 

Thanks for your help

0 Likes
Message 9 of 26

ChicagoLooper
Mentor
Mentor

Are you printing? Did you check the box Plot transparency in the plot dialog? If you forgot to check that box it won't honor the transparncy. And 90% is super clear, lower it somewhere between 40-60%.

Chicagolooper

EESignature

Message 10 of 26

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

@ChicagoLooper

>> There is no difference in transparency.

If you insert a block and you want to have that block-insertion displayed with transparency you need:

  • either ... set the objects inside the block-definition to transparency = byBlock
  • or ... have the objects inside the block-definition set to layer 0

 

The OP stated that he has the hatch on a layer "Furniture Hatch" and the hatch's property for transparency is set to byLayer. So as long as this layer is not set to have a transparency value you won't see the hatch inside the block as transparent.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 11 of 26

DaveBarlowSmith
Enthusiast
Enthusiast

Alfred,

Drawings attached.

2 Files filled with furniture blocks.

 

The following layers will need to be Transparency ByBlock

_BS_accessories_hatch

_BS_accessories_outline

_BS_furniture_hatch

_BS_furniture_outline

_BS_furniture_mobile_hatch

_BS_furniture_mobile_outline

Any layers similar are legacy and need replacing.

 

Kind regards

 

Dave

0 Likes
Message 12 of 26

ChicagoLooper
Mentor
Mentor

Two chairs, one with 50% transparency, the other no transparency.

Yellow chair=50% transparency.Yellow chair=50% transparency.

The layers used:

 

Layers.Layers.

Chicagolooper

EESignature

0 Likes
Message 13 of 26

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> The following layers will need to be Transparency ByBlock

You mean the objects on that layers should be set transparency = "byBlock"

To make sure: Not just hatches, but all entities on that layers?

 

>> Any layers similar are legacy and need replacing.

What is meant by that?

What are "similar layers"?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 14 of 26

DaveBarlowSmith
Enthusiast
Enthusiast

I'm still not getting that result unless I change all the layers used inside the block to ByBlock.

0 Likes
Message 15 of 26

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

please find your files attached (without any warrenty).

That's the code if you like to work on it (it's VBA, so if you want to run it you need to install the VBA-Enabler)

Public Sub test()
   Dim tBL As AcadBlock
   For Each tBL In ThisDrawing.Blocks
      If tBL.IsLayout Or tBL.IsXRef Then
         'nothing to do
      Else
         Dim tEnt As AcadEntity
         For Each tEnt In tBL
            If tEnt.EntityTransparency <> byblock Then
               Select Case UCase(tEnt.Layer)
               Case UCase("_BS_accessories_hatch"): tEnt.EntityTransparency = byblock
               Case UCase("_BS_accessories_outline"): tEnt.EntityTransparency = byblock
               Case UCase("_BS_furniture_hatch"): tEnt.EntityTransparency = byblock
               Case UCase("_BS_furniture_outline"): tEnt.EntityTransparency = byblock
               Case UCase("_BS_furniture_mobile_hatch"): tEnt.EntityTransparency = byblock
               Case UCase("_BS_furniture_mobile_outline"): tEnt.EntityTransparency = byblock
               End Select
            End If
         Next
      End If
   Next
End Sub

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 16 of 26

DaveBarlowSmith
Enthusiast
Enthusiast

Alfred,

 

All the layers with _hatch in the name should only contain hatches and all layers with _outline in the name should only contain polylines.

 

Please ignore the not on Legacy layers, I am in the process of cleaning up our library and every now and again an old layer turns u

0 Likes
Message 17 of 26

DaveBarlowSmith
Enthusiast
Enthusiast

Thank you.

 

I will give it a go.

 

dave

0 Likes
Message 18 of 26

DaveBarlowSmith
Enthusiast
Enthusiast

All relevant layers now have a transparency set to 0, not byBlock on both drawings.

Am I doing something wrong?

0 Likes
Message 19 of 26

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> All relevant layers now have a transparency set to 0

Wow, something went wrong, just a second ...

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 20 of 26

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Here are the corrected drawings, sorry again, I looked to the wrong value when I verified the setting (looked to color = byBlock instead of Transparency).

Public Sub test()
   Dim tBL As AcadBlock
   For Each tBL In ThisDrawing.Blocks
      If tBL.IsLayout Or tBL.IsXRef Then
         'nothing to do
      Else
         Dim tEnt As AcadEntity
         For Each tEnt In tBL
            If tEnt.EntityTransparency <> byblock Then
               Select Case UCase(tEnt.Layer)
               Case UCase("_BS_accessories_hatch"): tEnt.EntityTransparency = "byblock"
               Case UCase("_BS_accessories_outline"): tEnt.EntityTransparency = "byblock"
               Case UCase("_BS_furniture_hatch"): tEnt.EntityTransparency = "byblock"
               Case UCase("_BS_furniture_outline"): tEnt.EntityTransparency = "byblock"
               Case UCase("_BS_furniture_mobile_hatch"): tEnt.EntityTransparency = "byblock"
               Case UCase("_BS_furniture_mobile_outline"): tEnt.EntityTransparency = "byblock"
               End Select
            End If
         Next
      End If
   Next
End Sub

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)