Text Field Issue in Rhino 7

Hi!
In the past, if I wanted to display the name of an object I’ve been able to put “objectname” (between two percent signs and the lesser than and greater than symbols) in a text field and it would display whatever name I assigned to the text. Now when I put that in, I get “IronPython.Runtime.Types.BuiltinFunction” displaying. Is there something different that I should be entering instead of “objectname”, or is this a bug?

Sorry, I tried putting the actual characters in this question, but it wouldn’t show the text with it!

Thanks!
-Christopher

Hi Christopher -
%<ObjectName(“fd1900f6-43b6-49a8-9a13-caf2fdadd729”)>%

where the gobbledegook is the GUID of the object.

Does that make sense with what you are asking about?

-Pascal

Hi Pascal!

Thanks for getting back to me. I believe your answer does make sense to me, but in order for my text field to display the name of itself, I would also have to know it’s GUID.

I usually use this command like this - I have it in my text field, then match the text to an object that has a name - that way, I have have the text show the name of the object that I have it match. This doesn’t work the way it did in Rhino 6.

Thanks!
-Christopher

Hi Christopher - ah, I see, the name of the text object itself, not the name of some other thing - you’re right, that no longer works - @Trav - should that work in V7?

-Pascal

This looks like a bug to me. Thanks.

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

Cool!

Glad to hear it’s a bug instead of an intentional removal of this very useful feature!

-Christopher

Hi! Just downloaded the latest version of 7, and it looks like this issue still hasn’t been fixed. Do you think it will be fixed soon?

Thanks!
-Christopher

Yeah, closed, but not fixed here as far as I can see. I’ll reopen the item…

thanks,

-Pascal

Hi,

Thanks for checking. I did a little playing around and it looks like the workaround is to put empty parenthesis after “ObjectName”. Rhino 6 worked without the empty parenthesis. So it would still be nice to get it fixed so Rhino 6 files open properly in 7.

Thanks again!
-Christopher

I see… %<ObjectName()>% is what i added support for in the above YT. I’ve added the % < ObjectName > % just now which should make these v5/v6 compatible. Going forward you’ll want to make new files reference ObjectName() as all new v7 functions require () after them.

Thanks Travis!

1 Like