Page 1 of 1
Problem of next statement execution in a program
Posted: Tue Jan 25, 2005 4:05 am
by surjeet singh
Hello!!
How i can stop the execution of next statement in a program in intellicad 5. suppose i want to display a message after draw a polyline.e.g
(defun c
draw ()
(command "pline" pause pause "")
(alert "polyline is drawn")
)
Posted: Tue Jan 25, 2005 11:14 am
by CAD_B
Surjeet, I am not sure what you are asking. Your program stops at the Alert box. Are you looking for another way to pause execution? The get- functions are the usual way to do this : getpoint, getreal, getkword, etc.
Posted: Tue Jan 25, 2005 12:15 pm
by davep
After you gather the information with the "get" function, then issue the command using the info that you gathered.
Then use the "alert".
Posted: Thu Jan 27, 2005 3:16 am
by surjeet singh
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by CAD_B:
Surjeet, I am not sure what you are asking. Your program stops at the Alert box. Are you looking for another way to pause execution? The get- functions are the usual way to do this : getpoint, getreal, getkword, etc.<HR></BLOCKQUOTE>
Hello !!
I am sorry that a little bit confusion is created. My question means that when a statement as shown (command "pline" pause pause "") is going to be execute, program is jump to next statement before the complete execution of previous statement. i.e. according to the first statement, program has to ask for two pick points (pause pause) but after picking first point, program jump to next statement and the again previos statement(command "pline" pause pause "") executes. That is my problem.
(defun c:draw ()
(command "pline" pause pause "")
(alert "polyline is drawn")
)
Hope! you understand what's my problem.
thanks and regards
surjeet singh
Posted: Thu Jan 27, 2005 3:13 pm
by CAD_B
Surjeet, I think you have made your question clear, but when I run your code, it does not return to the pline command as you report. However, I am running Icad 4, not 5 and it is possible there is a difference. I can almost duplicate the return behavior by deleting the "" in the argument list. Then the command remains open and the program expects another point after the OK button is clicked. But, on my machine, the pline command accepts two points before the Alert box displays. Hopefully, someone running Icad 5 will test your code.