帮助调整lsp
我收到了这段代码,它将图形中的所有块提取到单个图形文件中。然而,唯一的问题是,当我打开图形文件时,单个块被分解,而当它们位于原始文件中时,它们没有被分解。我需要以某种方式调整此代码,使块保持未爆炸状态,这样我可以通过设计中心浏览到它们。有人能帮忙吗?;;Make individual dwgs from all the blocks in a drawing
;; By Mark S. Thomas
(defun c:bwblock (/ ss cntr bn)
(setq ss (ssget "x" '((0 . "INSERT")))
cntr 0
)
(mapcar 'setvar '(filedia cmddia) '(0 0))
(if (not (zerop (sslength ss)))
(while (setq ent (ssname ss cntr))
(setq bn (cdr (assoc 2 (entget ent)))
cntr (1+ cntr)
)
;; wblock each block in the current dwg prefixed with "BLOCK_"
;; and sent to c:\temp which must exist
;(command "_wblock" (strcat "c:\\temp\\BLOCK_" bn) bn "NO"); for Map
(command "_wblock" (strcat "c:\\temp\\BLOCK_" bn) bn)
)
)
(mapcar 'setvar '(filedia cmddia) '(1 1))
)
阻碍。lsp 哦,天哪,没有回复:-( 嗯,它正在执行写块,这意味着它将项目保存在新的dwg中,因为块是插入到块中的简单dwg。
希望有意义
页:
[1]