LISP-调用发布命令
有没有办法调用publish命令,让它只将布局打印到特定的页面设置?我问的原因是我们的标题栏上有很多字段,我想在绘图之前运行fieldupdate?
谢谢 您是否检查了FIELDEVAL设置并确保位代码4(绘图时更新)处于启用状态?这可能会为您节省一些代码。。。 谢谢JRauch。我不知道它的存在。我去看看。你是对的。这可以节省我很多时间。 再次感谢你的邀请。这会让事情变得更容易。是否可以使用LISP启动“发布”命令,并将“模型”选项卡从要打印的对象列表中排除? 实际上,我可以不需要最后一个请求,但有没有人可以用LISP将页面设置设置为在所有布局中都相同?我在谷歌上看了一下,但没有得到多少帮助。
谢谢 我发现了以下代码:
; load the routine with _APPLOAD
; start it by: (multi-pagesetup "mysetup" "myprinter")
; more info on www.cadforum.cz
;
(defun multi-pagesetup (name device / )
(foreach item (layoutlist); you may replace (leyoutlist) by '("Lay1" "Lay2" "Lay3")
(progn
(setvar "ctab" item)
(command "._-plot"
"_N" ;detailed configuration
"" ;default layout name
name ;page setup name
device ;output device name
"_N" ;write the plot to a file
"_Y" ;save changes to layout
"_N" ;proceed with plot
);command
);progn
);foreach
(princ "\nPagesetup Has Been Applied.")
(princ)
);defun
我修改后得到了这个。
; load the routine with _APPLOAD
; start it by: (multi-pagesetup "mysetup" "myprinter")
; more info on www.cadforum.cz
;
(defun c:multipagesetup ( / )
(foreach item (layoutlist); you may replace (leyoutlist) by '("Lay1" "Lay2" "Lay3")
(progn
(setvar "ctab" item)
(command "_.psetupin" (findfile "T:/Drawing Tools/Templates/CCC2009.dwt") "A1" "y")
);progn
);foreach
(princ "\nPagesetup Has Been Applied.")
(princ)
);defun
它运行,但不会将设置应用于所有布局。谁能看一下吗?
谢谢 (defun c:CSTP( / Adoc Layts clyt)
(setq aDoc(vla-get-activedocument (vlax-get-acad-object))
Layts (vla-get-layouts aDoc)
clyt(vla-get-activelayout aDoc))
(foreach
itm(vl-remove (vla-get-name clyt) (layoutlist))
(vla-copyfrom (vla-item Layts itm) clyt)
)
(princ)
) 谢谢pBe。我需要把页面设置名称放在什么地方吗?
或者我读对了,说它会将设置从当前选项卡复制到其他选项卡?
对的运行代码时,它会将设置从当前选项卡复制到其他布局 好东西又来了。谢谢
页:
[1]
2