+ Reply to Thread
Results 1 to 4 of 4

Thread: Bug and wish rs.GetString()

  1. #1

    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.

  2. #2
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,464
    Blog Entries
    19
    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

  3. #3
    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

  4. #4
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,464
    Blog Entries
    19
    Yes the period is the problem. Only certain strings are permitted on the command line (no spaces and no punctuation).

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts