乐筑天下

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

[编程交流] 如何查找缺失的绘图/分配

[复制链接]

56

主题

175

帖子

119

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
280
发表于 2022-7-5 18:02:53 | 显示全部楼层 |阅读模式
您好,如何在autocad中找到空白块或没有编号的块???
如果能帮助我,我将不胜感激。
 
*autocad中的红旗(已附着)为空块。
文件图纸
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 18:25:18 | 显示全部楼层
你应该将其称为空白配给或之后不确定问题的地块。
回复

使用道具 举报

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-5 18:37:23 | 显示全部楼层
我为你更改了你的帖子标题。
 
我相信OP正在寻找一种Lisp程序的语言来填补地块缺失的数字。
回复

使用道具 举报

0

主题

301

帖子

301

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-5 18:39:43 | 显示全部楼层
阿米尔,
 
我看了你的画。因为你的包裹是开着的
在许多情况下,多段线。
 
恐怕很难确定哪些包裹是块。
 
也许有一种方法可以创建区域,但这将非常重要
关闭包裹更简单。
 
然后,只需使用
地块并将其用作选择文本的窗口多边形。
 
如果它包含文本,那你就去吧!
 
ymg公司
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 18:54:56 | 显示全部楼层
使用此程序为每个区域创建闭合多段线,然后在每个多段线上迭代,测试该多段线是否包含绿色文本对象。
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 19:03:17 | 显示全部楼层
尽管Aimir094已经消失,但这是普林线中的文本。
 
  1. (defun getcoords (ent)
  2. (vlax-safearray->list
  3.    (vlax-variant-value
  4.      (vlax-get-property
  5.    (vlax-ename->vla-object ent)
  6.    "Coordinates"
  7.      )
  8.    )
  9. )
  10. )
  11. (defun co-ords2xy ()
  12. ; convert now to a list of xy as co-ords are x y x y x y if 3d x y z x y z
  13. (setq numb (/ (length co-ords) 2))
  14. (setq I 0)
  15. (repeat numb
  16. (setq xy (list (nth I co-ords)(nth (+ I 1) co-ords) ))
  17. (setq coordsxy (cons xy coordsxy))
  18. (setq I (+ I 2))
  19. ) ; end repeat
  20. ) ; end defun
  21. ; program starts here
  22. ; choose output file change acdatemp to what you want
  23. (setq fname (strcat "c:/acadtemp/" (getstring "\nEnter file name ")))
  24. (setq fout (open fname "w"))
  25. (setq plobjs (ssget (list (cons 0 "lwpolyline"))))
  26. (setq numb1 (sslength plobjs))
  27. (setq x numb1)
  28. (repeat numb1
  29. (setq obj (ssname plobjs (setq x (- x 1))))
  30. (setq co-ords (getcoords obj))
  31. (co-ords2xy)
  32. ; write pline co-ords here
  33. (setq numb3 (length co-ords))
  34. (setq z numb3)
  35. (setq ansco-ords "")
  36. (repeat numb3
  37. (setq ansco-ords (strcat ansco-ords (rtos (nth (setq z (- z 1)) co-ords) 2 3 ) " " ))
  38. )
  39. (setq ans (strcat "Pline " ansco-ords))
  40. (write-line ans fout)
  41. (setq ansco-ords "")
  42. (setq ss (ssget "WP" coordsxy (list (cons 0 "Text,Mtext")))) ; selection set of text within polygon
  43. (if (= ss nil)
  44. (princ "\nnothing inside")
  45. (progn
  46. (setq coordsxy nil) ; reset for next time
  47. (setq numb2 (sslength ss))
  48. (setq y numb2)
  49. (repeat numb2
  50. (setq anstext (vlax-get-property (vlax-ename->vla-object (ssname ss (setq y (- y 1)))) "Textstring"))
  51. (princ anstext) ; change to write text to file
  52. (write-line (strcat "text " anstext) fout)
  53. (princ "\n")
  54. ) ; end repeat2
  55. (setq ss nil) ; reset for next poly
  56. )
  57. )
  58. ) ; end repeat1
  59. (close fout)
  60. (princ)
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-12 23:56 , Processed in 0.360648 second(s), 64 queries .

© 2020-2025 乐筑天下

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