Message 1 of 14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
I need to acitivate or deactivate a tile in dialog window with a Toggle-tile. The efect you can see in the short video (see gif file):
Im writing a Lisp routine with DCL section in the LSP file. The problem is I get the desired effect when there is a separate DCL file. How can I correct the following code to make it work without separate DCL file?
(defun c:test (/ dcl_id tmpfpath1)
(setq tmpfpath1 "D:\\DOWNLOADS\\test\\test.dcl") ;<-path of DCL file with double backslashes
(setq dcl_id (load_dialog tmpfpath1))
(new_dialog "testDCL" dcl_id)
(action_tile "tile2" "(mode_tile \"tile1\" (abs (-(atoi $value)1)))" )
(start_dialog)
);defun
(defun c:test1 (/ dcl_id tmpfpath1 infile1)
(setq tmpfpath1 (strcat (getvar "MYDOCUMENTSPREFIX") "\\TEMP1DCL.DCL") )
(setq infile1 (open tmpfpath1 "w"))
(write-line
"testDCL : dialog
{:edit_box {label = \"value1:\"; key = \"tile1\"; edit_width = 20; }
:toggle {key = \"tile2\"; label = \"test_toggle1\"; }
ok_cancel; }"
infile1
);write lin
(close infile1)
(setq dcl_id (load_dialog tmpfpath1))
(new_dialog "testDCL" dcl_id)
(action_tile "tile2" " (mode_tile \"tile1\" (abs (-(atoi $value)1))) " )
(start_dialog)
(unload_dialog dcl_id)
(vl-file-delete tmpfpath1 )
);defun
DCL file:
testDCL : dialog {
:edit_box {key = "tile1"; label = "value:"; edit_width = 10; }
:toggle { key = "tile2"; label = "Toggle 1"; }
ok_cancel; }
Solved! Go to Solution.