大家好
我差一点就成功了,但我看不出有什么错误
虽然我知道可能有很多其他的方法来实现我在这里尝试的,幽默我将你与这一个。
当做
托尼
这是我的DCL代码
- tozafootingsRD
- : dialog { label = "Insert a Footing " ;
- : row {
- : boxed_column { label = "Cylindrical Footing" ;
- : boxed_column {
- : image { key = "cylinder" ; height = 8.0 ; width = 30.0 ;
- fixed_width = true; fixed_height = true; color = 0 ;}
- }
- : boxed_column {
- : edit_box { key = "rdc"; label = "Diameter of Footing"; edit_width = 6;
- alignment = left ; allow_accept = true;}
- : edit_box { key = "rdd"; label = "Depth of Footing"; edit_width = 6;
- alignment = left ; allow_accept = true;}
- }
- }
- : spacer {}
- }
- ok_cancel ;
- }
这是我的LISP代码
- (defun C:tozafootingsRD (/ c1)
- (setq dcl_id (load_dialog "tozafootingsRD.dcl"))
- (if (not (new_dialog "tozafootingsRD" dcl_id)
- )
- (exit)
- )
- (setq w (dimx_tile "cylinder")
- h (dimy_tile "cylinder")
- )
- (start_image "cylinder")
- (slide_image 0 0 w h "LBOLTS.sld")
- (end_image)
- (defun setVars (/ d1 d2)
- (setq d1 (distof (get_tile "rdc"))
- d2 (distof (get_tile "rdd"))
- )
- )
- (action_tile "accept" "(setVars) (done_dialog) (setq userclick T)")
- (setq c1 (getpoint "\nPick Centre Top of footing "))
- (command "cylinder" c1 (/ d1 2) (- d2))
- (action_tile "cancel" "(done_dialog) (setq userclick nil)")
- (start_dialog)
- (unload_dialog dcl_id)
- (princ)
- )
|