乐筑天下

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

[编程交流] 多个弹出列表

[复制链接]

145

主题

590

帖子

446

银币

中流砥柱

Rank: 25

铜币
725
发表于 2022-7-6 14:33:07 | 显示全部楼层
该列表包含所有管道类型。类型1-4或类型a-d的是具有不同环绕类型的。类型1-4和类型a-d是国家标准中列出的环绕类型。
 
我不知道你说的哪个和哪个有联系是什么意思??
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 14:36:31 | 显示全部楼层
你刚才给我的名单是什么?
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 14:41:23 | 显示全部楼层
 
让我重复这个问题。
如果我从排水管道列表中选择管道。
环绕类型列表中应显示的内容。
 
我不熟悉你们的管道标准。你需要对我具体点。
回复

使用道具 举报

145

主题

590

帖子

446

银币

中流砥柱

Rank: 25

铜币
725
发表于 2022-7-6 14:44:30 | 显示全部楼层
我的错,列表的分解。
 
现有过滤器排水管没有类型
待拆除的现有过滤器排水管没有类型
现有污水管没有类型
待拆除的现有污水管没有类型
用混凝土替换现有PVC的类型为1至4
现有雨水管没有类型
待重新铺设的现有雨水管有1至4类
待拆除的现有雨水管没有类型
拟建H级混凝土管涵有1到4种类型
拟建球墨铸铁雨水管有1到4种类型
拟建滤水沟RCD 500 1土工布有1至4种类型
拟议的热塑性整体承插载体排水管有1到4种类型
 
希望这能澄清这一点。如果不只是让我知道。
伍德曼78
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 14:46:10 | 显示全部楼层
 
这就很清楚了,这就是为什么你有一个“for no type”的原因。
哪些使用A型到B型。
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 14:47:53 | 显示全部楼层
 
伍德曼78,
 
从第一篇文章到最近的一篇文章,你从最初的列表中得到了什么,只是有些困惑。
我已经整理好了,很快就会发布。
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 14:51:02 | 显示全部楼层
好的woodman78先生,
 
我在使用两个弹出列表时遇到了一些困难。我可以让它们正常工作,但不正确。我并没有什么都不发布,而是发布了你们在下面看到的带有组合单选按钮和弹出列表的内容。我对这种方法很熟悉,而且很有效。如果你仍然有两个弹出窗口,也许李可以在这里帮助你,因为他很精通这一点。这里显示的方法使用了一个Choose List Items函数,该函数是由ASMI编写的,我从Lee_Mac那里学到的。
 
无论如何,试试看这是否符合你的要求。这是一个起点。
 
DCL
  1. BLINS : dialog {
  2.        label = "Drainage Legend";
  3.        : row {
  4.          : boxed_radio_column {
  5.            label = "Select a Drainage Pipe:";
  6.            : radio_button {
  7.              label = "Existing Filter Drains";
  8.              key = "DP01";
  9.            }
  10.            : radio_button {
  11.              label = "Existing Filter Drains to be Removed";
  12.              key = "DP02";
  13.            }
  14.            : radio_button {
  15.              label = "Existing Foul Sewer";
  16.              key = "DP03";
  17.            }
  18.            : radio_button {
  19.              label = "Existing Foul Sewer to be Removed";
  20.              key = "DP04";
  21.            }
  22.            : radio_button {
  23.              label = "Existing PVC to be Replaced with Concrete";
  24.              key = "DP05";
  25.            }
  26.            : radio_button {
  27.              label = "Existing Storm Sewer";
  28.              key = "DP06";
  29.            }
  30.            : radio_button {
  31.              label = "Existing Storm Sewer to be Relaid";
  32.              key = "DP07";
  33.            }
  34.            : radio_button {
  35.              label = "Proposed Concrete Class H Piped Culvert";
  36.              key = "DP08";
  37.            }
  38.            : radio_button {
  39.              label = "Proposed Ductile Iron Storm Sewer";
  40.              key = "DP09";
  41.            }
  42.            : radio_button {
  43.              label = "Proposed Filter Drain RCD 500 1 Geotextile";
  44.              key = "DP10";
  45.            }
  46.            : radio_button {
  47.              label = "Proposed Thermoplastic Integrally Socketed Carrier Drain";
  48.              key = "DP11";
  49.            }
  50.          }
  51.        }
  52.        : row {
  53.          : boxed_column {
  54.            label = "Select a Surround Type:";
  55.            : popup_list {
  56.              key = "ST";
  57.              label = "Surround Type:";
  58.              edit_width = 12;
  59.              alignment = right;
  60.            }
  61.            : spacer {
  62.              height = 0;
  63.            }
  64.          }
  65.        }
  66.        : row {
  67.          : column {
  68.            ok_cancel;
  69.            : paragraph {
  70.              : text_part {
  71.                label = "Designed by Brian Deasy";
  72.              }
  73.              : text_part {
  74.                label = "for CCC NNRDO";
  75.              }
  76.            }
  77.          }
  78.        }
  79.      }

 
