Hello everyone,
I am trying to make a script that will select multiple objects based on object ID. It is similar to the “SelId command” which already is in Rhino, but I want it to be able to input a list of object ID’s I want it to select.
To achieve this I first tried to recreate the SelId command however I get stuck there.
What I have is this (it is very basic):
Dim arrObjects, strId, objId
strId = Rhino.GetString("Enter object ID")
If Not IsNull(strId) Then
objId = Rhino.GetObject(strId)
If Not IsNull(objId) Then
Rhino.SelectObject objId
Else
Rhino.Print "Object not found with that ID."
End If
End If
However if I run it and input the object ID string, it results in “unkown command”.
I noticed that in the list of rhinoscript commands it is possible to use many different selection tools but object ID is not noted there.
But Rhino has this functionality because there is a button already for it. If I know what the code is behind that button I could create my own script that can select multiple objects based on an array of ID’s.
Can someone help me with this?
Many thanks in advance.
Best regards,
Bastiaan van Oudheusden
Naval Architect at NG Shipyards
2 posts - 2 participants