Hello,
I am having an issue with adding numerical options into Rhino command line menu using Rhino.Input.Custom.GetOption.AddOptionList()
As already described in one of the older threads, if the option is string only consisting of numerical characters, it is not valid. But haven’t found the explanation why. When I pass numerical options as a list of strings, why would they not display? The issues with special characters I can somewhat expect, but the parser omitting numbers is annoying.
Is there really no other way around? I need to allow users to pick one of predefined scale factors. I cannot use 1:15, I cannot use 15, shall I then use “fifteen” or “1to15”? ![]()
Older thread here
import Rhino from Rhino.Input.Custom import GetOption def test_numeric_vs_string_options(): go = GetOption() go.SetCommandPrompt("Testing numeric vs string options") # String options (these WILL appear) string_options = ["A", "B", "C"] go.AddOptionList("StringOptions", string_options, 0) # Numeric-only options (these will NOT appear) numeric_options = ["1", "2", "3"] go.AddOptionList("NumericOptions", numeric_options, 0) # Mixed alphanumeric options (these WILL appear) mixed_options = ["1a", "2a", "3a"] go.AddOptionList("MixedOptions", mixed_options, 0) go.Get() test_numeric_vs_string_options()