LSP
  1. ;//////////////////////////////////////////////////////////////////////////
  2. ;
  3. ; Start-Up Function
  4. ;
  5. (defun C:BLINS ()
  6. (BLINS_MF)
  7. (princ)
  8. )
  9. (princ "\nBLINS.lsp Loaded....")
  10. (princ "\nType BLINS to start program.")
  11. ;
  12. ;//////////////////////////////////////////////////////////////////////////
  13. ;
  14. ; Choose List Items Function
  15. ;
  16. (defun BLINS_CLI (lst items)
  17. (mapcar '(lambda (i) (nth i lst)) items)
  18. )
  19. ;
  20. ;//////////////////////////////////////////////////////////////////////////
  21. ;
  22. ; Update Type List Function
  23. ;
  24. (defun BLINS_UTL (D:PIP)
  25. (setq ST_list '("Type A" "Type B" "Type C" "Type D" "Type 1" "Type 2" "Type 3" "Type 4" "No selection"))
  26. (cond
  27.    ((= D:PIP "DP01")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '()))      (end_list))
  28.    ((= D:PIP "DP02")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '()))      (end_list))
  29.    ((= D:PIP "DP03")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '()))      (end_list))
  30.    ((= D:PIP "DP04")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '()))      (end_list))
  31.    ((= D:PIP "DP05")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '(4 5 6 7))))(end_list))
  32.    ((= D:PIP "DP06")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '()))      (end_list))
  33.    ((= D:PIP "DP07")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '(4 5 6 7))))(end_list))
  34.    ((= D:PIP "DP08")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '(4 5 6 7))))(end_list))
  35.    ((= D:PIP "DP09")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '(4 5 6 7))))(end_list))
  36.    ((= D:PIP "DP10")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '(0 1 2 3))))(end_list))
  37.    ((= D:PIP "DP11")(start_list "ST" 3)(mapcar 'add_list (setq ST_list (BLINS_CLI ST_list '(4 5 6 7))))(end_list))
  38. )
  39. )
  40. ;
  41. ;//////////////////////////////////////////////////////////////////////////
  42. ;
  43. ; Main Function
  44. ;
  45. (defun BLINS_MF (/ DPIP$ DPIP STYP$ STYP)
  46. (setq dcl_id (load_dialog "BLINS.dcl"))
  47. (if (not (new_dialog "BLINS" dcl_id))
  48.    (progn (ALERT "Can not find your dcl file")(exit)))
  49. (or D:PIP (setq D:PIP "DP01"))
  50. (set_tile D:PIP "1")
  51. (BLINS_UTL D:PIP)
  52. (action_tile "DP01" "(BLINS_UTL (setq D:PIP "DP01"))")
  53. (action_tile "DP02" "(BLINS_UTL (setq D:PIP "DP02"))")
  54. (action_tile "DP03" "(BLINS_UTL (setq D:PIP "DP03"))")
  55. (action_tile "DP04" "(BLINS_UTL (setq D:PIP "DP04"))")
  56. (action_tile "DP05" "(BLINS_UTL (setq D:PIP "DP05"))")
  57. (action_tile "DP06" "(BLINS_UTL (setq D:PIP "DP06"))")
  58. (action_tile "DP07" "(BLINS_UTL (setq D:PIP "DP07"))")
  59. (action_tile "DP08" "(BLINS_UTL (setq D:PIP "DP08"))")
  60. (action_tile "DP09" "(BLINS_UTL (setq D:PIP "DP09"))")
  61. (action_tile "DP10" "(BLINS_UTL (setq D:PIP "DP10"))")
  62. (action_tile "DP11" "(BLINS_UTL (setq D:PIP "DP11"))")
  63. (if STYP:DEF (set_tile "ST" (itoa STYP:DEF)))
  64. (action_tile "accept"
  65.    (strcat "(progn (setq S:TYP (atoi (get_tile "ST")) STYP:DEF S:TYP)"
  66.            "(done_dialog)(setq userclick T))"))
  67. (action_tile "cancel" "(done_dialog)(setq userclick nil)")
  68. (start_dialog)(unload_dialog dcl_id)
  69. (if userclick
  70.    (BLINS_VF))
  71. )
  72. ;
  73. ;//////////////////////////////////////////////////////////////////////////
  74. ;
  75. ; Variable Function
  76. ;
  77. (defun BLINS_VF ()
  78. (setq DPIP$ D:PIP)
  79. (cond
  80.    ((= DPIP$ "DP01")(setq DPIP "Existing Filter Drains"))
  81.    ((= DPIP$ "DP02")(setq DPIP "Existing Filter Drains to be Removed"))
  82.    ((= DPIP$ "DP03")(setq DPIP "Existing Foul Sewer"))
  83.    ((= DPIP$ "DP04")(setq DPIP "Existing Foul Sewer to be Removed"))
  84.    ((= DPIP$ "DP05")(setq DPIP "Existing PVC to be Replaced with Concrete"))
  85.    ((= DPIP$ "DP06")(setq DPIP "Existing Storm Sewer"))
  86.    ((= DPIP$ "DP07")(setq DPIP "Existing Storm Sewer to be Relaid"))
  87.    ((= DPIP$ "DP08")(setq DPIP "Proposed Concrete Class H Piped Culvert"))
  88.    ((= DPIP$ "DP09")(setq DPIP "Proposed Ductile Iron Storm Sewer"))
  89.    ((= DPIP$ "DP10")(setq DPIP "Proposed Filter Drain RCD 500 1 Geotextile"))
  90.    ((= DPIP$ "DP11")(setq DPIP "Proposed Thermoplastic Integrally Socketed Carrier Drain"))
  91. )
  92. (progn
  93.    (setq S:TYP (fix S:TYP))
  94.    (setq S:TYP (nth S:TYP ST_list))
  95.    (setq STYP$ S:TYP)
  96.    (cond
  97.      ((= STYP$ "Type A")      (setq STYP "Type A"))
  98.      ((= STYP$ "Type B")      (setq STYP "Type B"))
  99.      ((= STYP$ "Type C")      (setq STYP "Type C"))
  100.      ((= STYP$ "Type D")      (setq STYP "Type D"))
  101.      ((= STYP$ "Type 1")      (setq STYP "Type 1"))
  102.      ((= STYP$ "Type 2")      (setq STYP "Type 2"))
  103.      ((= STYP$ "Type 3")      (setq STYP "Type 3"))
  104.      ((= STYP$ "Type 4")      (setq STYP "Type 4"))
  105.      ((= STYP$ "No selection")(setq STYP "No selection"))
  106.    )
  107. )
  108. (BLINS_OF)
  109. )
  110. ;
  111. ;//////////////////////////////////////////////////////////////////////////
  112. ;
  113. ; Output Function
  114. ;
  115. (defun BLINS_OF ()
  116. (ALERT (strcat "\nThe Drainage Pipe you selected was "DPIP"."
  117.                 "\nThe Surround Type you selected was "STYP"."))
  118. (princ)
  119. )
  120. ;
  121. ;//////////////////////////////////////////////////////////////////////////

150026q5ddooggoc685oc1.jpg
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 14:56:49 | 显示全部楼层
伍德曼78,
 
上面的代码有一个怪癖。我正试图联系李寻求一些反馈。我稍后会联系你。
 
秃鹰
回复

使用道具 举报

145

主题

590

帖子

446

银币

中流砥柱

Rank: 25

铜币
725
发表于 2022-7-6 14:59:41 | 显示全部楼层
秃鹰,
我对代码的输出部分做了以下更改,它实现了一个梦想。只有一件事是,如果不选择任何类型,是否可以使类型变灰。除此之外,它非常棒。谢谢
 
 
  1. ;//////////////////////////////////////////////////////////////////////////
  2. ;
  3. ; Output Function
  4. ;
  5. (defun BLINS_OF ()
  6. (setq outp (strcat DPIP " " STYP))
  7. (command "_-insert" outp pause "1" "1" "0")
  8. (princ)
  9. )
  10. ;
  11. ;//////////////////////////////////////////////////////////////////////////
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:03:02 | 显示全部楼层
使用“mode_tile”灰显瓷砖,并将其启用0以启用,1以禁用。
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-5 03:03 , Processed in 1.052271 second(s), 72 queries .

© 2020-2025 乐筑天下

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