Accessing the "NickName" of components

Friday night challenge :slight_smile:

Hi everyone,

I am working with a large amount of data and want to simplify the workflow. I am importing several lines that will serve as the basis for the Grasshopper workflow, and they are internalized in containers. Each container is renamed with a code, which I believe is referred to as a “Nick Name.”

I would like to create a Python component (I’m happy to use C# if necessary) that reads the Nick Name assigned manually to each container and outputs a list of all the Nick Names. Please note that each container contains several curves, but I am only interested in the manually assigned Nick Names, not the geometry.

The goal is to stream the database afterward based on the Nick Name (code assigned).
In the image the Nick Name (codes) assigned to the containers:

Thank you!

Challenge accepted :partying_face:

Assuming you want to target parameters/containers by wires, you can do something like this:


241101_GetNickNamesByWire_00.gh (7.6 KB)

Note that this assumes the input parameters are set to list access. And of course we also target without wires by e.g. iterating all canvas objects and checking if they fulfil some given criteria. Also, this reminds me, I forgot to reply to your e-mail, many apologies!

Hi Anders,

Super nice to hear from you. I hope you are well.
You are the Master! This is exactly what I was looking for.

Many thanks.
Gianfranco

1 Like