LineweightDisplay 属性 (ActiveX)
指定是否在绘图的模型空间中显示线宽。 支持的平台:仅限 Windows 属性值只读:不 类型:布尔
言论此属性的初始值为 。True AutoCAD 再生时间随着线宽的增加而增加,线宽由多个像素表示。将此特性设置为在使用大线宽时 AutoCAD 性能降低的情况。False 例子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
可视化 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")))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 07:04
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.