Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 6019

ProjectToCPlane command doesn't run on my C# script

$
0
0

@hk1 wrote:

Hi,

I was developing my command to call “ProjectToCPlane” internally but it never get through the command. Feels like I need some special trick before calling ProjectToCPlane… Can you help me out?

        Rhino.DocObjects.RhinoObject recentObject = doc.Objects.MostRecentObject();
        if (recentObject != null)
        {
            recentObject.Select(true, true);
            //bool result = Rhino.RhinoApp.RunScript("_-ProjectToCPlane Yes", true);
            Rhino.RhinoApp.RunScript("! _-ProjectToCPlane _Pause  _Yes", true);
            //r = Rhino.RhinoApp.ExecuteCommand(RhinoDoc.ActiveDoc, "_-ProjectToCPlane _Yes");
            doc.Views.Redraw();
        }

I tried ExecuteCommand, -ReadCommandFile, RunScript and RunScript only showed “_ProjectToCPlane” on prompt but still nothing happens…

While if I type this command(totally same script) manually in Rhino, perfectly works.

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6019

Trending Articles