完整发布lisp例程(或继续称之为“脚本”),以便我们都能看到它。谢谢
这就是吉米·伯格马克如何处理获取层列表的任务。
http://www.jtbworld.com/lisp/layer-list.htm
您好,欢迎来到cadtutor
日志文件如何?文本文件??
那么你的任务就是从命令行复制?
我的理解是这很烦人,因为你需要按直到它完成?
如果这一切结束,你下一步要做什么?
编辑:
建议,这只是一个粗略的代码,跳过步骤(如果列表太长,则使用哪个普通层命令)
(defun c:test (/ doc)
;hanhphuc 13.03.2015
;layer list in command line
(setq doc (vlax-get-acad-object))
(prompt "\nName State Color Linetype Lineweight ")
(vlax-for obj
(foreach x '(activedocument layers) (setq doc (vlax-get doc x)))
(terpri)
(princ
(apply 'strcat
(mapcar ''((x)(setq x (strcat (if (numberp x)(vl-princ-to-string x)x) " ")))
(mapcar ''((lay)(vlax-get obj lay)) '(name layeron freeze lock plottable color linetype lineweight))))) ;<-- column sequence
)
(textpage)
(princ)
)
(vl-load-com)
如果我理解正确
此代码段可能适用于:
(COMMAND "LOGFILEPATH" "C:\\Script\\Log")
(COMMAND "LOGFILEON")
(COMMAND "-XREF" "PATHTYPE" "*" "R")
(COMMAND "-SCALELISTEDIT" "?" "EXIT" )
(COMMAND "-purge" "Regapps" "*" "N")
(COMMAND "-purge" "ALL" "*" "N")
;(COMMAND "-layer" "T" "0" "")
;(COMMAND "-layer" "S" "0" "")
(COMMAND "-layer" "?" "*" "")
(COMMAND "AUDIT" "N")
(COMMAND "VISRETAIN" "")
(COMMAND "PSLTSCALE" "")
(COMMAND "LTSCALE" "")
(COMMAND "MSLTSCALE" "")
(COMMAND "XDWGFADECTL" "0")
(COMMAND "BASE" "0,0,0")
或:
(while (> (getvar "CMDACTIVE") 0)
(command ""))
取决于所需的输入。
-大卫
嗨,谢谢!我两个都试过了,但都没用。如果只是把它们贴在上面,是吗?
当做 要在用户不必按enter键的情况下完成命令:
(while (> (getvar "CMDACTIVE") 0)
(command "_Yes"))
默认值(1-10)以及随后可能出现的任何属性输入均被接受。
Hi and thanks! I tried both of them, but it didn't work. If it just was to paste them right in that is?
Regards To complete a command without the user having to press the enter key :
(command "_.INSERT" "M_Block" '(0 0 0))(while (> (getvar "CMDACTIVE") 0) (command ""))
The default values ( 1 1 0 ) are accepted, as well as any attribute inputs that may follow.
页:
1
[2]