Command.EndCommand and Runscript Combined

At the moment I can use rhinocommon commands in the EndCommand, but if i want to use RhinoApp.Runscript("",true) it wont run.

If I’m guessing right this is not possible because the EndCommand should run multiple times this way, but needs to finish before starting a new command.

The question is. Is it possible to use a RunScript in the EndCommand? In normal commands I need to add CommandStyle(Commands.Style.ScriptRunner) but it’s not possible here.

I need this because I patch a mesh in combination with an insole and when I move the mesh it should re-patch, smooth and other scipted parts to see the difference. This filtering is easily handled. But it wont run how it should because the RunScript is not running.

If I understand correctly, you want to the script the running of a command, using RhinoApp.RunScript while in the middle of an EndCommand event? Are you scripting the Patch command? You can use Brep.CreatePatch, of course.

I guess I don’t understand your work flow. But you say it doesn’t work, so I can at least agree with that.

I know I can use the patch in rhinocommon but I do more in runscript like smoothing and moving some control points what’s way easier to do in runscript in stead of rhinocommon.

But yes. I want too use runscript in endcommand and want to know if it’s possible. If not then I just need to create extra buttons for the user’s. Things that could be automated with the runscript.