Search the Community
Showing results for tags 'input data'.
-
Ignore empty DCL input boxes when performing extrude multiple objects.
dimka posted a topic in AutoLISP, Visual LISP & DCL
I have multiple objects that are closed polylines and need to enter the extrude value through the DCL interface. Some of the input boxes are left empty/blank, meaning some of object I don’t want to extrude. When I want to extrude, the script will stop when it encounters a blank or 0 value. How can I write a script to skip the blank input box? Due to limited skill, I am very basic lisp experience and DCL to complete this lisp. I hope everyone can help, thank you this is the lisp (defun c:3dext1 () (setq AR "arlayer") ;AR (setq CO "colayer") ;CO (setq FR "frlayer") ;FR (dcl_3dextr) (princ) ) (defun dcl_3dextr ( ) (setq dcl_id_PARA (load_dialog "3Dextr.dcl")) (if (not (new_dialog "dextr" dcl_id_PARA)) (exit) ) (set_tile "arval" "") (set_tile "coval" "") (set_tile "frval" "") (action_tile "accept-ht" "(get_1ht) (done_dialog 1)") (action_tile "cancel" "(done_dialog)") (setq dd (start_dialog)) (cond ((= dd 1) (main-extru)) ) (unload_dialog dcl_id_PARA) ) (defun get_1ht () (setq arh (atof (get_tile "arval"))) (setq coh (atof (get_tile "coval"))) (setq frh (atof (get_tile "frval"))) ) (defun main-extru (/) (command "_.view" "_swiso" ) (command "_.zoom" "_extents") (command "_.LAYER" "_T" AR "_S" AR "_F" "*" "") (command "_.extrude" "all" "" arh ) (command "_.LAYER" "_T" CO "_S" CO "_F" "*" "") (command "_.extrude" "all" "" coh ) (command "_.LAYER" "_T" FR "_S" FR "_F" "*" "") (command "_.extrude" "all" "" frh ) (princ) ) ;_ defun DCL here dextr : dialog { label = "extrude by val" ; :row { : edit_box {key = "arval"; label = "a"; edit_width = 3; value = "000";} : edit_box {key = "coval"; label = "c"; edit_width = 3; value = "000";} : edit_box {key = "frval"; label = "f"; edit_width = 3; value = "000";} : button { label = "OK"; key = "accept-ht"; width = 12; fixed_width = true; mnemonic = "O"; } : button { label = "Cancel"; key = "cancel"; width = 12; fixed_width = true; mnemonic = "C"; is_cancel = true; } } } -
Input Data and can be used by other lisp program created
Russello posted a topic in AutoLISP, Visual LISP & DCL
Hello everyone. I just started reading stuffs and tutorials about lisp programming because I want to make a surveying program because I cant afford to buy one. Also, I want to learn the beauty of lisp. What I want is that to input first all the necessary data (name of lot, lot owner, location, geodetic engineer, date of survey, etc) which can be used for the other lisp program i will be making. My problem is I dont know how to start this. I know that the community here is very helpful so thanks in advance. God bless