Mod Bust请协助!!!
突发=分解属性块并保留数字和字母BUST命令适用于保存文本的应用程序,但我需要它来零售块。用于我的区块列表器的数量。有没有一种方法可以让我保留文字和数字,但仍然有一个区块?
块列表器:
这可能对你们中的一些人有用我喜欢它!!!
默认Lisp统计特定层上的块数
如何操作此lisp以仅计算特定层上的块?
我的所有图层都以“E_…”开头例如E_电源、E_灯等。
我得到了这个Lisp程序的网站,它的工作像一个梦。。。如果可以将if更改为仅在名称以“E_…”开头的图层上识别和计数块,则会更有帮助
谢谢
报价:
;************************************************* ******************************
;* C:BlocksList.LSP *
;* *
;* *
;************************************************* ******************************
(defun C:BlocksList ( ; Command emulation; ( local variables
/ Option ; User option for output of block quantities (or exit)
C_layer ; Current layer's name con'd with its assoc key (
Block_list ; List of block's table information
Block_cons ; List of block's name con'd with 2 (its assoc key)
Block_set ; Selection set of all blocks with given name (& on curr layer)
Block_name ; Current block's name
Block_srch ; Search criteria for finding/selecting blocks
Count$ ; Quantity of selected blocks as a string value
) ; Close defun's local variables list
(cond ; Begin routine--get user input first
( (initget "All Current eXit") ) ; Initialize options for user input
( (= "eXit" (setq Option (getkword (strcat "List ["
"All occurrences/Current layer only/eXit" "] <Current layer only>: "
) ) ) ) ); Default is do blocks on current layer
(T(textscr) (prompt "\nPlease wait...Counting block insertions...Found...")
(if (/= Option "All") (setq C_layer (cons 8 (getvar "CLAYER"))))
(while ; Inform user processing is starting
(setq Block_list (tblnext "BLOCK" (not Block_list)))
(setq Block_cons (assoc 2 Block_list)
Block_name (cdr Block_cons)
Block_srch (cond ; Step through entire block name database
( (= (ascii Block_name) 42) nil ); Ignore anonymous blocks: "*..."
( (= Option "All") (list Block_cons) )
(T(list Block_cons C_layer) )
) ) ; Limit to current layer if All not opted
(cond ; Now output (ignores unused blocknames)
( (and Block_srch (setq Block_set (ssget "X" Block_srch)))
(setq Count$ (rtos (sslength Block_set) 2 0))
(prompt (strcat "\n" " " ; Build prompt string--pretty-print qty
(nth (strlen Count$) '("" " " " " " " " " " " ""))
Count$ " " Block_name ; Output qty & block name to screen
) ) ) ; Close cond's only opt & prompt-strcat
) ) ; Close processing while & its cond
) ) ; Close main cond & its T option
(princ) ; Quiet exit
) ; The END (close defun C:BlocksList)
(C:BlocksList) ; Auto-call @ actual, not dummy, load
有人在这里提出了同样的问题,并得到了一些回复。。。。
http://board.thaiblogonline.com/Lisp-to-count-blocks-on-specific-layers/autocad/71087 RK,你到底是怎么找到这个的?
页:
[1]