Adding a string command line option

I’m writing a command that requires command line options. I’m starting from the sample at the link below. It works for me except for the fact that I need a multiple string options rather than double or integer and I can’t seem to figure out how to do those.


p.s. I was noticing that if I cut and paste the code directly, I get an error on the following line but replacing “is” with “=” solves it:
If get_rc Is Rhino.Input.GetResult.Point Then

Hi Sam,

There isn’t a ‘AddOptionString’ method on Rhino.Input.Custom.GetBaseClass. If you have a list of items, you can use AddOptionList. Otherwise, just use AddOption and then clicked just prompt the user for a string.

– Dale

Hi Dale,

I don’t have a list of known possibilities, but rather require a unique string input from the user. So I think that means I’m left with prompting for a string as a separate request (won’t be seen on the same line with other command line options). Is that right or am I missing something?


You’ve got it.