How to install a RUI file?

In V5x64, it was easy to install a RUI file.

We have to put it e.g. here:
C:\Users[UserName]\AppData\Roaming\McNeel\Rhinoceros\5.0\UI

Then write the location to this key:
Computer\HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Scheme: Default\Window Positions\Docking Toolbars\Rui files

When we open Rhino 5/64, then it automatically loads and shows the installed RUI.


Not in the current beta.

The RUI is here:
C:\Users[UserName]\AppData\Roaming\McNeel\Rhinoceros\6.0\UI

The name and path of the RUI is written to here:
Computer\HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\6.0x64\Scheme: Default\Window Positions\Docking Toolbars

When we now open Rhino6 beta, then there is no RUI file loaded.
And also not seen in the list of files in the workspace configuration.


What is the right approach to install a RUI in V6, and then to show up in V6?

Copy it to the above mentioned folder, then from inside Rhino V6, open it?

I don’t understand, I have never written the location/existence of .rui files to the registry… Rhino is supposed to manage that by itself.

–Mitch

You should be able to just double-click the RHI file and it will install.

RHI or RUI?

I had a feeling I was missing something important as I was replying. :sweat_smile: Ignore me.

It is about a setup program that shall install the toolbar.

Finding a folder and copy something is beyond some users abilities.
Drag&drop something from a folder to a running Rhino is too much as well.

That’s why we have a setup.
And it worked in V5.

I tried to retrace what’s going on in registry when I manually load the toolbar (RUI file).
In
Computer\HKEY_CURRENT_USER\Software\McNeel\Rhinoceros
there was no change.
So I guess the information is stored elsewhere.

Where?

@JohnM - can you help?

-Pascal

Rhino 6.0 settings are stored in XML files located in your “%APPDATA%\McNeel\Rhinoceros\6.0” folder and not in the Windows registry. The list of RUI files to open at start-up is stored in the settings file for the Rhino Toolbars.rhp system plug-in and can be found at “%APPDATA%\McNeel\Rhinoceros\6.0\Plug-ins\Toolbars (dc297053-96c0-4883-a688-8326b4e024a8)\settings\settings-Scheme__Default.xml” and looks something like this:

<child key="StartupSettings">
      <entry key="MajorVersion">1</entry>
      <entry key="MinorVersion">4</entry>
      <entry key="RuiFiles">
        <list>
          <value>C:\Users\john.morse\AppData\Roaming\McNeel\Rhinoceros\6.0\UI\default.rui</value>
          <value>C:\Users\john.morse\AppData\Roaming\McNeel\Rhinoceros\6.0\UI\MyToolbars.rui</value>
        </list>
      </entry>
    </child>

If a plug-in installs a RUI file with the same name as the RHP in the same folder then Rhino will extract the RUI file into a writeable folder and open it by default.

Thanks John.
I don’t want to install a plugin, only a toolbar.
That means, if I don’t install a plugin, there is no automatic to get the toolbar copied and ‘activated’ by Rhino.
That also means, that I have to manipulate the XML file?
Isn’t there an easier approach?

It is basically the same thing as V5 except you modify an XML file instead of the editing the registry. The intent was to make it automatic for plug-in developers by providing a plug-in related RUI file. The manual loading process has not changed but the way Rhino saves settings has, Rhino no longer uses the registry to save settings, it now uses XML files.

How were you modifying the registry before?

@JohnM
The registry was modified by an Inno Setup script.
That is quite easy to do.
To modify a XML will be much harder…

Couldn’t you just run a macro inside Rhino with something like:

_-Options _Toolbars _Collection _Open "RUI fullpath/filename" !

It might be possible to run a remote script that will open a Rhino without the UI, run the macro and close it as well…

@JohnM

My RUI holds a single toolbar only.

Ok, I managed to modify the XML file, and the RUI loads.
BUT it is not visible in the Rhino UI until I set it to visible manually inside Rhino.

How can I make the toolbar appear, at least after freshly installed it?
There is no such info to find in the XML file.
Where is this info stored?

The initial state of a tool-bar is stored in the RUI file, the RUI is loaded and tool-bar groups are made visible based on the value in the RUI. Once Rhino loads all RUI files and creates all plug-in provided control bars the final layout positions and visibility states are read from the %appdata%\McNeel\Rhinoceros\6.0\settings\window_positions-Scheme__Default.xml file. If the RUI is being opened for the first time on a computer then there will not be an entry for it in the window position, this means the initial value stored in the RUI file will dictate the visibility state. The RUI visibility and default location information is updated each time the file is saved when Rhino closes, it should just be a matter of opening Rhino, showing your tool-bar closing Rhino then use that version of your RUI file.

Thanks John, that helps!
I didn’t notice that the visibility is stored in the RUI itself.

@JohnM

Let’s assume this scenario:
1 Rhino 6 runs.
Now I setup my toolbar by adding the RUI file name in the XML file.
Of course the toolbar won’t show in the currently running Rhino 6, that’s expected.

Then I start a next instance of Rhino 6.
This instance shows the toolbar as expected.
Then I close this Rhino instance.

And then the first Rhino instance.
No running Rhino anymore now.

On the start of Rhino, the RUI definition in the XML file is lost.
This is kind of expected, the last closed Rhino instance won on saving the settings.

When Rhino 6 came out, it was said that, as an enhancement over V5, the settings are synchronized.
In this case it seems to be not the case.

Is that known and intended?

(I know it is a good idea to close all Rhino instances before the setup. But what if a user doesn’t?)

1 Like