乐筑天下

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

[编程交流] Lisp填写自定义正确

[复制链接]

11

主题

44

帖子

33

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
55
发表于 2022-7-6 00:26:52 | 显示全部楼层
 
我会调查的。。。
 
我更新了代码,并附上了自定义属性的图纸。。。请检查这里的帖子
回复

使用道具 举报

11

主题

44

帖子

33

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
55
发表于 2022-7-6 00:34:14 | 显示全部楼层
 
我想出来了!找到此资源
 
这是这一行的更新代码。当我做完所有事情后我会汇报的。。。
 
  1. (defun c:TB ( / doc db si opt titletop titlemiddle titlebottom row
  2.      1rowrev 1rowyy 1rowmm 1rowdd 1rowdesc 1rowby 1rowchk 1roweng 1rowapp
  3.      2rowrev 2rowyy 2rowmm 2rowdd 2rowdesc 2rowby 2rowchk 2roweng 2rowapp
  4.      3rowrev 3rowyy 3rowmm 3rowdd 3rowdesc 3rowby 3rowchk 3roweng 3rowapp
  5.      4rowrev 4rowyy 4rowmm 4rowdd 4rowdesc 4rowby 4rowchk 4roweng 4rowapp
  6.      )
  7. (vl-load-com)
  8. (setq acadObject (vlax-get-Acad-Object))
  9. (setq acadDocument (vla-get-Activedocument acadObject))
  10. (setq dProps (vlax-get-property acadDocument 'Summaryinfo))
  11. (if (setq Opt
  12.      (getint
  13.        "\nDo you want to: 1- Update Titleblock 2- Update RevBlock 3- Update Drawing Titles: "
  14.      )
  15.      );;user input for variable "opt"
  16.    (progn
  17.      (cond
  18. ((= opt 1);;if user picks to update titleblock
  19. (setq titletop (getstring "\nWhat is title top? "))
  20. (setq titlemiddle (getstring "\nWhat is title middle? "))
  21. (setq titlebottom (getstring "\nWhat is title bottom? "))
  22. )
  23. ((= opt 2);;if user picks to update revblock
  24. (setq
  25.    row (getint "\nWhich revision row do you wish to edit? ")
  26. )
  27. (progn
  28.    (cond
  29.      ((= row 1)
  30.       (setq 1rowrev (getstring "\n1st row rev: "))
  31.       (setq 1rowyy (getstring "\n1st row year: "))
  32.       (setq 1rowmm (getstring "\n1st row month: "))
  33.       (setq 1rowdd (getstring "\n1st row day: "))
  34.       (setq 1rdesc (getstring T "\n1st row description: "))
  35.       (setq 1rowby (getstring "\n1st row by: "))
  36.       (setq 1rowchk (getstring "\n1st row chk: "))
  37.       (setq 1roweng (getstring "\n1st row eng: "))
  38.       (setq 1rowapp (getstring "\n1st row app: "))
  39.       (vla-SetCustomByIndex dProps 7 "1RREV" 1rowrev)
  40.       );;end row=1
  41.      ((= row 2)
  42.       (setq 2rowrev (getstring "\n2nd row rev: "))
  43.       (setq 2rowyy (getstring "\n2nd row year: "))
  44.       (setq 2rowmm (getstring "\n2nd row month: "))
  45.       (setq 2rowdd (getstring "\n2nd row day: "))
  46.       (setq 2rdesc (getstring T "\n2nd row description: "))
  47.       (setq 2rowby (getstring "\n2nd row by: "))
  48.       (setq 2rowchk (getstring "\n2nd row chk: "))
  49.       (setq 2roweng (getstring "\n2nd row eng: "))
  50.       (setq 2rowapp (getstring "\n2nd row app: "))
  51.      );;end row=2
  52.      ((= row 3)
  53.       (setq 3rowrev (getstring "\n3rd row rev: "))
  54.       (setq 3rowyy (getstring "\n3rd row year: "))
  55.       (setq 3rowmm (getstring "\n3rd row month: "))
  56.       (setq 3rowdd (getstring "\n3rd row day: "))
  57.       (setq 3rdesc (getstring T "\n3rd row description: "))
  58.       (setq 3rowby (getstring "\n3rd row by: "))
  59.       (setq 3rowchk (getstring "\n3rd row chk: "))
  60.       (setq 3roweng (getstring "\n3rd row eng: "))
  61.       (setq 3rowapp (getstring "\n3rd row app: "))
  62.      );;end row=3
  63.      ((= row 4)
  64.       (setq 4rowrev (getstring "\n4th row rev: "))
  65.       (setq 4rowyy (getstring "\n4th row year: "))
  66.       (setq 4rowmm (getstring "\n4th row month: "))
  67.       (setq 4rowdd (getstring "\n4th row day: "))
  68.       (setq 4rdesc (getstring T "\n4th row description: "))
  69.       (setq 4rowby (getstring "\n4th row by: "))
  70.       (setq 4rowchk (getstring "\n4th row chk: "))
  71.       (setq 4roweng (getstring "\n4th row eng: "))
  72.       (setq 4rowapp (getstring "\n4th row app: "))
  73.      );;end row=4
  74.    );;end cond
  75. );; end progn
  76. );;end opt 2
  77. ((= opt 3);;if user picks to update drawing titles, still figuring this section out
  78. )
  79.      );;end cond
  80.    );;end 1st progn
  81. );;end 1st if
  82. );;end defun
回复

使用道具 举报

4

主题

194

帖子

192

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-6 00:38:31 | 显示全部楼层
通过创建一个列表,您可以节省大量变量命名,请参阅下面适用于所有行的内容。。。
 
  1. 7

 
然后利用“第n个”函数检索要放置在图形中的数据。
 
布鲁斯
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-11 00:17 , Processed in 1.176203 second(s), 57 queries .

© 2020-2025 乐筑天下

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