Export to STEP with text name in group

hello,

I have around 100 items which I all need to export seperately to step files.
every item is in a group with the filename as text in it.

is there a way to select all items, push a button so that all items are exported to seperate files with the name as specified in the text? the text itself don’t need to come in the file, I think STEP won’t do that.

I think this might be possible using grasshopper, unfortunately I’m very unexperienced with it.

hope you guys can help me out!

best regards, Albert

if you have both Elefront and Human plugins installed in GH, this would just take a few clicks
(as far as I know Human -or some sort of custom script code- is necessary to get Group IDs?)

Export_Groups_as_Step_with_filename.gh (25.2 KB)

after installing both plugins (you can find both by typing PackageManager command in Rhino) you just need to open the Rhino file of interest, set the saving directory and click Export

I guess the new R8 component might handle this directly without the use of any external plugins, but I didn’t study those enough to put together good solution using just those

1 Like

Thanks for the quick respond!

how do I get the data in?

I see this:

the yellow boxes are empty.

it works! but I need to put al in a clean file, because of other items.

thanks a lot!!

Sorry to bother, but it goes wrong, it mixes the names and items.
testfile for export.3dm (3.9 MB)

Can you please have a look at it?

the only issue I am able to see is a text+geometry that is grouped together 2 times :slight_smile:

here text at branch 58 was grouped with both group_ID 53 and 54, and very same thing happening with the respective pipe, which might be something as easy as the double press of the “Group” command in Rhino while the items were still selected

anyway, this should not cause a problem -even if I’m not really sure of how the export component works, to be fair- because it should create two different files that have the same identical name and the same identical geometries inside… so one should overwrite the other? I don’t really know :smiley:

so I ungrouped those items that were double grouped together, clicked the “Export” button, and it produced 114 different Step files as it should

at that point I imported all of those files back in GH, retrieved the theoretical item name and the actual file name, and checked if they were matching by proximity: they all match!

please give a try to this GH definition (or even the old one) together with this Rhino (R8) file where there is no double grouped geometry (otherwise take the Rhino file you posted, go to geometry code OD-B-SB-02-A and ungroup it one time yourself), it should just work (be sure to change the save directory to samething that exists in your HD)

testfile for export_without_double_groups.3dm (6.2 MB)

Export_Groups_as_Step_with_filename_check_matching_stuff.gh (24.7 KB)

Inno,

You are my hero!! it works!!! and the GH with check is also very helpfull!

thanks a lot for the effort.

Best Regards, Albert

1 Like

Hi Inno,

I try to run it now with meshes, so I changed the input button to mesh but it won’t work. I tried to find the error, but I can’t find it as I am still a rookie in GH.

can you please help me out here?

export mesh.3dm (18.8 MB)

thanks a lot!!

Albert

it might be a problem related to the grouping in the 3dm file:

there is one mesh that belongs to no group:

and all the text entities belong to at least 2 different groups, then 184 text entities belong to 3 groups and one text entity belongs to 4 groups:

maybe a different approach? like based on proximity?
something like each mesh is exported and named after the closest Text entity?


[edit]


Export_Mesh_named_after_closest_text_entityy.gh (15.6 KB)

the count check checks how many mesh are there, and how many different text entities it wants to use for naming those meshes, if the numbers are equal then you should be good (be sure to not have double meshes copypasted in location in the 3dm file)

this yelds me these result, 186 different files as expected:

Thanks Inno,

I’m going to look at it first thing tomorrow.
It is late now.

I’m busy to get familiair with Grasshopper, so your help is much appreciated. I let you know how it develops.

Best regards

Met vriendelijke groet,

Albert