确定创建新图形时对象的颜色特性是否与其打印样式名称相关联。 支持的平台:仅窗口 属性值只读:不 类型:枚举acPlotPolicy
言论此属性的初始值为。acPolicyNamed 如果要更改图形的默认打印样式行为,请在打开或创建图形之前输入“非此即彼”。使用此属性更改默认打印样式行为仅影响新图形或在早期版本的 AutoCAD 中创建的图形,这些图形从未以 AutoCAD 2000 或更高版本格式保存。此设置与图形一起保存。可以使用迁移实用程序从保存图形开始更改图形的默认行为。但是,一旦使用 acPolicyNamed 保存图形作为默认行为,就无法将其更改为。acPolicyLegacyacPolicyNamedacPolicyLegacyacPolicyNamedacPolicyLegacy 例子工 务 局: Sub Example_PlotPolicy() ' This example reads and modifies the PlotPolicy ' preference value. ' When finished, this example resets the preference value back to ' its original value. Dim ACADPref As AcadPreferencesOutput Dim originalValue As Integer ' Get the user preferences object Set ACADPref = ThisDrawing.Application.Preferences.Output ' Read and display the original value originalValue = ACADPref.PlotPolicy MsgBox "The PlotPolicy preference is set to: " & originalValue ' Modify the PlotPolicy preference by toggling the value ACADPref.PlotPolicy = acPolicyNamed MsgBox "The PlotPolicy preference has been set to: " & ACADPref.PlotPolicy ' Reset the preference back to its original value ACADPref.PlotPolicy = originalValue MsgBox "The PlotPolicy preference was reset back to: " & originalValue End Sub Visual LISP: (vl-load-com) (defun c:Example_PlotPolicy() ;; This example reads and modifies the PlotPolicy ;; preference value. ;; When finished, this example resets the preference value back to ;; its original value. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Read and display the original value (setq originalValue (vla-get-PlotPolicy (vla-get-Output preferences))) (alert (strcat "The PlotPolicy preference is set to: " (itoa originalValue))) ;; Modify the PlotPolicy preference by toggling the value (vla-put-PlotPolicy (vla-get-Output preferences) acPolicyNamed) (alert (strcat "The PlotPolicy preference has been set to: " (itoa (vla-get-PlotPolicy (vla-get-Output preferences))))) ;; Reset the preference back to its original value (vla-put-PlotPolicy (vla-get-Output preferences) originalValue) (alert (strcat "The PlotPolicy preference was reset back to: " (itoa originalValue))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:33
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.