How to use Rhino's function in plugin development?

I want to use the function like ‘smooth’, but this function has a popup dialogue.
How can I use this function without popup dialogue and how to set the parameters this function needed when developing a plugin with C#?
Thanks in advance.

Your interface to Rhino in C# is RhinoCommon. Whatever Rhino command there is available at this point is exposed and docmented there.

Functions for curves should be grouped with the Rhino.Geometry.Curve type. Some commands may be shortcuts of two or three exposed RhinoCommon functions.

If you absolutely Need to use the Rhino command, you can use prefixes to suppress dialog boxes. (Scriping prefixes)

Hi Austin,

If you are looking to create your own version of the Smooth command in a Rhino 5 plug-in, then you are out-of-luck. The core functionality behind the Smooth command was not exposed for SDKs in Rhino 5. The best you can do is to script the Smooth command using Rhino.RhinoApp.RunScript. Note, if you precede the command name with a hyphen character, you can suppress the dialog box.

The good news is the Rhino 6 SDK will expose the functionality behind the Smooth command. Thus, you won’t have to script the Smooth command in Rhino 6 plug-ins.

Let me know if you need an example for my “Rhino 5” part…

Thanks for your reply, Dale. I just want to use the ‘smooth’ in my plugin without popping up the dialog box and transfer the right parameters to this function. How ?
Thank you

Hi Austin,

This sample is probably more complicated than it need to be. But you might find it helpful.

Hi Dale,

Thanks for your reply to the problem. It would be great if you could provide a python sample. Thank you!