(DEFUN C:UGST_DCL (/ B H D AKS SS FM ex ey ez AT TBG TB AA AI1 AI LM1 LM2 AB AK p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 dialog_return_value width height ) ; ax ay Koordinaten von Punkt A ; bx by Koordinaten von Punkt B ; a Punkt A ; b Punkt B ; dialog_return_value Rückgabewert von Dialog ; kopiertes eingefügt (setq width (dimx_tile "img") height (dimy_tile "img") ) ;_ end of setq (start_image "img") (slide_image 15 2 15 15 "ok.sld") (end_image) ; kopiertes eingefügt ende (DEFUN dialog_control (/ dialog_read dialog_file_handle) ; dialog_file_handle Zeiger auf Dialog-Datei (DEFUN dialog_read () ;GET_TILE: holt aus DCL-Text-Feld Eintrag ;ATOF : wandelt Text in Gleitkomma-Wert (Ascii TO Flot) (SETQ B (ATOF (GET_TILE "KB"))) (SETQ H (ATOF (GET_TILE "KH"))) (SETQ D (ATOF (GET_TILE "KT"))) (SETQ AKS (ATOI (GET_TILE "zz"))) (SETQ SS (ATOF (GET_TILE "yy"))) (SETQ FM (ATOF (GET_TILE "xx"))) (SETQ ex (ATOF (GET_TILE "apx"))) (SETQ ey (ATOF (GET_TILE "apy"))) (SETQ ez (ATOF (GET_TILE "apz"))) ) ; Laden der Dialog-Datei (SETQ dialog_file_handle (LOAD_DIALOG "Juke.dcl") ) ; Auswahl des STRECKE_AB-Dialoges (NEW_DIALOG "Juke" dialog_file_handle) ; Übergabe der LSP-Programms "dialog_read" an Button "OK" ; und setzen der Rückgabe des Dialogs auf 1 wenn "OK" gewählt (ACTION_TILE "ok" "(dialog_read) (DONE_DIALOG 1)") ; Starten des Dialogs (auf Bildschirm) und ; Rückgabe in Variable "dialog_return_value" speichern (SETQ dialog_return_value (START_DIALOG)) ; Entladen der Dialog-Datei (UNLOAD_DIALOG dialog_file_handle) ) (dialog_control) ; Auswerten der Rückgabe des Dialoges (if (= dialog_return_value 1) ; es wurde der "OK"-Button gewählt (PROGN ; Berechnung weiterer Werte (setq AT (- AKS 1)) (setq TBG (- B (* FM AKS))) (setq TB (/ TBG AT)) (Setq AA (- SS FM)) (Setq AI1 (- SS FM)) (Setq AI (/ AI1 2)) (Setq LM1 (- TB AI AA)) (Setq LM2 (- TB AI AI)) (setq AB (+ LM2 SS)) (Setq AK (- AKS 3)) ; Berechnung der x -Punkte (setq x1 ex) (Setq x2 (+ x1 SS LM1)) (Setq x3 (- (+ x1 B) SS)) (setq x4 (- x3 LM1 SS)) (setq x5 (+ x2 1)) (Setq x6 (+ x1 SS)) (Setq x7 (+ x2 SS)) (Setq x8 (+ x1 B)) (setq x9 (+ x4 SS)) (Setq x10 (- x1 80)) (setq x11 (+ x7 LM2)) (setq x12 (+ x11 SS)) ; Berechnung der y -Punkte (setq y1 ey) (Setq y2 (+ y1 D)) (setq y3 (+ y2 80)) (setq y4 (+ y2 150)) ; Berechnung der z-Punkte (setq z1 ez) (setq z2 (+ z1 1)) (SETQ p1 (LIST ex ey ez)) (Setq p2 (list x2 y1 z1)) (Setq p3 (list x3 y1 z1)) (setq p4 (list x4 y1 z1)) (setq p5 (list x5 y1 z1)) ; Punkte für die Bemaßung (Setq p6 (list x1 y2 z1)) (Setq p7 (list x6 y2 z1)) (Setq p8 (list x2 y2 z1)) (Setq p9 (list x7 y2 z1)) (Setq p10 (list x8 y2 z1)) (Setq p11 (list x3 y2 z1)) (setq p12 (list x1 y3 z1)) ; Bemaßungsabstand (Setq p13 (list x9 y2 z1)) (Setq p14 (list x4 y2 z1)) (Setq p15 (list x1 y4 z1)) ; Bemaßungsabstand (Setq p16 (list x10 y1 z1)) ; Bemaßungsabstand (Setq p17 (list x11 y2 z1)) (setq p18 (list x12 y2 z1)) ; Zeichnen der Korpusseiten außen (command "-layer" "SE" "Korpusseiten" "") (command "_.box" p1 "L" SS. D. H.) (command "_.box" p2 "L" SS. D. H.) (command "_.box" p3 "L" SS. D. H.) (command "_.box" p4 "L" SS. D. H.) (command "-reihe" p5 "" "" 1 AK AB) ; Bemaßung (command "-layer" "SE" "Bemaßung" "") (command "bem" "Hor" p6 p7 p12 "") (command "bem" "Hor" p7 p8 p12 "") (command "bem" "Hor" p8 p9 p12 "") (command "bem" "Hor" p10 p11 p12 "") (command "bem" "Hor" p11 p13 p12 "") (command "bem" "Hor" p13 p14 p12 "") (command "bem" "Hor" p6 p10 p15 "") (command "bem" "ver" p1 p6 p16 "") (command "Bem" "Hor" p9 p17 p12 "") (command "Bem" "Hor" p17 p18 p12 "") (command „\e“) (command "-reihe" p9 "" "" 1 AK AB) (command "-layer" "SE" "0" "") (PRINT "Befehl ausgeführt") ) ; der Dialog wurde auf andere Weise beendet (PROGN (PRINT "Abgebrochen") ) ) (princ) )