Starting a Command from a User Control


#1

Hi everyone,

I created a Custom User Control with a button on it, which should execute one of my ownCommands from the same plug-In.

How Do I do that?

private void button13_Click(object sender, EventArgs e)
        {
            ???
        }

Thanks
Karl


(David Rutten) #2

Rhino.RhinoApp.RunScript()

see: http://4.rhino3d.com/5/rhinocommon/html/Overload_Rhino_RhinoApp_RunScript.htm


#3

Hi David,

that was eays :slight_smile: - Works great.
I kind of throught there was a more sophisticated way.

Just out of curiosity: That’s the command all the toolbars use internally, right?

Thanks.
Karl


(Steve Baer) #4

Yes, all of the toolbar buttons use runscript