Block on different layers

I created the cabinet handle block on the Cabinets - Base layer along with the base cabinet on the same layer. I inserted the block the base cabinet. I created the wall cabinet on the Cabinets - Wall layer and inserted the handle block on the wall cabinet. I changed the handles on the wall cabinet to the Cabinets - Wall layer, but every time I turn off the Cabinets - Base layer all of the handles disappear including the ones on the wall cabinets. It seems that the layers assigned within the block take more priority over the layer that the block is on. Is there a way to change this so whatever layer the block is on, if that block is turned off then it will be hidden? Do I have to create 2 different blocks of the same object, one for each layer? I would think there would be an easier way to handle this.

Block Layer Issue.3dm (856.6 KB)

Hi Mike - see if this page helps at all-
https://wiki.mcneel.com/rhino/usingblocks

-Pascal

Yes the bottom of that link helped. Posting here to help others…

If you insert a block and then the block is copied to another layer, the copied block will become invisible whenever you turn off the layer it was ORIGINALLY inserted on. Even though you copy the block and move it to a different layer, it stays associated with the original layer it was inserted on.

The solution is to delete that instance of the block and insert it again on the 2nd layer.

As the link that Pascal provided says: * Turning off the layer on which the instance was inserted will turn off the entire block regardless of the state of the other layers used by the block.

@Pascal: Maybe that document can be appended to say even if you move the block to another layer it will stay associated with the layer it was originally inserted on.

@Pascal - What I did was insert the block on the Cabinets - Base layer. Then I copied the block instance to the wall cabinets and moved that instance to the Cabinets - Wall layer. I didn’t realize that the block would on the Cabinets - Wall layer would still be bound to the visibility of the Cabinets - Base layer. So I deleted the handles (block) on the wall cabinets, changed the active layer to the Cabinets - Wall layer and reinserted the block on this layer and it works now. I would have thought that if you change the layer that the block instance is on that it would be hidden if you turn of that new layer, but it doesn’t work that way. IMO it should change if you change the layer that the block instance is on.

Hi Mike - that is not the case though - it may appear to be if the block’s objects (that is the block definition objects) inhabit the same layer.

e.g. you make a box on Layer A and Block it while LayerA is current. Both the instance and the definition geometry now are on Layer A so turning that layer off will hide the contents of any instance of that block no matter what layer the instance is on.

BlocksNLayers.3dm (47.6 KB)

Note you can BlockEdit and move the defintions geometry to any layer.

-Pascal

Pascal… understood. I just think it is interesting that if you turn off Layer C then Layer C’s block instance is hidden and if you turn off Layer A then Layer C’s block instance would also be hidden. I would have thought that it would be one or the other and not both.

It’s probably best practices if block instances are to be used on multiple layers then define them on their own layer. So if we have blocks of appliances if they were defined on an Appliance layer then could have a dishwasher on a Kitchen layer and clothes dryer on a Utility Closet layer. That way when you turn off the Kitchen or Utility Closet layer, it doesn’t turn off the appliances on the other layer like what’s happening to the block on Layer C right now when turning off Layer A…correct?

Hi Mike -

Well…
I realize that in this specific example, it looks and even acts like that, but it’s not the correct way to think about it if you want to understand all about blocks. When you turn off Layer A, the instance on Layer C is technically not hidden. As I said, in this example it acts like that but that’s because the only objects in the block definition are on Layer A. A block instance that doesn’t show any of the objects that are in its definition is not visible nor selectable.
-wim

Instances can be on any layer. Where they are created makes no difference, you can change them to any layer you like to control visibility. What you may want to pay attention to is the layers of the objects that are inside the blocks, it is a bit more of a pain to move these to different layers, via BlockEdit.
Wim pointed out that my file above had a typo in one of the labels - fixed. I tend not to drink coffee in the evenings but I may need to change that.

-Pascal

1 Like