Selecting and deleting specific text in Grasshopper

I’m trying to delete or at least change the layer of texts which are smaller than 100.
I can list the items I want, but frankly I don’t know how to proceed from there. The screenshot is only part of the document, in the original document there are about 1000 texts and I have to somehow just keep the ones that are larger than 100 and add points to them. Any help would be much appreciated.

Text GH WIP.3dm (87.4 KB)
Text GH (12.6 KB)

Hey @Foad, try this definition.
Text GH (15.3 KB)

I made a few changes:

  • Changed the input of the cull pattern to be the original geo out from the dynamic pipeline as we want to cull the text entities themselves, not their values.
  • Added a python component that retrieves the guid of the text entities, this is import for using the modify objects component later
  • Created a new layer called KOT > 100, this will be the layer that we split the text onto
  • Added a modify attributes component from human. We’ll use this to change the text onto the layer we just created
  • Plug our guids into the object input of the modify objects component, and our modified attributes into the attributes input.

I’ve added in a stream filter so you can control when the layer change happens, otherwise it would happen as soon as you plugged the inputs in. You could skip the layer shift altogether and go straight to deleting them if you’d like, but this will work (you can look-up delete by guid if you’re interested).

Hope this was what you were after!

Hi @Lukxf
Thanks a lot. This is exactly what I was after and it worked like a charm.
I appreciate you taking the time to modify the definition.

1 Like