你好
1)第一次启动程序-带有默认值的DCL窗口
2)第二次和下一次启动程序-DCL窗口,其中包含您先前输入的值
DCL:
- r1:boxed_row{
- width=60;
-
- :boxed_column{
-
- : text {label = "Enter dimensions:"; key = "w_t1";}
- : edit_box {label = "A (Width)"; key = "W_A"; edit_width=10; value = "0";}
- : edit_box {label = "B (Lenght)"; key = "W_B"; edit_width=10; value = "0";}
- : edit_box {label = "C (Height)"; key = "W_C"; edit_width=10; value = "0";}
- : edit_box {label = "H1 (Front)"; key = "W_H1"; edit_width=10; value = "50";}
- : edit_box {label = "H2 (Back)"; key = "W_H2"; edit_width=10; value = "30";}
- : edit_box {label = "CH (Chamfer)"; key = "W_CH"; edit_width=10; value = "25";}
- : edit_box {label = "D (Diameter outlet)"; key = "W_D"; edit_width=10; value = "51";}
- : edit_box {label = "E (>CH)"; key = "W_E"; edit_width=10; value = "75";}
- : edit_box {label = "D1 (Diameter of bar)"; key = "W_D1"; edit_width=10; value = "16";}
- : edit_box {label = "F1"; key = "W_F1"; edit_width=10; value = "50";}
- : edit_box {label = "F2"; key = "W_F2"; edit_width=10; value = "50";}
- : edit_box {label = "G"; key = "W_G"; edit_width=10; value = "150";}
- : edit_box {label = "H (>D1)"; key = "W_H"; edit_width=10; value = "30";}
- }
- :boxed_column {:image{width=120; height=35; aspect_ratio=3; color=-2; key="dbimage"; is_enabled=false;}
- }
- }
- d1:dialog{label="Drain Pallet";
- r1;
-
- ok_cancel;
- }
LSP部分:
- ;-----Read_Dimensions_From_DCL-----
- (defun savevars()
- ;-----Box-----
- (setq A (atoi (get_tile "W_A")))
- (setq B (atoi (get_tile "W_B")))
- (setq C (atoi (get_tile "W_C")))
- ;-----Slope-----
- (setq H1 (atoi (get_tile "W_H1")))
- (setq H2 (atoi (get_tile "W_H2")))
- ;-----Chamfer-----
- (setq CH (atoi (get_tile "W_CH")))
- ;-----Drain_Tube---------
- (setq D (atoi (get_tile "W_D")))
- ;-----Handrails-----
- (setq E (atoi (get_tile "W_E")))
- (setq D1 (atoi (get_tile "W_D1")))
- (setq F1 (atoi (get_tile "W_F1")))
- (setq F2 (atoi (get_tile "W_F2")))
- (setq G (atoi (get_tile "W_G")))
- (setq H (atoi (get_tile "W_H")))
- )
此程序的所有文件都在附件中。
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复 |