Is it possible to return the selected key/val pair in the ActiveDoc.
Just as it would be done using this method for Layers?:
LayerTable.GetSelected Method (rhino3d.com)
Thanks,
Dan
Is it possible to return the selected key/val pair in the ActiveDoc.
Just as it would be done using this method for Layers?:
LayerTable.GetSelected Method (rhino3d.com)
Thanks,
Dan
I think the goal is get the selected indices based on UI selection which is not possible.
@lignindes what problem are you trying to solve (short of just knowing what is selected in the ui). I may be able to offer an alternative suggestion before trying to file a feature request.
Gotcha, switching the post to the scripting forum category.
Hello,
That is correct, I’m trying to get the indices based on UI selection.
I’d like to write a script that would do the following:
Inputs:
Outputs:
For example, if I had PartName/Beam and PartNumber/100 as key/val pairs on a piece of geometry I would get a dot that read “Beam,100”
Does that make sense?
Thanks,
Dan
I can see your logic. Unfortunately the UI doesn’t expose anything publicly since its really just a wrapper around GetUserString and SetUserString
The first thought that comes to my mind would be to run your object picker code to prompt to select the objects, then popup a simple modal dialog that has the objects key/value pairs listed in it. Make them pick from that list and press OK. I think there’s probably some pit falls in terms of waiting for the user to pick from the user text panel when it might not be visible. The modal approach would definitely solve that issue and be more like a traditional Rhino command.