ScaleLineweights Property (ActiveX)

Specifies if the lineweight is scaled with the rest of the geometry when a layout is printed.

Supported platforms: Windows only

Signature

VBA:

object.ScaleLineweights
object

Type: Layout, PlotConfiguration

The objects this property applies to.

Property Value

Read-only: No

Type: Boolean

Remarks

By default, lineweights are printed at absolute size (not scaled).

The property disabled for the model space layout.

Examples

VBA:

Sub Example_ScaleLineweights()
    ' This example reads and modifies the ScaleLineweights
    ' Layout value.
    ' When finished, this example resets the  value back to
    ' its original value.
    
    Dim ACADLayout As ACADLayout
    Dim originalValue As Boolean
    
    ' Get the layout object
    Set ACADLayout = ThisDrawing.ActiveLayout
    
    ' Read and display the original value
    originalValue = ACADLayout.ScaleLineweights
    MsgBox "The ScaleLineweights value is set to: " & originalValue

    ' Modify the ScaleLineweights preference by toggling the value
    ACADLayout.ScaleLineweights = Not ACADLayout.ScaleLineweights
    MsgBox "The ScaleLineweights preference has been set to: " & ACADLayout.ScaleLineweights

    ' Reset the preference back to its original value
    ACADLayout.ScaleLineweights = originalValue
    MsgBox "The ScaleLineweights preference was reset back to: " & originalValue
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_ScaleLineweights()
    ;; This example reads and modifies the ScaleLineweights
    ;; Layout value.
    ;; When finished, this example resets the  value back to
    ;; its original value.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Get the layout object
    (setq ACADLayout (vla-get-ActiveLayout doc))
    
    ;; Read and display the original value
    (setq originalValue (vla-get-ScaleLineweights ACADLayout))
    (alert (strcat "The ScaleLineweights value is set to: " (if (= originalValue :vlax-true) "True" "False")))

    ;; Modify the ScaleLineweights preference by toggling the value
    (vla-put-ScaleLineweights ACADLayout (if (= originalValue :vlax-true) :vlax-false :vlax-true))
    (alert (strcat "The ScaleLineweights preference has been set to: " (if (= (vla-get-ScaleLineweights ACADLayout) :vlax-true) "True" "False")))

    ;; Reset the preference back to its original value
    (vla-put-ScaleLineweights ACADLayout originalValue)
    (alert (strcat "The ScaleLineweights preference was reset back to: " (if (= originalValue :vlax-true) "True" "False")))
)