-
Bug and wish rs.GetString()
Hi Steve
I think I found a bug when doing:
rs.GetString(message='Options', defaultString='Enter',
strings=['Count{0}'.format(10), 'Radius{0}'.format(5), 'Enter'])
the command line displays Count10 and Enter, but the Radius5 is missing.
In addition to that bug, 'Enter' as a string does not work. The return when cklicking on 'Enter' is None.
My wish would be to do the following:
rs.GetString(message='Options', defaultString='Enter',
strings=['Count={0}'.format(count), 'Radius={0}'.format(radius), 'Enter'])
in order to display Count=10, Radius=5, Enter.
I would also be happy with any other type of delimiter or space.
Thanks
Silvan
Last edited by Silvan; 06-10-2012 at 06:36 PM.
-
Senior Member
Hmm that's strange. The "Radius5" is showing on my command line. My release Rhino is not the latest beta, so this may be something new. I'll have to check with the latest beta.
I see the problem that you are having with clicking on Enter. This is probably a special case since default handling of Enter is so "built-in" for Rhino input. I'll try to figure out what is going on with that.
You can get the type of behavior that you are looking for in your wish if you write a little RhinoCommon. Here is a RhinoCommon python sample that sets up command line options
http://wiki.mcneel.com/developer/rhi...andlineoptions
Thanks,
-Steve
-
Hi Steve
Thanks, I'll switch this to Rhino common.
Regarding the "Radius5" bug, it is only happening when "Radius" is a float, ints and strings work. I assume it is the "." from the float causing the problem.
Best,
Silvan
-
Senior Member
Yes the period is the problem. Only certain strings are permitted on the command line (no spaces and no punctuation).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules