dcl非常有限,所以可能不可能,还没有研究过。
只是快速修复,现在没有太多时间
- (defun C:CC () ; normally you would declare all your variables here
- (if (not(setq dcl_id (load_dialog "CHECKING.dcl")))
- (progn (alert "The DCL file could not be loaded!") (exit))
- (progn (if (not (new_dialog "CHECKING" dcl_id))
- (progn (alert "CHECKING.DCL file could not be loaded!") (exit))
- (progn (cc_set_tiles);;; added this to set your variables
- (action_tile "accept" "(saveVars)(done_dialog 2)")
- (action_tile "cancel" "(done_dialog 1)")
- (setq ddiag (start_dialog))
- (unload_dialog dcl_id)
- (if (= ddiag 1)
- (princ "\n END"))
- (if (= ddiag 2)
- (progn (setq IT (+ Im (* 2.87 Is)))
- (setq moment (/ (* wp tw L L) 8000))
- (setq stress (/ (* moment cm) Im))
- (setq stressratio (/ stress Fbm))
- (setq deflection (/ (* 5 wp tw L L L L) (* 384000 69600 IT)))
- (setq allowdeflection (/ L 175))
- (setq defratio (/ deflection allowdeflection))
- (setq pt1 (getpoint "\nGet 1st point : "))
- (setq pt2 (getcorner pt1 "\nGet 2nd point : "))
- (setq msg (strcat "\nActual Bending Stress = "
- (rtos stress 2 2)
- "\nAllowable Bending Stress = "
- (rtos Fbm 2 2)
- "\nStress Ratio = "
- (rtos stressratio 2 2)
- "\nActual Deflection = "
- (rtos deflection 2 2)
- "\nAllowable Deflection = "
- (rtos allowdeflection 2 2)
- "\nDeflection Ratio = "
- (rtos defratio 2 2)))
- (apply 'vl-cmdf (list "_mtext" pt1 pt2 msg "")))))))))
- ; tl = tile list / vl = variable list
- (defun cc_set_tiles ( / tl vl)
- (mapcar '(lambda (x y) (set_tile x (if (null (vl-symbol-value y)) "" (vl-princ-to-string (vl-symbol-value y)))))
- (list "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k") (list 'wp 'tw 'L 'Im 'Am 'cm 'Fbm 'Is 'As 'cs 'Fbs))
- )
|