I am reposting a more modern announcement for this new feature.
This weeks (May 9th ) Rhino WIP now includes a new UI for 2 commands that were previously only accessible via the command line or through scripting. GetDocumentUserText and GetUserText.
These new interfaces can be seen in the following ways:
A command that produces a floating or dockable tab panel
Command Name: DocumentText
GetUserText
An object properties page
Highlighting an object and visiting Properties - Attribute Text. Will display a panel to edit per object attribute user text.
Key / Values can be filtered by entering a filter parameter in the filter text box.
Hi Trav,
I think this a great new feature. Thanks for picking up on this request.
I would love to see this text together with the other properties at the same time. Could these several properties pages also be in a stacked collapsible layout? so that I can decide what to show and what to hide.
The problem is I’d like to filter out only the objects with this key and value.
Yet select objects by key and value will add objects to the selection and not discard those that do not have this pair.
The catch 22 is that you will need to have something selected in order to use select objects by key and value yet there is no way of deselecting first or another way to make sure only objects that carry this key-value pair are selected.
I’m not sure what solution would be best but a way to select only by this key-value pair would be welcome.
Could we also add matching RS methods matching the SelKey / SelValue / SelKeyValue commands?
The equivalent in the form of ObjectsByKey / ObjectsByValue / ObjectsByKeyValue…
@Jarek are you looking for soemthing like this for ObjectsByKey: filter(lambda ob: rs.GetUserText(ob,"mykey"),rs.AllObjects())
This gets you all objects that have a key called mykey
(note: if the corresponding value is an empty string the object will not be included in the result. I could not find a workaround for this special case)
(this function does always return a string ,not null even if the docs say so: https://github.com/mcneel/rhinocommon/blob/57c3967e33d18205efbe6a14db488319c276cbee/dotnet/opennurbs/opennurbs_object.cs#L436)