Determines whether an object's color property is associated with its plot style name when a new drawing is created.
Supported platforms: Windows only
VBA:
object.PlotPolicy
Type: PreferencesOutput
The object this property applies to.
Read-only: No
Type: acPlotPolicy enum
The initial value for this property is acPolicyNamed.
If you want to change the default plot style behavior for a drawing, enter either acPolicyLegacy or acPolicyNamed before opening or creating the drawing. Changing the default plot style behavior using this property only affects new drawings or drawings created in a previous release of AutoCAD that have never been saved in AutoCAD 2000 or later format. This setting is saved with the drawing. You can change the default behavior for a drawing from acPolicyLegacy to acPolicyNamed once it is saved by using a migration utility. However, once a drawing is saved with acPolicyNamed as the default behavior, you cannot change it to acPolicyLegacy.
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
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))) )