乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 67|回复: 0

[编程交流] I need help me with the Popup_

[复制链接]

12

主题

25

帖子

13

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-5 17:53:01 | 显示全部楼层 |阅读模式
Hi, I have a question:
I´ve got several ready in a "popup list" and I  want every time you choose one of these lists the contents of these look  a "list_box"
 
  1. ;;;---------------------------------------- setvar --------------------------(defun saveVars() (setq blkList (list))  (setq ignlist (get_tile "bloqlist"))   (setq count 1)    (while (setq fila (read ignlist))   (setq blkList (append blkList (list (nth fila bloList))))   (while      (and       (/= " " (substr ignlist count 1))       (/= ""  (substr ignlist count 1)))     (setq count (1+ count)))   (setq ignlist (substr ignlist count))));;;---------------------------------------- read file "1-DWG-TOMACORRIENTES.txt" for default --------------------------(defun blokinf ()(setq bloList (list))   (if (findfile "1-DWG-TOMACORRIENTES.txt") (progn(if (setq ruta (open (findfile "C:/Program Files/AutoCAD 2008/1-DWG-TOMACORRIENTES.txt") "r"))(progn        (read-line ruta)  (while (setq pa (read-line ruta))         (setq bloList          (append bloList(list (list pa)))))(close ruta))))) bloList );;;---------------------------------------- main program --------------------------(defun c:E1 ( / bloqlist$ infolist$)(if (not *E1@) (setq *E1@ (list nill "" "")))(setq bloqlist$ (nth 1 *E1@))(setq infolist$ (nth 2 *E1@))(setvar "cmdecho" 0)(setq bloList (blokinf))   (if bloList   (progn(setq dcl_id (load_dialog "INSERT-1.dcl"))      (if (not (new_dialog "INSERTA" dcl_id "" (cond (*screenpointE1*) ('(-1 -1)))))      (progn(princ "\n**ERROR**") (exit)))     (setq bloNames (list))    (foreach pa bloList(setq bloNames (append bloNames(list (car pa)))))(setq folder (GetDwgsMob "AutoCAD 2008")) ;;add version autocad to folder;;;;(_addlist "bloqlist" bloNames)(_addlist "infolist" folder)(set_tile "bloqlist" bloqlist$)(set_tile "infolist" infolist$)(action_tile "bloqlist" "(setq bloqlist$ $value)")(action_tile "infolist" "(start_list "bloqlist") (mapcar 'add_list (eval (read (strcat "1-DWG-" $value ".TXT")))) (end_list)")(action_tile "cancel" "(setq *screenpointE1* (done_dialog 1))")(action_tile "accept" "(saveVars)(setq *screenpointE1* (done_dialog 2))")(setq ddiag (start_dialog))(unload_dialog dcl_id)(setq *E1@ (list nil bloqlist$ infolist$))(if (= ddiag 1) (prompt "\n**Cancel**"))  (princ))));;----------------- Path-2DAMobBasico ------------------------------------;; main route ---> "C:/Program Files/";;------------------------------------------------------------------------(defun Path-2DAMobBasico () "C:/Program Files/");;------------------------ GetDwgsMob ------------------------------------------------------------------;; collects data from the specified directory  (setq folder (GetDwgsMob "AutoCAD 2008"));; return ---> "C:/Program Files/AutoCAD 2008/";;------------------------------------------------------------------------------------------------------(defun GetDwgsMob (sParentMob / ListaMob DirMobTipo)             (if (setq DirMobTipo (strcat (Path-2DAMobBasico) sParentMob))     (setq ListaMob (vl-directory-files (strcat DirMobTipo "\") "*.txt" 1)       ListaMob (mapcar (function vl-filename-base) ListaMob))       );c.if    ListaMob   );c.defun       (defun _addlist ( key lst )       (start_list key)       (foreach x lst (add_list x))       (end_list)       lst)
  1. INSERTA : dialog { label = "Program.....";          initial_focus="bloqlist";         : column {           spacer_1;         : boxed_row { label = "content of each list"; alignment = centered;         spacer_1;          : list_box { key = "bloqlist"; allow_accept = true; fixed_width = true; width = 40; value = "0";}        }         spacer_1;         }         spacer_1;       : popup_list { width =40; key = "infolist"; value = "1"; is_enabled = true ; }        spacer_1;       : row {       : button { key = "accept";label = "accept"; is_default = true;width =14;}          : button { key = "cancel";label = "cancel"; is_default = false; is_cancel = true;width =14;}          }}
 
1-DWG-TOMACORRIENTES.txt
1-DWG-NOTAS.txt
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-13 00:39 , Processed in 0.418965 second(s), 54 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表