A way to import geometries and their names from a file

I’m trying to import a FBX file into grasshopper that contains a bunch of geometries, the “Import 3DM file” Component works for this, and in it there is a function to filter by geometry name, which means that the names of geometry can be used, but I can’t figure out how to get the names of the imported geometries after importing them.
the problem I’m trying to fix is basically that when using the “Import 3DM” component, the geometries get imported in a random order, and I want to organize them into a pre determined order to assign ID numbers to them, I have a csv file that contains the ID numbers and the geometry names, what I’m currently doing as a workaround is to import the csv file and use the list of geometry names as a filter for the “Import 3DM” component and this outputs the list of geometry in the correct order, but it is loading the file for each and every name, making any edits to the FBX file take upwards of 3 mins to update in grasshopper.

I tried to write a python script for this, but couldn’t figure out how to properly import and fbx file (I’m not a programmer)
I also saw mentions of the Human plugin for this, but the component that used to have this functionality in this plugin is no longer available, also tried eleFront and Pancake, but wasn’t able to reach a good solution.

I have been looking for ages for a solution to this problem any help is appreciated

human “read 3dm file” and “object attributes” seem to work fine

Somehow the name does not seem to stick to the actual objects in GH, so an “object attributes” after the “import 3dm” node does not have any names to it anymore.

When you import the file in Rhino manually, do the imported objects have names?

Thank for the reply
yes the name of the objects are in the attributes menu in rhino

Ok. Can you post a file with the geometry and your attributes?

I was about to reply that the “read 3dm file” component is not available in human, which prompted me to check the version of human just to be sure, and apparently i downloaded an older version.
thank you for your time!

but now I’m faced with a different problem, when using the “read 3dm file” component from human and plugging in the file path it give the error: “1. Solution exception:Object reference not set to an instance of an object.”

as in the fbx file? I might not legally be able to send you the whole file, but I can send a file with only one object in it instead.

If you can, post a file with 3 - 10 objects so sorting can be tested.

test2.fbx (29.3 KB)
here is an fbx file with 3 of the objects

thanks for your time!

it seems the “read 3dm file” component from human only reads 3dm files and doesn’t read fbx files.

If you can, use Rhino 8.

If that is not an option, I think you’ll have to import the file in Rhino 7 and use EleFront or a script to reference and sort everything.

1 Like

thank you again for taking the time to help, I will see if I can get rhino 8 for this project

1 Like

tried Rhino 8, while it was capable of importing fbx files and get the names of the geometry, for some reason rhino 8 was significantly slower at running my grasshopper script and was extremely laggy to change the viewport with the geometry from grasshopper visible.

I did find a solution finally though, I used the C# code from this video:

and then with the help of a programmer friend of mine, we were able to edit the code to get a list of the geometry names from the file.

1 Like