I’m working on a command with multiple option inputs, among them also one which prompts the user to enter a string. The way I’m doing this is with an AddOption which when selected calls a GetString class.
if (res == Rhino.Input.GetResult.Option)
{
if (go1.OptionIndex() == OptionsIndices[0])
{
if (OutPrefixOp.GetLiteralString() == GetResult.String)
{
UserPrefix = OutPrefixOp.StringResult();
}
}
…
}
After the string is entered, the command goes back to the “main” options line. The problem with this approach is that it doesn’t automatically update the AddOption parent value of the GetString like AddOptionInteger / Boolean / List do when the command is still active. It only shows the updated inputs when the command is run again. Is there a way of making the AddOption update its value while the command is running?
Can you please post something that we can run here that reproduces what you are seeing? The small code snippet isn’t enough for me to understand what you are doing.