Specifies whether lineweights are displayed in model space for the drawing.
Supported platforms: Windows only
VBA:
object.LineweightDisplay
Type: DatabasePreferences
The object this property applies to.
Read-only: No
Type: Boolean
The initial value for this property is True.
AutoCAD regeneration time increases with lineweights that are represented by more than one pixel. Set this property to False if AutoCAD performance slows down when working with large lineweights.
VBA:
Sub Example_LineweightDisplay() ' This example reads and modifies the preference value that controls ' whether symbol names may include extended character sets, or more ' than 31 characters. ' ' When finished, this example resets the preference value back to ' its original value. Dim ACADPref As AcadDatabasePreferences Dim originalValue As Variant, newValue As Variant ' Get the user preferences object Set ACADPref = ThisDrawing.preferences ' Read and display the original value originalValue = ACADPref.LineWeightDisplay MsgBox "The LineweightDisplay preference is set to: " & originalValue ' Modify the LineweightDisplay preference by toggling the value ACADPref.LineWeightDisplay = Not (ACADPref.LineWeightDisplay) newValue = ACADPref.LineWeightDisplay MsgBox "The LineweightDisplay preference has been set to: " & newValue ' Reset the preference back to its original value ' ' * Note: Comment out this last section to leave the change to ' this preference in effect ACADPref.LineWeightDisplay = originalValue MsgBox "The LineweightDisplay preference was reset back to: " & originalValue End Sub
Visual LISP:
(vl-load-com) (defun c:Example_LineweightDisplay() ;; This example reads and modifies the preference value that controls ;; the display of lineweights in the drawing window. ;; ;; When finished, this example resets the preference value back to ;; its original value. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq preferences (vla-get-Preferences doc)) ;; Read and display the original value (setq originalValue (vla-get-LineWeightDisplay preferences)) (alert (strcat "The LineweightDisplay preference is set to: " (if (= originalValue :vlax-true) "True" "False"))) ;; Modify the LineweightDisplay preference by toggling the value (vla-put-LineWeightDisplay preferences (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (setq newValue (vla-get-LineWeightDisplay preferences)) (alert (strcat "The LineweightDisplay preference has been set to: " (if (= newValue :vlax-true) "True" "False"))) ;; Reset the preference back to its original value ;; ;; * Note: Comment out this last section to leave the change to ;; this preference in effect (vla-put-LineWeightDisplay preferences originalValue) (alert (strcat "The LineweightDisplay preference was reset back to: " (if (= originalValue :vlax-true) "True" "False"))) )