little_figs Posted April 26, 2023 Posted April 26, 2023 (edited) I try to make a drawing through the form, I made a code using DCL, the form itself opens, but the drawing does not appear. tell me please what i did wrong. I attach the code (command "OPENDCL") (defun c:Main () (dcl_Project_Load "D:\Lb4" T) (dcl_Form_Show Lb4_Form1) (princ) ) (defun c:Lb4/Form1/TextButton1#OnClicked (/) (setq CoordX (atof(dcl-Control-GetText Lb4/Form1/TextBox1))) (setq CoordY (atof(dcl-Control-GetText Lb4/Form1/TextBox2))) (setq d (atof(dcl-Control-GetText Lb4/Form1/TextBox3))) (setq a (atof(dcl-Control-GetText Lb4/Form1/TextBox4))) (setq b (atof(dcl-Control-GetText Lb4/Form1/TextBox5))) (defun Lb4(d a b CoordX CoordY) (setq StartPoint (list CoordX CoordY)) (command "circle" StartPoint (/ d 2)) (setq p1 (list (- 0 (/ a 2)) (- 0 (/ b 2))) p2 (list (/ a 2) (/ b 2))) (command "rectang" p1 p2) (dcl_messagebox (strcat "done")) (dcl_Form_Close Lb4_Form1) ) ) Edited April 26, 2023 by SLW210 Code Tags! Quote
marko_ribar Posted April 27, 2023 Posted April 27, 2023 Ask someone at OpenDCL site, perhaps Owen W. Quote
Steven P Posted April 27, 2023 Posted April 27, 2023 1 hour ago, marko_ribar said: Ask someone at OpenDCL site, perhaps Owen W. Or at least post the code for the DCL as well, and perhaps what the command "openDCL" does. Quote
BIGAL Posted April 27, 2023 Posted April 27, 2023 (edited) in dcl this would need to be done when click OK not at end of code, (dcl_Form_Close Lb4_Form1) dont use Open_dcl. Use (alert "all done") no need for open_dcl. Edited April 27, 2023 by BIGAL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.