Hi,
I have the RhinoArtisan Rui file with the menu and the toolbars. When our clients executes Rhino, we want to show them the toolbar.
The plugin is loaded, and Rhino loads the rui file. But no one toolbar is shown. Then, I’m trying to do it by code.
I tried to do that:
-
Save the rui file with the main toolbar visible. But it doesn’t work on my side.
-
Get the toolbar by code and show it!
foreach (var toolbarFile in RhinoApp.ToolbarFiles)
{
if (toolbarFile.Name != "Artisan") continue;
for (int index = 0; index < toolbarFile.ToolbarCount; index++)
{
var toolbar = toolbarFile.GetToolbar(index);
// "I didn't found toolbar.Visible properties"
}
}
-
I realize that there are groups, because they have the property Visible. Then, I get the groups, but there are not groups on RhinoArtisan toolbar. I tried to create them in the
-
I went to the toolbar, but I can not create a group, but it is disabled.
- I was trying to run the command “! _-ShowToolbar Artisan” and it shows the toolbar, then I create a command to try to do it by code:
[CommandStyle(Style.ScriptRunner)]
public class ShowToolbarCommand : Command
{
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
RhinoApp.WriteLine("! _-ShowToolbar \"Artisan\"", true);
What I’m doing wrong? Just I need to show a toolbar when the plugin loads.
Thanks,
Rafa