Automatic grouping through a ruby script

Hello people
I’m looking for some advice here. I work on light gauge steel frame houses and get dxf models from our panel manufacturers. They import nicely and once I make some faces they are ready to go…almost. I use the out liner a lot and the naming convention that comes with the model is well organised.
My issue is that every part of the house is its own component. So I get a list that looks like this

This is the ground floor panel internal numbers noggin 1. And so on.

Is there a script that could find all the interior panel 7 parts and group them accordingly? And do this for all panels.

I can upload a file a bit later if needed

Thanks ahead for any help.

It seems likely this can be done, but no pictures or files attached, so I can’t really understand what you are saying. If this is your first post, it may be that the forum software is preventing you from attaching anything - there is a sort of probational period built in to deter robots.

Gould version 2.skp (1.4 MB)
This is an example.
I have overlaid the dxf from the frame designers onto the dwg from the architect.
When you go into the outliner and expand the dxf hierarchy you can see all the components.
They are well organized but in reality I don’t often need to drill down into the individual components of the panel.
What would be great is if they were grouped by panels and adjust the panel.
Hope this helps
And thanks again.

I’ll take a look tonight.

Thanks. Truly one of the best forums out there.

Looking at your file, it seems like this shouldn’t be very hard, though there are some things you need to clarify for me.

What is the naming pattern that would be gathered into a group? I see component names like “Ground Floor_Ex1_Bp1”, “Ground Floor _Ex1_Hd1”, “Ground Floor _Ex1_Hd2”,… then “Ground Floor_Ex2_Bp1”, etc. and so on. It seems like a sequentially numbered two-part naming system. Which part is what you want gathered into a group? All the variants of, e.g., “Ground_Floor_Ex1_xxx”?, or all the variants of “xxx_Hdnn”, or some some combination? Said another way, what names would you associate with “interior panel 7 parts”? “Ground Floor_In7_xxx”?

Yes the latter. So the name is “floor_panel_part”
I’d like to see grouped by panel. Then by floor.

First floor (group)
Wall panel (group)
Parts (components)

So a three-level nest: floor group contains panel groups which contain part components? That should be doable. I’ll give it a shot later today.

Exactly and thanks.

Let’s take this to PM, as I think the process is specific to your needs rather than of general interest. I’ll PM you when I have something for you to try.

Edit: check your PMs for a first attempt.

1 Like