ERROR IN ALL LIST IF MODIFY IN DCL

ERROR IN ALL LIST IF MODIFY IN DCL

rolisonfelipe
Collaborator Collaborator
635 Views
3 Replies
Message 1 of 4

ERROR IN ALL LIST IF MODIFY IN DCL

rolisonfelipe
Collaborator
Collaborator

HOW TO TRANSFORM THE SELECTION OF THIS LIST IN TEXT INSIDE THE TEXT BLOCK

 


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(SETQ VERBA (LIST "LIST1" "LIST2" "LIST3"))

(SETQ MES (LIST "JAN./2021" "FEV./2021" "MARÇ./2021" "MARÇ./2021" "ABRIL./2021" "MAIO./2021" "JUN./2021" "JUL./2021" "AGO./2021" "SET./2021" "OUT./2021" "NOV./2021" "DEZ./2021"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ERROR IN ALL LIST IF MODIFY IN DCL , THE LIST DON'T GO FOR BLOCK TEXT, IT IS LOAD, ABOUT DON'T GO FOR BLOCK TEXT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 

0 Likes
636 Views
3 Replies
Replies (3)
Message 2 of 4

john.uhden
Mentor
Mentor

With my inability to understand what I think to be Spanish, I can't tell what you are trying to do.

I am so sorry.

John F. Uhden

0 Likes
Message 3 of 4

rolisonfelipe
Collaborator
Collaborator

John F. Uhden, hello dear friend! this post is an error in a list that I have already solved, however, the error in importing data from excel, where when selecting the name of a city, which is in a cell, a1 the programming should import the sequence b1 c1 d1 e1 f1 that is given for that city, if I wanted data from a city that was on a line type a5, the data b5 c5 d5 e5 f5 would be imported, it seems that when I enter any line it is F1 the programming makes it possible to always import the sequence b1 c1 d1 e1 f1 or if I select G1 it only imports b1 c1 d1 e1 f1 ....

it seems to me that the problem is here

; ///////////////////////////////////////////////// ///////////////////////////////////////////////
; ///////////////////////////////////////////////// /////////////////////////////// READ XLS COMMANDS
; ///////////////////////////////////////////////// ///////////////////////////////////////////////
(DEFUN EXECUTE-LEARQXLS ()
;
(VL-LOAD-COM)
(NIL CELLS SETQ)
(SETQ EXCEL-APP (VLAX-CREATE-OBJECT "EXCEL.APPLICATION"))
(SETQ WB-COLLEC (VLAX-GET EXCEL-APP "WORKBOOKS"))
;
(SETQ ARQXLS (FINDFILE "STANDARD.XLS")); open the exel file
(IF (NOT ARQXLS)
(PROGN
(ALERT "*** XLS FILE NOT FOUND! ***")
(EXIT)
)
)

; ///////////////////////////////////////////////// ///////////////////////////////////////////////
; ///////////////////////////////////////////////// ///////////////////////////////////////////////
; ///////////////////////////////////////////////// ///////////////////////////////////////////////

(SETQ ARQVO (VLAX-INVOKE-METHOD WB-COLLEC "OPEN" ARQXLS))
(SETQ PASTAS (VLAX-GET ARQVO "SHEETS")); select the folder
(SETQ PASTA1 (VLAX-GET-PROPERTY FOLDERS "ITEM" 1)); selects folder 1

; ///////////////////////////////////////////////// ///////////////////////////////////////////////
; ///////////////////////////////////////////////// ///////////////////////////////////////////////
; ///////////////////////////////////////////////// ///////////////////////////////////////////////

(CELLS SETQ (VLAX-GET PASTA1 "CELLS"));
(SETQ LLNCITY '()); set var
(SETQ LLNAME '()); set var
(SETQ LLENDE '()); set var
(SETQ LLMAIL '()); set var
(SETQ LL 2)
(LE-LINE-XLS LL 10)
(SETQ NN 0)
(WHILE (OR (/ = "" (NTH 0 LXLS)))
(SETQ LLNCITY (CONS (NTH 0 LXLS) LLNCITY)); set var for data a1 excel
(SETQ LLNOME (CONS (NTH 1 LXLS) LLNAME)); set var for data b1 excel
(SETQ LLENDE (CONS (NTH 2 LXLS) LLENDE)); set var for data c1 excel
(SETQ LLMAIL (CONS (NTH 3 LXLS) LLMAIL)); set var for data d1 excel
(SETQ LL (+ LL 1))
(LE-LINE-XLS LL 10)
)
(SETQ LLNCITY (REVERSE LLNCITY))
(SETQ LLNAME (REVERSE LLNAME))
(SETQ LLENDE (REVERSE LLENDE))
(SETQ LLMAIL (REVERSE LLMAIL))

0 Likes
Message 4 of 4

diagodose2009
Collaborator
Collaborator

=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));

 

 

 

Clipboard.jpg

 

 

 

 

 (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 "))

 

 

 

 

0 Likes