=You separate EXCEL-function/s and Dialog.DCL-display.You develope two-programs.lsp
first-----Dcl-dialog-display.lsp
Second--Excel-Links.lsp
Third. setup-vlaxcompil1-144mini.zip/download
=One big-crash your , you do not have unload_dialog.
action_tile("BT-CA-EMPRESA","(DONE_DIALOG 2)");
action_tile("BT-CA-AMBAS","(DONE_DIALOG 1)");
action_tile("BT-SAIR","(DONE_DIALOG 0)");
action_tile("accept","(done_dialog 3)");
action_tile("cancel","(setq acl nil)(done_dialog 4)");
$rr=start_dialog();
unload_dialog(edi);
=You set all varianile-names as one-wcmatch.Here is myDemo all variaible-names start with prefix=NN_*.
=I convert your-STANDARD-MENU-TELA-CAD.DCL as String and you store the STANDARD-MENU-TELA-CAD.DCL inside STring-Variabile.
if (!NN_MES) NN_MES="0";
if (!NN_VERBA ) NN_VERBA="0";
if (!NN_REVISAO ) NN_REVISAO="R0";
if (!NN_ESCPROJJ ) NN_ESCPROJJ="1: 50";
if (!NN_END_OBRA ) NN_END_OBRA="RUA ";
if (!NN_CONTRATO ) NN_CONTRATO="ADD N-ª CONV+ΦNIO";
if (!NN_PROJJ ) NN_PROJJ="0";
if (!NN_SPROJ ) NN_SPROJ="0";
if (!NN_CITY ) NN_CITY="0";
if (!NN_NOME ) NN_NOME="0";
if (!NN_ENDE ) NN_ENDE="0";
if (!NN_MAIL ) NN_MAIL="0";
foreach(nop,lds,set(read("dyn"),eval(read(strcat("NN_",nop)))),
mes=(dyn==nil)?"0":set_tile(nop,dyn));
foreach(nop,ldc,set(read("dyn"),strcat("(SETQ NN ",nop," $value)")),
action_tile(nop,dyn));

(sEtq movd ""
movd (strcaT movd "dcl_settings : default_dcl_settings { audit_level = 0; }\n//////////////////////\nEXECUTAR_TELA_CARIMBO : dialog ");;
movd (strcaT movd "\n{label = \"STANDARD©2021\";\n:row{\n : boxed_column{ label=\"[ INFORME OS DADOS DA OBRA ]\";\n : popup_list {label = \"SOLICITANTE \" ; key = \"LLNCITY\" ;fixed_width=true;width=30;edit_width =70;}\n : popup_list {label = \"TITULO PROJETO \" ; key = \"LLPROJJ\" ;fixed_width=true;width=30;edit_width =70;}\n : popup_list {label = \"SUBTITULO \" ; key = \"LLSPROJ\" ;fixed_width=true;width=30;edit_width =70;}\n : edit_box {label = \"ENDERECO OBRA \" ; key = \"END_OBRA\" ;fixed_width=true;width=30;edit_width =70;}\n ");;
movd (strcaT movd " }\n}\n:row{\n : boxed_column{ label=\"[ DADOS COMPLEMENTARES ]\";\n : popup_list {label = \"TIPO RECURSO \" ; key = \"VERBA\" ;fixed_width=true;width=0;edit_width =70;} \n : edit_box {label = \"NO. CONTRATO \" ; key = \"CONTRATO\" ;fixed_width=true;width=0;edit_width =70;}\n }\n}\n:column{\n : boxed_row{ label=\"[ DADOS DO DESENHO ]\";\n : popup_list {label = \"MES/ANO\" ; key = \"MES\" ;fixed_width=true;width=20;edit_width =10;alignment=centered;} \n : edit_box {label = \"ESCALA \" ; key = \"ESCPROJJ\" ");;
movd (strcaT movd " ;fixed_width=true;width=0;edit_width =10;}\n : edit_box {label = \"REVISAO \" ; key = \"REVISAO\" ;fixed_width=true;width=0;edit_width =10;}\n }\n}\n:column {\n :row{ label=\"\";\n : button {label = \" SAIR \" ; key = \"BT-SAIR\" ; fixed_width=true;width=15;alignment=centered;}\n : button {label = \"FORMATO AMBAS\" ; key = \"BT-CA-AMBAS\" ; fixed_width=true;width=0;alignment=centered;is_default=true;}\n : button {label = \"FORMATO STANDARD\" ; key = \"BT-CA-EMPRESA\" ; fixed_width=true;width=0;alignment=centered;is_default=true;}\n ");;
movd (strcaT movd " spacer_1;\n }\n }\n ok_cancel;\n spacer;\n}\n "))