Is it possible to change the layer of a block definition? I want to delete a layer which has nothing on it except for a single block definition (although no block instances), but I am warned that I have to delete the block before I can delete the layer. But I don’t want to delete the block—I just want to move the definition to a different layer.
Insert the block somewhere and double-click to edit the block definition. Move the object(s) to another layer and exit the edit mode.
You potentially have multiple layers “in play” here.
First there are the layers the original objects were drawn on. Wim’s description handles this.
There is also the layer that was current when the block instance was created. If you check the properties of the block instance, this is the layer shown.
I think the question is going to the point - how can I delete the layer of a block definition?
It means there are further layers “in play”, am I right, John?
Layer of a block definition - the layer where the block was initialy created and you can’t delete this till the definition exist
Layer of a block instance - the layer shown in the block instance properties. You can change this one, but the block definition stays where it was created.
Layer of block objects - layers of original object within the block, you change these talyers whene managing block.
So is it possible to change the layer of block definition? Thanks!
Hello - the objects in a block definition are on layers - the definition as a whole does not have a layer. Your first item, ‘layer of a block definition’, is not ‘a thing’. The layer that was active when the block was created would be the instance layer for that first instance. If the block objects also happen to be on that layer then that is the same as your third item…
In a moment of deleting layer Rhino alerts there is a block definition…
can i than chang where the block definition is, or i have to always delete it and afterwards i can delete even the layer which was initialy active, when the black was created?
To further this point/issue. Is there a macro/script to move all blocks to one layer?
Any updates on this? It’s causing me a bit of a headache… the “block definitions” seem to consistently end up in layers I later want to delete. Would be great to be able to have all block definitions moved (manually or automatically) to a “blocks” layer
Hi Corey - If I understand this right, you should be able to simply select the blocks and then run
ChangeLayer and put them on the Blocks layer. Then delete the layer that the block used to be on.
I don’t get it. I have a block B that was created with layer X active. Later I move all instances of B to layer Y. Layer X is empty. Yet I cannot delete it: There is a block definition named “B” on layer “X”. Use the BlockManager command to delete this block before trying to delete this layer.
This is what you want (because holding your breath until McNeel cleans up this mess is a death sentence).
Block definition - block instance… two different things.
The definition is an invisible recipe for creating your block instances. The definition resides on a layer - the one that was active when it was created. I don’t think you can change this. You can move all the instances, but the definition is still there. If you delete the definition from the block manager, the instances will all go away (even if they have been moved to other layers).
Why the block definition actually needs to reside on a layer and can’t be moved - I have no idea.
I’m going to do the thing and say if I was a McNeel developer, the quick fix I’d implement would be a special layer that’s never shown to the user, onto which all block definitions always were moved… but I’m just a random on a forum with silly suggestions, so…
Well, I’ll recrreate the block and all instances then. No fun, but no choice. Thanks for the explanation!
are you sure? Here I can purge all layers that are not part of the objects that are in the block, including the layer that I created the initial block on. I think the message “There is a block definition on layer…” message is wrong in that it should read: “There is a block definition that uses object(s) on layer…”
edit: It should read " Layer … is used by blockdefinition…"
edit: it can still be confusing this way I realize.
@feklee I created some scripts that can automate this for you: https://github.com/studiogijs/pythonscripts/tree/master/blocks
@Gijs - yeah, sorry, it’s more like that, I was confused actually - if there are no ‘original’ objects that are included in a block definition on a given layer, you can delete that layer. You need to transfer all the ‘original’ objects (that no longer exist as geometry in the file, just in the block definition) to some other layer(s), which involves going through BlockEdit or a script.
You’re right. There was an object inside the block definition still on that layer. After removing it, I could delete the layer. I got confused because of the error message and because, outside of the block definition, selecting the objects on that layer gave me: No objects added to selection.