找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 529|回复: 2

[求助] [求助]:写到这里就是不显示(幻灯和表),高手指点

[复制链接]
发表于 2003-2-12 22:11:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
  1. (defun c:aw (/                 dcl_id             n                 x             y
  2.              I:Path         name             ai_nam         ai_dwg|     ai_sld|
  3.              show_titer         getinf             lib_dwg         blk_sld     jdcad_blk
  4.              current_line             all_dwg_list             all_sld_list
  5.             )
  6.   (defun show_titer ()
  7.     (if        (not (setq filename (findfile "jdcad.blk")))
  8.       (setq filename "jdcad.blk")
  9.     )
  10.     (if        (setq jdcad_blk (open filename "r"))
  11.       (progn
  12.         (setq current_line (read-line jdcad_blk))
  13.         (while (and (/= "" current_line)
  14.                     (/= nil current_line)
  15.                     (/= ":" (substr current_line 1 1))
  16.                )
  17.           (setq current_line (read-line jdcad_blk))
  18.           (while current_line
  19.             (setq name (substr current_line 10))
  20.             (setq all_dwg_list (cons name all_dwg_list))
  21.             (setq all_lib_list (cons name all_lib_list))
  22.             (setq current_line (read-line jdcad_blk))
  23.             (while (/= ":" (substr current_line 1 1))
  24.               (setq lib_dwg (cons (read current_line) lib_dwg))
  25.               (setq current_line (read-line jdcad_blk))
  26.             )
  27.             (set (read (strcat "ai_dwg|" name))
  28.                  (reverse lib_dwg)
  29.             )
  30.             (setq lib_dwg '())
  31.             (setq current_line (read-line jdcad_blk))
  32.             (while
  33.               (and current_line
  34.                    (/= ":" (substr current_line 1 1))
  35.               )
  36.                (setq current_line (read-line jdcad_blk))
  37.                (< (length all_dwg_list) (getvar "maxsort"))
  38.             )
  39.             (setq all_dwg_list (acad_strlsort all_dwg_list))
  40.           )
  41.           (start_list "blk_path")
  42.           (mapcar 'add_list all_dwg_list)
  43.           (end_list)
  44.           (set_tile "blk_path" "0")
  45.           (close jdcad_blk)
  46.         )
  47.       )
  48.     )
  49.     (if        (not (setq filename (findfile "jdcad.blk")))
  50.       (setq filename "jdcad.blk")
  51.     )
  52.     (if        (setq jdcad_blk (open filename "r"))
  53.       (progn
  54.         (setq current_line (read-line jdcad_blk))
  55.         (while (and (/= "" current_line)
  56.                     (/= nil current_line)
  57.                     (/= ":" (substr current_line 1 5))
  58.                )
  59.           (setq current_line (read-line jdcad_blk))
  60.           (while current_line
  61.             (setq name (substr current_line 10))
  62.             (setq all_sld_list (cons name all_sld_list))
  63.             (setq current_line (read-line jdcad_blk))
  64.             (while (/= ":" (substr current_line 1 1))
  65.               (setq blk_sld (cons (read current_line) blk_sld))
  66.               (setq current_line (read-line jdcad_blk))
  67.             )
  68.             (set (read (strcat "ai_sld|" name))
  69.                  (reverse blk_sld)
  70.             )
  71.             (setq blk_sld '())
  72.             (setq current_line (read-line jdcad_blk))
  73.             (while
  74.               (and current_line
  75.                    (/= ":" (substr current_line 1 5))
  76.               )
  77.                (setq current_line (read-line jdcad_blk))
  78.                (< (length all_sld_list) (getvar "maxsort"))
  79.             )
  80.             (setq all_sld_list (acad_strlsort all_sld_list))
  81.           )
  82.           (start_list "sld_path")
  83.           (mapcar 'add_list all_sld_list)
  84.           (end_list)
  85.           (set_tile "sld_path" "0")
  86.           (close jdcad_blk)
  87.         )
  88.       )
  89.     )
  90.   )
  91.   (defun getinf        (/ x y FIL)
  92.     ;;(setq X (dimx_tile "show tit")
  93.           ;;Y (dimy_tile "show tit")
  94.     ;;)
  95.     (setq FIL (findfile "*.sld"))
  96.     (if        (>= n 5)
  97.       (setq n 1)
  98.     )
  99.     (cond
  100.       ((= n 1)
  101.        (start_image "show_tit")
  102.        (fill_image 0 0 x y 0)
  103.        (slide_image 0 0 x y "tk0")
  104.       )
  105.       ((= n 2)
  106.        (start_image "show_tit")
  107.        (fill_image 0 0 x y 0)
  108.        (slide_image 0 0 x y "tk1")
  109.       )
  110.       ((= n 3)
  111.        (start_image "show_tit")
  112.        (fill_image 0 0 x y 0)
  113.        (slide_image 0 0 x y "tk2")
  114.       )
  115.       ((= n 4)
  116.        (start_image "show_tit")
  117.        (fill_image 0 0 x y 0)
  118.        (slide_image 0 0 x y "tk3")
  119.       )
  120.       ((= n 5)
  121.        (start_image "show_tit")
  122.        (fill_image 0 0 x y 0)
  123.        (slide_image 0 0 x y "tk4")
  124.       )
  125.       ((= n 6)
  126.        (start_image "show_tit")
  127.        (fill_image 0 0 x y 0)
  128.        (slide_image 0 0 x y "tk5")
  129.       )
  130.       (t nil)
  131.       ;;(setq n (+ n 1))
  132.     )
  133.   )
  134.   (mapcar 'setvar '("cmdecho" "blipmode") '(0 0))
  135.   (setq dcl_id (load_dialog "tmp.dcl"))
  136.   (if (not (new_dialog "aw" dcl_id))
  137.     (exit)
  138.     ;;(progn
  139.     ;;(start_image "show tit")
  140.     ;;(fill_image 0 0 (dimx_tile "show tit") (dimy_tile "show tit") 0)
  141.     ;;(slide_image 0 0 (dimx_tile "show tit") (dimy_tile "show tit")
  142.     ;;"acad.slb(1)"
  143.     ;;)
  144.     ;;)
  145.   )
  146.   ;;(set_tile "path" I:Path)
  147.   (setq show_tit "show_sld")
  148.   (setq        X (dimx_tile "show_tit")
  149.         Y (dimy_tile "show_tit")
  150.   )
  151.   (start_image "show_tit")
  152.   (slide_image 0 -10 X Y "ydblk.sld")
  153.   (end_image)
  154.   (action_tile "show_tit" "(getinf)")(mode_tile "show_tit" 2)
  155.   (start_dialog)
  156.   (unload_dialog dcl_id)
  157. )
  158. (princ "\n欢迎浏览图库!")
  159. (princ)
  160. ;;;=========================================================================
  161. //对话框的文件名假设为d:/tmp.dcl
  162. aw : dialog {
  163.    label = "浏览";
  164.    : concatenation {
  165.      : text {
  166.                  label        = "名称:";
  167.                  fixed_width  = true;
  168.             }
  169.      : text {
  170.                  //label        = " ";
  171.                  key          = "blk_name";
  172.                  width        = 20;
  173.             }
  174.      : text {
  175.                  label        = "序号:";
  176.             }
  177.      : text {
  178.                  //label        = " ";
  179.                  key          = "blk_path";
  180.                  width        = 20;
  181.             }
  182.      : text {
  183.                  label        = "幻灯:";
  184.             }
  185.      : text {
  186.                  //label        = " ";
  187.                  key          = "sld_path";
  188.                  width        = 20;
  189.             }
  190.    }
  191.    : boxed_column {
  192.       label = "图块";
  193.       : image_button {
  194.               key = "show_tit";
  195.               height = 30;
  196.               width = 60;
  197.               color = -2;
  198.       }spacer;
  199.    }spacer;
  200.    ok_only;
  201. }
  202. //=============================================================================
  203. ///        jdcad.blk  --  Do not edit this file.
  204. ///        第一行存图块中文名称
  205. ///        第二行存图块编号名称
  206. ///        第三行存图块幻灯名称
  207. ///=============================================
  208. :ai_nam|单开门
  209. :ai_dwg|tk0
  210. :ai_sld|tk0
  211. :ai_nam|双开门
  212. :ai_dwg|tk1
  213. :ai_sld|tk1
  214. :ai_nam|旋转门
  215. :ai_dwg|tk2
  216. :ai_sld|tk2
  217. :ai_nam|自动门
  218. :ai_dwg|tk3
  219. :ai_sld|tk3
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 488个

财富等级: 日进斗金

发表于 2003-2-15 17:20:54 | 显示全部楼层
: text {
//label = " ";
key = "sld_path";
width = 20;
}
这是"text",应该是list_box吧,不然上面怎么有add_list呢?blk_name也一样.
应该这样写.
n=0 ;点image_button,n加1,
对应all_sld_list表里读出n个,就为幻灯名,显示之.
再对应all_dwg_list 里的n个为dwg名,set_tile "blk_path",blk_name也一样.
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2003-2-16 18:44:49 | 显示全部楼层

这里不明白…………

这里不明白…………

n=0 ;点image_button,n加1,
对应all_sld_list表里读出n个,就为幻灯名,显示之.
再对应all_dwg_list 里的n个为dwg名,set_tile "blk_path",blk_name也一样.

还有如果要在text先是怎么改,我是初学,许多函数还不会用
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-4-28 00:14 , Processed in 0.286846 second(s), 35 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表