Tripledot 发表于 2022-7-5 18:19:12

 
可能包括所有设置,例如纸张大小、绘图仪。。。。。等等,但没有任何设置名称
 
那太好了

BlackBox 发表于 2022-7-5 18:27:23

这可能有助于-
 
这是一种自定义LispFunction方法,用于将命名页面设置设置设置为活动状态,并与ODBX配合使用:
 
http://forums.augi.com/showthread.php?80461-页面设置管理器&p=1219546&viewfull=1#post1219546
 
 
例子:

(foreach layoutname (layoutlist)
(vla-SetActivePageSetup layoutname “YourPageSetupName”)
)

 
 
干杯

Steven P 发表于 2022-7-5 18:30:12

这就是我的计划,我已经做了很多,但是我做的有些地方不是最好的。我目前正在努力解决页面方向的问题,很确定在某个地方会有人能够解决如何将页面方向更改为LISP中的一行。
 
 
Blackbox,现在是周末,所以我可以在周一查看,但这不就是复制整个布局,而不仅仅是改变页面方向吗?

BlackBox 发表于 2022-7-5 18:34:09

 
没有-是什么给你留下这样的印象?
 
vla SetActivePageSetup LispFunction只做了这一点;对于给定布局,将(命名)页面设置设置为活动。
 
干杯

Steven P 发表于 2022-7-5 18:37:36

发现这似乎接近我想要做的:
 
(defun c:setlayoutname()
(setq layoutname (vla-get-name (vla-get-ActiveLayout (vla-get-activedocument (vlax-get-acad-object )))))
(setq AD (vla-get-activedocument (vlax-get-acad-object )));;AD Active Document
(setq AL (vla-get-ActiveLayout AD));;AL Active Layout
)

(defun c:getplotrotation()
(c:setlayoutname)
(vla-get-PlotRotation AL)
;;; alt. (ac0degrees ac90degrees ac180degrees ac270degrees)
(vla-put-PlotRotation AL ac0degrees)
(princ (VLA-get-PlotRotation AL))
)
 
从autodesk论坛:
http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-activex-lisp-to-get-set-plot-configuration/td-p/883677
页: 1 [2]
查看完整版本: 页面设置Lisp