Can't change the attributes of an "InstanceObject"

I’d like to carry out the following workflow :
-Select blocks in Rhino with the Objects By Selection component
-Set some usertext Keys and values

Sadly, the component outputs " Goo" which Modify Object Attributes says it doesn’t like.
The “Id” component doesn’t like “Goo” either, so it seems like a dead end.

Why not simply output referenced objects ?

Grasshopper doesn’t have a “block” type for me to output, so I output the raw block. I’d do it differently if I wrote it today. You’ll need a script to get the id, try this block instance id.gh (5.2 KB)

This works ! Thanks Andrew.
I had a surprising side-effect to the Modify Object Attributes component :

I realize that if no layer is specified, the selected block just disappears
Also, if I don’t add the existing Keys and values, the one I want to change or add is the only one left.
I guess I just naively expected the component to understand that I wanted to either :
-Modify an existing value if the specified key already exists
-Add the key and value if the key doesn’t exist

it does not. you will have to construct a new attributes including the properties of the old one.

1 Like

chances are anything “disappearing” is just moving to the default layer, which may be hidden.

1 Like

It’s a good thing that the “Color” property isn’t changed though, since there is no way to define “ByLayer”.