Bug in rs.GetLine() prompts

With the following code:

import rhinoscriptsyntax as rs

msg1="Pick first point of line in Top view"
msg2="Pick second point of line in Top view"
line_pts=rs.GetLine(1,message1=msg1,message2=msg2)

the second message prompt is ignored.

Message 1 is seen, but after the first point is picked, instead of message 2, one sees End of line at the command prompt.

@Helvetosaur message3 is the end of line prompt. message2 is the middle point prompt:

def GetLine(mode=0, point=None, message1=None, message2=None, message3=None):
    gl = Rhino.Input.Custom.GetLine()
    if mode==0: gl.EnableAllVariations(True)
    else: gl.GetLineMode = System.Enum.ToObject( Rhino.Input.Custom.GetLineMode, mode-1 )
    if point:
        point = rhutil.coerce3dpoint(point)
        gl.SetFirstPoint(point)
    if message1: gl.FirstPointPrompt = message1
    if message2: gl.MidPointPrompt = message2
    if message3: gl.SecondPointPrompt = message3
    rc, line = gl.Get()
    if rc==Rhino.Commands.Result.Success: return line.From, line.To

Ah, OK, thanks!!

1 Like