#%$Y*#! Toolbars!

OK, moderately irate here…

So, I am in the process of cleaning up and updating a toolbar with special tools (scripts, macros, etc.) that people use here. So, I did the following:

  1. Exported the original toolbar out of someone’s original .rui file, imported it as a new .rui into my Rhino.
  2. Spent several days cleaning up and modifying the new toolbar, changing the scripts/macros as well as the text names on the buttons, some of which were in English, some in French, etc. – all now in French.
  3. When done with all the mods, copied the saved finalized .rui file to our server
  4. On my colleague’s computer, copied the .rui file off the server to his 5.0/UI folder
  5. Opened the .rui file in the colleague’s Rhino.

What I see is that the toolbar is not the same as the one on my own computer.
SOME (but not all) of the buttons have the original titles (i.e. some in English, or the original name in French) ! The content (macros, script paths) inside the buttons all seem to be the new, correct ones.

Now, what is probably going on here is that the toolbar buttons in the new .rui have the same GUID or something as the old ones - which don’t even exist anymore! - and somewhere in the registry there is a duplicate entry or something, and Rhino is reading the first one it finds. But that’s just plain stupid. I even tried opening the .rui in V6, and saving it out from there under a different name, but the same thing happens!

So, WTF do I have to nuke in the registry or elsewhere to get Rhino to accept the last-saved names and forget the old ones??? :confounded:

–Mitch

Hi Mitch - checking with a developer…

-Pascal

I am reminded of this post from 2 years ago - has anything been done on toolbar and RUI support in V6?

1 Like

Have you tried to make a brand new toolbar and then copy all the icons over and save the new toolbar and open that one your colleague’s machine? It might be a fast workaround for the time being.

Yep. First thing I tried. Doesn’t work, same thing happens. So the buttons themselves must have GUID’s that are getting duplicated. The only thing that might work would be to create a new toolbar with all new buttons and transfer over the icon image, the macro/script and the tooltip for each original. For 30 buttons or so, not willing to do that.

The system is just broken - to put it politely…

–Mitch

1 Like

What’s absolutely incredible just how much of a mess this is. I just opened the original toolbar on my computer in the “workspace editor” to see if I could find an explanation. In there are not only the macros for buttons currently in the toolbar, but also for every button that has ever been in the toolbar, even if it was deleted a long time ago!! And they’re all mixed up, the current names for some have old macros, and vice-versa. And one can’t select a number of macros to delete at once, it’s one at a time, with a “confirm” message that comes up that you have to click Yes to confirm the delete…

Even worse, I delete a macro that appears unused - associated with some button that got deleted a long time ago - and it automatically deletes some other info like tooltips and macros on a different current button…

What a pile of merde.

–Mitch

3 Likes

So, I finally figured out what’s going on here (at least partially)… It has to do with… language.
(no, not the foul stuff I used in the above posts)

As I work in English and my colleagues work in French, and the toolbars/buttons get passed around among us and modified, each button has its own set of macros - in both languages… totally logical, but it never dawned on me that that might be the root of the problem.

It was only after poking around in the registry looking for where the macros and guids might be stored (forget finding them, they’re not accessible there as far as I could tell) that I stumbled on the test command “TestRuiCreateLibraryFile”. Running that creates an xml file with all the info about each macro. And suddenly I noticed that each had an entry for 1033 (English) AND an entry for 1036 (French) and that they were different. And that the French macros still had the old names.

So when I edited all the macros in my English-speaking Rhino and cleaned up the entire macro library for that particular toolbar, I had no idea that the French entries - which you can’t see if you are editing in English - were still there!!! And each time I opened the edited toolbar on my colleague’s French-speaking computer, I was seeing a completely different version of the same toolbar. No matter what I did, they always came back, every time. Made me completely crazy. (-er) :dizzy_face:

I thought I was doing a good job editing a toolbar all in French for my colleagues, but in reality, all those French entries got stored under the English name section because my Rhino was running in English.

OK, so now, all I need to do is go back and re-edit ALL the entries again using my Rhino in French… :confounded:

Oh, well…

–Mitch

I’m sorry for the confusion regarding text in RUI files. Any text that appears at runtime and specified in a RUI file is stored in a block in the RUI file that contains the text in each supported language. The text block looks something like this:

<text>
        <locale_1033>Extend Rhino Menus</locale_1033>
        <locale_1029>Rozšířená menu Rhina</locale_1029>
        <locale_1031>Rhino-Menüs erweitern</locale_1031>
        <locale_1034>Ampliar menús de Rhino</locale_1034>
        <locale_1036>Menus de Rhino complétés</locale_1036>
        <locale_1040>Estendi menu di Rhino</locale_1040>
        <locale_1042>Rhino 메뉴 확장</locale_1042>
        <locale_1045>Rozszerz Menu Rhino</locale_1045>
        <locale_2070>Estender Menus do Rhino</locale_2070>
        <locale_2052>扩展 Rhino 功能表</locale_2052>
        <locale_1028>延伸 Rhino 功能表</locale_1028>
        <locale_1049>Расширенные меню Rhino</locale_1049>
      </text>

When you set your language version in Rhino it looks for the <locale_[current Rhino locale]> tag and uses that text, if it is not found it looks for English, if that is not found it uses the first one it finds. When you use the Rhino interface for editing a tool bar item you are editing it in your current language version so the locale specific entry gets updated and does not overwrite the other languages. This was a conscious decision on our part, we did not want to destroy the localized strings. It might be possible to add something like a language drop down list in some of the edit UI that indicates what language you are in and possibly change to other languages and edit those strings as well.

Everything need to display a toolbar button is stored in the RUI file, the only information stored in the registry is the relationship between displayed docking components in Rhino so that the layout can be properly restored when Rhino restarts. All macro and toolbar information is stored in the RUI file.