Text field by an element's name

Hello there,
When using a text field I wonder if it is possible to get an element’s property by its name instead of its ID? I mean, I have several closed curves, each one has its own unique name and I want to point to their names just to avoid all the confusing ID strings. For now, something like this works fine…:
%<UserText(013bb363-c903-46aa-9fb7-ccff6acb5467, MPZP)>% - %<Area(013bb363-c903-46aa-9fb7-ccff6acb5467)>% M2

…but it would be much more “human” if I could use something like this:
%<UserText("A-54MN/U", MPZP)>% - %<Area("A-54MN/U")>% M2

Is it possible? If it is important, I still use Rhino 6.
Cheers, Jaro

Hi Jaro -
There currently isn’t a more human interface to this, no.
But just to understand the issue here - what is the workflow that is involved here?
Surely, you don’t want to completely type the %<UserText("A-54MN/U", MPZP)>% - %<Area("A-54MN/U")>% m² string by hand for every shape?
Perhaps the test command TestMatchAnnotationFields is of help here - but that’s Rhino 7 only.
-wim

Hello Wim,
Frankly, the workflow doesn’t matter, these strings were just to show the problem, my problem at least :wink: . I just wonder if I can use some attributes in a more automatic way. For example, I have several curves and I just need to add a text with their areas. Sure, I could click on each one, but if there was an option to get an attribute from all entities with a name it could be great. Now, some operation can change the IDs, so clicking again and again on them is a pain. Using names would simplify the process, I think.
Cheers, Jaro

Hi Jaro – what should happen in

%<Area("My Object")>% m²

if more than one object is called 'My Object" ?

-Pascal

Hello Pascal,
For me this could be a list of each area, or any other property, limited with commas for example That’s why I am asking for such a feature, the automatic list. Of course, maybe it could be done with Grasshopper, but with built-in option it could be easier. And as I can see, with Rhino 7 we could use such list as a input for some python operation, right?
Cheers, Jaro

The text fields are a great tool - they just need one small UI tweak which hopefully should fix these kind of problems? (Unless there are things I don’t know about!)

This would make the tool so much easier to use, and could work on multiple objects at once. For example:

If i copy the selected group of texts (all of which reference attributes of the detail frame above) I should be able to then simply click on ‘select object’ then select a different frame and all 3 would update. Quick and easy!

Finally - it would be good if you could see a preview of how the text will appear in the sheet, instead of (or as well as) the formula.

Thoughts?

OK, another question - is it possible to add to a field any other geometric property? For now, I can see there are options for object’s area or length of a curve. How to access any other properties? I mean, I would like to get a point’s coordinates, even separately its x,y,z coordinates (just like the field could be an elevation mark) or arc’s radius or plane elevations etc. I know, it’s possible with Grasshopper, but right now I am discovering possibilities of text fields :wink: and I think there could be many more options. The more, with VisualARQ there are some extended tags, so maybe this also could be done with plain Rhino geometries?
Cheers, Jaro

@Trav - any thoughts on this - does it seem feasible? (the ‘select object’ UI, up two posts)

-Pascal

The selection button is Text Field and geometry specific based on the function being selected. You have to know the function before calling the Select Object picker since each function often filters to specific geometry types with different options. This is why its on the Text Function selection dialog.

Have you tried the PointCoordinate text field in v7 yet?

I understand that they are context specific - but as far as I’m aware, of the ones from which you can select objects in the model, almost all of them are select object, except two - select point and select detail object.

Could you make it contextual so that it changes depending on the function that the text is referencing? If for example you click ‘select object’ on a piece of text referencing a point - the command line would read select point object - you wouldn’t be able to select any other type of object. This is already the case even in the dialog, eg with select object for BlockInstance Name - it won’t allow you to click on anything other than blocks.

In the event that you have multiple texts referencing different object types eg 3 texts: object name, detail scale, point coordinate - (not knowing how difficult this is to code) if you select a valid object it would apply the change to as many of these as possible- so if you were to select a detail, it would take its object name and detail scale, but point coordinate would remain unchanged because it’s not a point. I hope this is clear!

This behaviour I’m sure would be more than adequate for most users, and would dramatically improve the current implementation which takes a huge number of clicks to use effectively for a lot of texts. I have discussed the testmatchannotationfields with @wim in another thread and this is a good start, but I personally feel this implementation if possible would be a better solution.

Thanks for considering!

A text object might reference several different functions. And several different functions select different types of objects. I think we can certainly improve multi-selection picking on the function dialogs object picker but under the current system it would need to be on the function dialog, not the text dialog. I have logged your request here for a new method of doing it. https://mcneel.myjetbrains.com/youtrack/issue/RH-63266

Thanks Travis - I hadn’t considered those instances where a single text has multiple functions, as I personally only ever use one function per text, so I now see how it can be much more complicated to implement.

Will be good to see how this tool evolves

1 Like

It sounds like at the end of the day you just want a quick way to replicate a text object that contains some functions but changes the objects it references? You mentioned the Test command testmatchannotationfields. I’m guessing if we can get that command right, a lot of your pain would go away?

Yep that’s pretty much it - kind of!

I can’t speak for all users - but I’m sure as a general rule for most people text is used for annotation of specific attributes. This would require an initial setup (with the dialog) and then lots and lots of copying to apply the annotation to multiple objects (even with multiple fields per text).

As of now, the set up part works just fine, but the process of then applying this (including any edits) to multiple objects is nonexistent. It effectively has to be set up from scratch each time.

The testmatchannotationfields would definitely work - although as discussed with wim, it needs to be changed to replace the text not produce a copy on top of the original. It would be very helpful if this could be changed ASAP!

I personally still feel the ability to change the referenced object on the fly would be the better way to go - as the complex function text we see in the text window is not very edit friendly, and I’d bet that editing existing texts which have already been set up is much more common than setting them up from scratch.

Here is one possibility of it could be implemented- I guess it just comes down to being able to edit existing functions without starting afresh each time:

Maybe I’m overthinking this, but the current process of working with fields just feels slightly too unwieldy.

1 Like