PlotPolicy 属性 (ActiveX)
确定在创建新图形时,对象的颜色属性是否与其打印样式名称相关联。 支持的平台:仅限 Windows 属性值只读:不 类型:枚举acPlotPolicy
言论此属性的初始值为 。acPolicyNamed 如果要更改图形的默认打印样式行为,请在打开或创建图形之前输入 or 或。使用此特性更改默认打印样式行为仅影响新图形或在早期版本的 AutoCAD 中创建的图形,这些图形从未以 AutoCAD 2000 或更高版本格式保存。此设置随图形一起保存。您可以使用迁移实用程序将图形的默认行为从保存后更改为。但是,一旦将图形的 acPolicyNamed 作为默认行为保存,则无法将其更改为 。acPolicyLegacyacPolicyNamedacPolicyLegacyacPolicyNamedacPolicyLegacy 例子VBA: 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 可视化 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-3-31 13:20
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.