NEW GetDocumentUserText & GetUserText UI

Hello everyone,

Today’s April 4th 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 (name subject to change).

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 (name subject to change). Will display a panel to edit per object attribute user text.

The UI also supports some basic Import/Export functionality.

  • Currently comma delimited csv or txt files are supported for importing / exporting Key/Value pairs from / to other applications.

  • Document User Text also has the additional ability to import document user text from external 3dm files.

Duplicate Keys are automatically renamed to a new index such as
Key
Key (1)

Filtering the Key/Values is available by typing in a filter value in the filter text box and pressing enter or clicking the Filter button.

4 Likes

@Trav, great this finally made it into Rhino. I would suggest to have the buttons (New, Delete, Import, Export, Match) in the properties dialog above or below that table to save some width. Eg. in 3 rows, roughly like this:

thanks,
c.

@clement

Hi Clemet!

You’ll be happy to know that all of the buttons have been swapped out for icons. They should show up in the next WIP.

2 Likes

Hi @Trav, thank you that is really nice. Would it be much work to ask for an additional feature, eg. when i right click on one or more existing keys, it would show a context menu which allows the user to:

Select Objects with same Key
Select Objects with same Key & Value

c.

@clement

I had written something and had misread what you originally wrote. Yes, this is very doable!

https://mcneel.myjetbrains.com/youtrack/issue/RH-38796

Hi @Trav, i was referring to GetUserText for objects in the object properties. Eg. if you have set the key “Price” and value “100” and select one object with that key or value pair, how to select other objects having a “Price” or the same value set ?

Edit: You type too fast :wink:

c.

1 Like

@clement

haha yes over caffeinated!

I could see selecting doc objects by:

Key
Value
Key/Value

It’s a great idea and I’ll get it added.

Thanks!

@Trav, i wondered today if it would be useful to include user text which is “attached to object” in addition to the currently “attached to attribute” user text and reflect that in the Properties panel, eg. by a dropdown which allows to control what to list (object, attribute or both) ?

Imho there is also some slight inconsistency when _SetUserText is run, it asks where to attach to (object or attribute) while _GetUserText always lists both.

It is just an idea of course :wink:

c.

following this path there could also be a selUserText command as well.

Oh yeah :wink: maybe with support for using wildcards like * in the key name ?

c.

1 Like

This looks great. Finally glad to have it included.

1 Like

@clement The next WIP should include the ability to select document objects with similar Key / Value or Key and Values.

4 Likes

@Trav, looking good. Are you planning to handle key/value pairs attached to geometry as well ?

c.

@clement this lets you select document objects that also have the following key/value pairs if that’s what you mean?

@Trav, if you run _SetUserText command, there are 2 different ways to assign key/values pairs. The first one is attachment to attributes which seems what your dialogs work with. The other is attached to object geometry which i asked about.

btw. i found it strange that when using _GetUserText there seems no way to control what is listed (either attached to attribute or attached to object, or both).

c.

@clement I see. I believe the “object” method is frowned upon moving forward and is still there for legacy support.

2 Likes

RH-38796 is fixed in the latest WIP

This is super useful! We’ll be implementing new perks in our scripts when we move over to R6.

1 Like

I would love to see an option to select all objects containing user text using Regex search.

Also I can’t find a way to copy individual Keys and (or) Values between different objects.

Thanks @Macuso

Both sound very useful.

I have create items for both requests.

https://mcneel.myjetbrains.com/youtrack/issue/RH-42552

https://mcneel.myjetbrains.com/youtrack/issue/RH-42553