(defun C:samp5 ();( / REGION# DWGTYPE RNAMES DCL_ID) ;define function
(setq REGION# "R3") ;*preset Region
(setq DWGTYPE "FP") ;*preset FP
(setq RNAMES '("R1" "R3" "R4" "R7" "R8" "R9" "R10" "R11"))
(setq dcl_id (load_dialog "samp5.dcl")) ;load dialog
(if (not (new_dialog "samp5" dcl_id))
(exit) ;exit if no dialog
)
(start_list "selections") ;*start the list box
(mapcar 'add_list RNAMES) ;*fill the list box
(end_list) ;*end list
(action_tile "rb1" "(setq DWGTYPE \"FP\")") ;store DWGTYPE type
(action_tile "rb2" "(setq DWGTYPE \"SR\")") ;store DWGTYPE type
(action_tile
"cancel" ;if cancel button pressed
"(done_dialog) (setq userclick nil)" ;close dialog, set flag
);action_tile
(action_tile
"accept" ;if O.K. pressed
(strcat ;string 'em together
"(progn
(setq REGION# (atof (get_tile \"selections\")))" ;*get list selection
" (done_dialog)(setq userclick T))" ;close dialog, set flag
);strcat
);action tile
(start_dialog) ;start dialog
(unload_dialog dcl_id) ;unload
(if userclick ;*check O.K. was selected
(progn
(setq REGION# (fix REGION#)) ;*convert to integer
(setq REGION# (nth REGION# RNAMES)) ;*get the REGION#
);progn
);if userclick
(DO_WORK5)
(princ)
)
(princ)
(defun DO_WORK5()
(if (= DWGTYPE "FP") (FP-DWG))
(if (= DWGTYPE "SR") (SR-DWG)
)
(while (equal 8 (logand 8 (getvar "undoctl")))
(command "_.undo" "_end")
);while
(while (not (equal 8 (logand 8 (getvar "undoctl"))))
(command "_.undo" "_begin")
);while
)
(defun FP-DWG ()
(C:INSERTDIM)
(setq RLAYER (strcat REGION# DWGTYPE)) <---This is where I'm combining 2 items to make up the command that is in another lisp. I want to be able to call the RLAYER so that it will initiate the command from the 2nd lisp file. In this case it is DOWORK
(command "limmax" "10000,10000")
(command ".regen")
(princ)
)