[Python] Can I create a toolbar with python like a plugin?

Can I create a toobar with python or do I need it manually created so that each button corresponds to a .py file?

1 Like

You’ll need manually create the .rui file.

– Dale

:thinking: I thought the toolbar is stored within an *.ini file. What are the contents of a .tb file?

update: correction it is not .ini but .rui

You can include multiple functions in a Python file and call them with different arguments from your buttons e.g.
-_RunPythonScript ”import my_lib;my_lib.func1(True)”

-_RunPythonScript ”import my_lib;my_lib.func1(False)”

1 Like

That’s cool @Dancergraham, but here I ask for an actual toolbar.

@dale, I poked around the net and found this post:

Apparently somewhere between Rhino4 and Rhino5 you switched from .tb to .rui.

I tried to open both in a text editor, it seems .rui is xml-based and .tb is a binary.

If I need .tb can you explain how to compile this file?
Can I do this with python?