乐筑天下

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

[编程交流] Mod Bust请协助!!!

[复制链接]

42

主题

104

帖子

69

银币

后起之秀

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

铜币
203
发表于 2022-7-6 11:17:21 | 显示全部楼层 |阅读模式
突发=分解属性块并保留数字和字母
 
BUST命令适用于保存文本的应用程序,但我需要它来零售块。用于我的区块列表器的数量。有没有一种方法可以让我保留文字和数字,但仍然有一个区块?
 
 
 
块列表器:
 
这可能对你们中的一些人有用我喜欢它!!!
 
 
默认Lisp统计特定层上的块数
如何操作此lisp以仅计算特定层上的块?
 
我的所有图层都以“E_…”开头例如E_电源、E_灯等。
 
我得到了这个Lisp程序的网站,它的工作像一个梦。。。如果可以将if更改为仅在名称以“E_…”开头的图层上识别和计数块,则会更有帮助
 
谢谢
 
报价:
 
  1. ;************************************************* ******************************
  2. ;* C:BlocksList.LSP *
  3. ;* *
  4. ;* *
  5. ;************************************************* ******************************
  6. (defun C:BlocksList ( ; Command emulation; ( local variables
  7. / Option ; User option for output of block quantities (or exit)
  8. C_layer ; Current layer's name con'd with its assoc key (
  9. Block_list ; List of block's table information
  10. Block_cons ; List of block's name con'd with 2 (its assoc key)
  11. Block_set ; Selection set of all blocks with given name (& on curr layer)
  12. Block_name ; Current block's name
  13. Block_srch ; Search criteria for finding/selecting blocks
  14. Count$ ; Quantity of selected blocks as a string value
  15. ) ; Close defun's local variables list
  16. (cond ; Begin routine--get user input first
  17. ( (initget "All Current eXit") ) ; Initialize options for user input
  18. ( (= "eXit" (setq Option (getkword (strcat "List ["
  19. "All occurrences/Current layer only/eXit" "] <Current layer only>: "
  20. ) ) ) ) ); Default is do blocks on current layer
  21. (T(textscr) (prompt "\nPlease wait...Counting block insertions...Found...")
  22. (if (/= Option "All") (setq C_layer (cons 8 (getvar "CLAYER"))))
  23. (while ; Inform user processing is starting
  24. (setq Block_list (tblnext "BLOCK" (not Block_list)))
  25. (setq Block_cons (assoc 2 Block_list)
  26. Block_name (cdr Block_cons)
  27. Block_srch (cond ; Step through entire block name database
  28. ( (= (ascii Block_name) 42) nil ); Ignore anonymous blocks: "*..."
  29. ( (= Option "All") (list Block_cons) )
  30. (T(list Block_cons C_layer) )
  31. ) ) ; Limit to current layer if All not opted
  32. (cond ; Now output (ignores unused blocknames)
  33. ( (and Block_srch (setq Block_set (ssget "X" Block_srch)))
  34. (setq Count$ (rtos (sslength Block_set) 2 0))
  35. (prompt (strcat "\n" " " ; Build prompt string--pretty-print qty
  36. (nth (strlen Count$) '("" " " " " " " " " " " ""))
  37. Count$ " " Block_name ; Output qty & block name to screen
  38. ) ) ) ; Close cond's only opt & prompt-strcat
  39. ) ) ; Close processing while & its cond
  40. ) ) ; Close main cond & its T option
  41. (princ) ; Quiet exit
  42. ) ; The END (close defun C:BlocksList)
  43. (C:BlocksList) ; Auto-call @ actual, not dummy, load
回复

使用道具 举报

24

主题

1265

帖子

1028

银币

后起之秀

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

铜币
362
发表于 2022-7-6 11:50:27 | 显示全部楼层
有人在这里提出了同样的问题,并得到了一些回复。。。。
 
http://board.thaiblogonline.com/Lisp-to-count-blocks-on-specific-layers/autocad/71087
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 12:28:16 | 显示全部楼层
RK,你到底是怎么找到这个的?
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-4 06:33 , Processed in 1.249124 second(s), 58 queries .

© 2020-2025 乐筑天下

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