Hi, I use blocks extensively in all my projects, I often have the following issue:
The block itself is placed on a layer and the content of the layer is existing on a layer . In my work I always like to keep both this layers the same to avoid confusion.
Often I am forced to import other blocks which do not follow this rule, furthermore the layer used by the blocks content is messing up my layer structure.
While it is of course easy to change the layer of the blocks themself, I still end up manually opening each individual block and change its content to the correct layer (its block), which is a very time consuming and nerve wrecking task, if you have to do it for over 40 blocks or worse…
Is there maybe a smarter way of doing this ? Maybe some script like:
Select blocks → user input
BlockEdit,
SelectAll, (block content)
Change content layer to block layer
End
IMHO something like this might be useful for a lot of users.
Hi Andreas, I think I made a script for this, I’ll have a look around.
See if this is it - MoveBlockObjectstoLayer.py (2.2 KB) @walther - now optionally moves the instance. Currently the selection is lost if you change the option, I’ll see if I can make that better when I get a moment.
To use the Python script use RunPythonScript, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"
RH-62532 Blocks: change definition objects to a user defined layer
Pascal, thank you !
this is exactly what I was looking for .
Would it not make sense to incorporate this as a regular Rhino command?
Thanks again, you save me 2 hours of my Friday !
I really appreciate the unmatched level of dedication to solve user problems in this community, I haven’t been able to find this even remotely for any other SW!
… small (?) wish, while this script really helped me, is there an option to have a script that would move both the content and the block to a specific layer at the same time?