我刚刚开始学习DCL。很酷。但我被卡住了。当用户输入他们的新选择时,我似乎无法通过公式重新计算我的平铺值。我可能只是把东西的顺序弄错了。
LISP如下:
- (defun C:testdcl (/ lu lp)
- (setq lu (getvar "LUNITS"))
- (setq lp (getvar "LUPREC"))
- (setq dcl_id (load_dialog "ConcTO.dcl"))
- (if (not (new_dialog "ConcTO" dcl_id))
- (exit)
- );if
- ;------------------- set up dialogue box default settings ----------------------
- (if (not b_depth)
- (setq b_depth "18.0")
- );end if
- (if (not s_thick)
- (setq s_thick "6.0")
- );end if
-
- ;------------------- set dialogue box default values ----------------------
- (set_tile "beam_depth" b_depth)
- (set_tile "slab_thick" s_thick)
- (set_tile "beam_area" (rtos (/ fBeamArea 144.0) 2 lp))
- (set_tile "slab_area" (rtos (/ fSlabArea 144.0) 2 lp))
- (setq tBeamDepth (get_tile "beam_depth"))
- (setq BeamDepth (atoi tBeamDepth))
- (setq tSlabThick (get_tile "slab_thick"))
- (setq SlabThick (atoi tSlabThick))
-
- (set_tile "beam_volume" (rtos (setq BeamVolume (/ (* fBeamArea BeamDepth) 1728.0 27.0)) 2 lp))
- (set_tile "slab_volume" (rtos (setq SlabVolume (/ (* fSlabArea SlabThick) 1728.0 27.0) 2 lp)))
- ;------------------- retrieve dialogue box values ----------------------
- (action_tile "beam_depth" "(setq beam_depth $value)")
- (action_tile "s_thick" "(setq slab_thick $value)")
- (action_tile "beam_area" "(setq beam_area $value)")
- (action_tile "beam volume" "(setq beam_volume $value)")
- (action_tile "s_area" "(setq slab_area $value)")
- (action_tile "slab volume" "(setq slab_vol $value)")
-
- (action_tile "ok" "(done_dialog 1)")
- (action_tile "cancel" "(done_dialog 0)")
- (start_dialog)
- (unload_dialog dcl_id)
-
- (princ)
- );defun
DCL以下:
任何帮助都将不胜感激。
谢谢
迈克在达拉斯 |