News:

Please note new Forum URL: forum.designcad.com

Main Menu

Exit Condition from Setpoint command

Started by bdeck, May 06, 2017, 12:06:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bdeck

Please provide a variable such as sys(999) to indicate the exit condition from the setpoint command.
Thanks,
bd

DrollTroll

Sys(1) should indicate the number of points actually set -- what other information are you looking for?
25 years with DesignCAD

bdeck

#2
Hi DT,

Doh!..... (edit)

I was looking for an indicator similar to sys(999) (escape key or return key on exit).

On reflection, it appears that the key can be deduced by comparing sys(1) to the prior value of sys(1) and the numerical parameter. Had forgotten that the escape key merely erases the last point set in the function, and does not exit the function unless it is pressed with no points set.

But on further reflection, there does not appear to be any way to determine which key was pressed when sys(1)=pntcount0 (in the example below).    (Edit)

Thanks,
bd

Quote
for i = 1 to 3
pntcount0=sys(1)
n=3
SETPOINT "set some points", n
if  sys(1)=pntcount0 then
        message "Esc Key pressed,  or Enter Keypressed with no points set.     (Edit) "
else
        if sys(1)<n then
                message "enter key pressed"
        else
                 message "n pnts set"
endif
next i
end