New V6 GetDocumentUserText & GetUserText User Interfaces

wip-6-win-splash

(Travis Serio) #1

Hello everyone,

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:

GetDocumentUserText
A document properties page
Rhino Options - Document Properties - Document Text.

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.

The Attribute Text UI context menu will also allow document object selections of matching criteria.


#2

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.

I know this is actually another topic but the thought of it started from this.
It continues here https://mcneel.myjetbrains.com/youtrack/issue/RH-39315#u=1494831427088


(Willem Derks) #3

Hi Trav,

I had some field experience today with these great new features.

I ran into an issue with the RMB feature select objects by key and value

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.

Thanks
-Willem


(Travis Serio) #4

Hi Willem,

I see what you’re saying and yes it was written to find other items in the doc that might have the same keys based on the current selection.

It sounds like we may need to add a SelKey / SelValue / SelKeyValue series of commands which is really what it seems like would solve the problem?

There could also be a context menu selection for Filter by Key / Filter by Value / Filter by Key Value as well.

-Trav


(Brian Gillespie) #5

RH-39481 and RH-39482 are fixed in the latest WIP


#6

Hi @Dale,

Could we also add matching RS methods matching the SelKey / SelValue / SelKeyValue commands?
The equivalent in the form of ObjectsByKey / ObjectsByValue / ObjectsByKeyValue…

best,

–jarek


#7

@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)


#8

Hi Goswin,

Thanks for the example and suggestion.
I need to clarify though that the request was for additional RhinoScript methods.

best,

–jarek