How to assign the values in a value-list backward from a cluster?

Hello everyone,

I’ve been using sorting strategies for a few years to manage data logically (by length, volume, or position) instead of relying on list items.

I’ve found this process quite reliable as long as I control the geometry and data flow. However, I usually rebuild my components from scratch every time, so today I decided to create a custom user object that I can reuse across different projects.

The logic itself is fairly simple: I use a Filter component with predefined Value Lists. My issue is that the Value List needs to stay outside the cluster, so I can’t save everything properly as a user object.

I was wondering if there is a way to reverse or expose the input choice of a Value List component?

In the image below, the top part shows my script and custom Value Lists. The lower part shows the same components grouped into a cluster, but with new Value Lists that revert to the default values.

I attached my script as well if anyone wants to test it on their side.

Also very open to alternative paths, if I am trying to do something simply impossible.

TGA Auto list value.gh (18.6 KB)

Thank you

if I understand your problem correctly, then you cloud put the first cluster + values lists into another cluster and make a user object from that.

simply explode it after your drop it on the canvas :thinking:

Indeed that would be a fix, but requiring cleaning every time and my plan here is to save a bit of time every time and have a cleaner canvas using one component.

Here is a snapshot of the cluster so far (yes I extended it to my usual filtering conditions)

So I would rather not explode it every time if possible, good idea though.

Hello, sharing the script with its full filters.

if anyone else has an idea.

TGA Auto list value.gh (21.0 KB)

I’m lost. You are exploding curves and then trying to sort them by volume and area? What is sort by point position?

Hello,

The curves are just a placeholder here, sometimes I deal with breps, mesh, curves, points… etc.
When I have a set of data but I want to “pick that one” I do not like to just throw a list item and manually look for the item, but ratehr find “the highest point”, or the “biggest area”, etc… so I use a logical filtering/sorting that is a bit more reliable as the script/inputs change along the way during the project developppment, avoiding going back to the “list itemS” component I could use along the way - because inputs can change but the logic remains.

So I am trying to build a user object to do that with option to choose from.

Does that make sense ? Maybe It is not rational, but with years of experience, I rely a lot on these sorting methodology, and I would like to smooth the process.

I see. Well, the first order of business would be then to sort the geometries by type. That’s easier said then done. For instance, you can’t simply push the geometry through a curve container to cull for curves. The curve container will cast surfaces to their naked edges. It might make more sense to create different sorting clusters for different geometry types.

To your question:

No. Having a cluster react in the way that, say, Content Cache does when you connect a Value Listto the exposed Action input is not an inherent ability of clusters. There are plug-ins that allow you to read the keys and values of a Value List such as Get List Data from Metahopper, but they do not work across the contexts of the main canvas and the internal canvas of a cluster.

@gandolphe.thomas You can use Metahopper’s “Save Snippet..” to save the custom Value Listss along with the cluster as a user object. Then uninstall Metahopper once the user object is created… I don’t know how this is done without Metahopper.

Ah. Here.

I’ve sorted things to be a little less “uff”:


TGA Auto list value VR 1.gh (17.0 KB)

Thank you Volker, I was worried that the simple answer was No. :slight_smile:

Thanks for your time ! I will check the snippets that could be jsut fine !
Also thank you for cleaning the script :slight_smile:

Oh mamamia, the Snippets were exactly what I needed, thank you very much.

This:

might be problematic. Revised:


TGA Auto list value VR 2.gh (22.5 KB)
TGA Auto list value VR 3.gh (19.6 KB)
Sort Geometry.ghuser (17.5 KB)