Hello I am trying to ask the user to type in a number in order to perform operations, but I cannot at least I ask with th AddCommandNumber method and click on the option, but if I just type the number and press enter I get nothing. Here is the code I am using.
CRhinoGetNumber gD;
gD.SetCommandPrompt( L"Insert first measure" );
gD.AcceptNothing();
double m_dVal = 50;
int dval_option_index = gD.AddCommandOptionNumber(RHCMDOPTNAME(L"Dimension"), &m_dVal, L"double value", FALSE, 20, 100);
CRhinoGet::result res = gD.GetNumber();
if( res == CRhinoGet::nothing )
if( res == CRhinoGet::cancel )
return CRhinoCommand::cancel;
if( res != CRhinoGet::option )
return CRhinoCommand::failure;
double new_in = gD.Number();
ON_wString prompt("");
prompt.Format( L"Original (m2): %lf \n", new_in);
RhinoApp().Print( prompt );
double adition = new_in *2 + 50;
prompt.Format( L"Adition oRIGINAL(m2): %lf \n", adition);
RhinoApp().Print( prompt );
prompt.Format( L"First Gorilla (m2): %lf \n", m_dVal);
RhinoApp().Print( prompt );
double mult = m_dVal *2;
prompt.Format( L"Mult (m2): %lf \n", mult);
RhinoApp().Print( prompt );