Adding items to selection

I tried to use these components.

They were not able to add a list of referenced baked objects to the current selection.

Any help would be appreciated!

AddToSelection

private void RunScript(List<Guid> ids, bool addToSelection, ref object a)
{
    if (!addToSelection) return;
    RhinoDocument.Objects.Select(ids);
}

AddToSelection.gh (7.4 KB)

4 Likes

Seems to be exactly what I needed, still trying to figure out what is causing the points to move to different positions multiple times before they settle. I assume it has something to do with the selection updating component you worked on.

Useful script. I do have an error on Rhino7.
1. Error (CS0023): Operator '!' cannot be applied to operand of type 'object' (line 57)
It is possible to make this script to work properly with Rhino7? Thank you.

AddToSelection_Rh7.gh (3.7 KB)