Give CRhinoCommand parameters

I have a c++ test program

CRhinoCommand::result CCommandTest::RunCommand( const CRhinoCommandContext& context ){...}

Which I run from RhinoScript like this (With no problems)

success = rs.Command("Test", False)

But how do I add parameters to the command, something like this.

CRhinoCommand::result CCommandTest::RunCommand( const CRhinoCommandContext& context , float a)
{
if(a > 0.5){...}
}
success = rs.Command("_-Test %f _Enter" % 0.4, False)

Thank for the help

I think this may be useful

Note however, that you cannot add parameters to the RunCommand (the float a) function. You must add them inside the RunCommand function, as is shown in the command sample above.

1 Like