What do you call it when you want your DCL Box to be open while the user performs other commands. Then the user can select another button on the DCL and finally Close the DCL. (I hope that makes sense).
(defun C:Convert2Render()
(setq dcl_id (load_dialog "Convert2Render.dcl"))
(if (not (new_dialog "Convert2Render" dcl_id) ) (exit))
(action_tile "cancel" "(setq ddiag 1)(done_dialog)")
(action_tile "accept" "(setq ddiag 2)(done_dialog)")
(action_tile "accept1" "(setq ddiag 3)(done_dialog)")
(action_tile "accept2" "(setq ddiag 4)(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
(if (= ddiag 1)
(princ "\n \n ...test Cancelled. \n ")
)
(if (= ddiag 2)
(c:Part1)
)
(if (= ddiag 3)
(c:Part2)
)
(if (= ddiag 4)
(c:Part3)
)
)
(defun c:Part1()
(layerstate-delete "Civil Layers Linetypes")
(layerstate-importfromdb "Civil Layers Linetypes" "//INDYSANP/Libraries/Autodesk/Civil 3D/2016/Template/Department Layers/Civil Dept Layers.dwg")
(layerstate-restore "Civil Layers Linetypes")
(command ".layer" "Set" "0" "")
(command ".layer" "Lock" "C_*" "")
(command ".layer" "UnLock" "C_PVMT_STRIPING_PARKING,C_PVMT_STRIPING_ROAD,C_PVMT_STRIPING_ADA" "")
(command "_pedit" "multiple" "all" "" "width" "0.50" "")
(command ".layer" "color" "Truecolor" "255,255,255" "C_PVMT_STRIPING_PARKING,C_PVMT_STRIPING_ROAD" "")
(command ".layer" "color" "Truecolor" "153,230,255" "C_PVMT_STRIPING_ADA" "")
(command ".layer" "UnLock" "C_*" "")
(command ".layer" "freeze" "*" "")
(command ".layer" "thaw" "C_BLDG,C_CONC*_CURB,C_CONC*_DUMPSTER,C_CONC*_WALK,C_PVMT_ASPHALT,C_PVMT_CONC*,C_STM_PAVED_DITCH,C_STM_POND,C_SVY_BOUNDARY_LINE" "")
(command ".select" "all" "")
(command ".layer" "thaw" "defpoints" "set" "defpoints" "")
(command "_copytolayer" "previous" "" "defpoints" "")
(command ".layer" "freeze" "*" "")
(command ".layer" "thaw" "0" "")
(C:Convert2Render)
(princ))
(defun c:Part2()
(command "_AeccCreateParcelFromObjects")
(princ))
(defun c:Part3()
(command "._draworder" (ssget "_x" '((0 . "aecc_parcel"))) "" "_b")
(C:Convert2Render)
(princ))
(C:Convert2Render)
Convert2Render : dialog {
label = "Convert to Render";
: boxed_column {
label = "Convert to Render";
: button {
key = "accept";
label = "Part 1";
is_default = true;
}
{ height = 0.3; }
: button {
key = "accept1";
label = "Part 1";
is_default = true;
}
{ height = 0.3; }
: button {
key = "accept2";
label = "Part 2";
is_default = true;
}
{ height = 0.3; }
: button {
key = "accept3";
label = "Part 3";
is_default = true;
}
}
{ height = 1; }
: button {
key = "cancel";
label = "Cancel";
is_default = false;
is_cancel = true;
}
}