Extracting keys & values from folder without importing file (how?)

Is it possible to extract keys & values for hundreds of objects without loading them?
It seems like Human, Elefront or V8 rhino needs them to be loaded which is a nightmare considering the number of files.

Using Rhino3dm library it might be possible to custom read into a structure that had enough data to navigate the model without geometry. That could be done outside of rhino even.

Or, grasshopper in 8 and or python/C# the files would need to be completely read, but into a headless doc. That saves the process of having them to be read into the active rhino doc. Then walking thru the objects to get the information and immediately dispose of that doc to move onto the next.

Hi Scott
Thanks for the answer. Unfortunately this tells me nothing as I have 0 experience in coding. I am relying on ready-made solutions. Shame on me.

In Grasshopper this is what the reading of userdata out of a list of 3DM files looks like. In this case the objects are not pushed into Rhino.

With Rhino 8 Model Objects it is quite simple. In this case pulling the userdata key Model_Number off all the objects in the Rhino model.

It won’t read until I hit Import meaning it have to go through hundreds of files and it takes lots of time.
I, kind-of, bypassed the problem by loading it one-by-one and recording results. This way, with some patience, I have a complete list without crashing my machine.

All the files are read with a single button push in the definition . No need to push it more then once.

There is an options to expose the Import input and let Grasshopper control when the import happens automatically.

So it could work as one file at a time, whatever works best for the situation.

Yes, performance optimization would need to be refined if somewhere the data getting passed around becomes too large.

I know it takes one push to load them, but my point is: with one push it loads hundreds of files risking memory overload and crash. My sequential solution is safe.

1 Like