Replace identical objects with one block

Hello,

I work a lot with people who don’t use blocks…

How can I select identical objects (like hundreds) and replace them by one block definition, keeping their orientation and position.
I tried few python scripts like here

or here

but it doesn’t work

Like on this picture below, with identical lightbulbs

Thanks, that would help me a lot !

You can do this in Grasshopper, the key being finding a common plane via the geometry.

I did a similar workflow with Revit geometry here. If you post your file and Rhino version (Rhino 8 would be better in this case, no plugin req’d to make a block) we can take a look.

Hi,

Thanks for your reply, here is the rhino file 8.3

I have other models with hundres of lightbulbs, this is why I’m looking for a solution.

I’m not use to grasshopper but I can try :wink:

Here is a definition you can play around with that takes care of one layer. I’ll look at the others when I get time later today, perhaps tomorrow.

R8-Create-And-Place-Blocks.gh (16.1 KB)