個々のオブジェクトの線の太さ、または図面の既定の線の太さを指定します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.Lineweight
タイプ: すべての図形オブジェクト、DatabasePreferences、Layer、SubDMeshEdge、SubDMeshFace、SubDMeshVertex、SubEntity、SubEntSolidEdge、SubEntSolidFace、SubEntSolidNode、SubEntSolidVertex
このプロパティが適用されるオブジェクト。
読み込み専用: いいえ
タイプ: acLineWeight 列挙型
このプロパティの初期値は acLnWtByBlock です。
線の太さの値は、標準の設定で構成されていて、ByLayer、ByBlock、既定が含まれています。DEFAULT 値は、システム変数 LWDEFAULT によって既定値の 0.01 インチまたは 0.25 mm に設定されます。すべての新しいオブジェクトと画層は、DEFAULT の既定の設定となります。線の太さを 0 にすると、指定した印刷デバイスで使用可能な最も細い線の太さで印刷され、モデル空間ではピクセル幅 1 で表示されます。
VBA:
Sub Example_LineWeight()
' This example creates a circle in model space and then
' finds the current lineweight for the circle. The lineweight
' is then changed to a new value.
Dim circleObj As AcadCircle
Dim centerPoint(0 To 2) As Double
Dim radius As Double
' Define the circle
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5#
' Create the Circle object in model space
Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
ZoomAll
' Find the lineweight for the circle
MsgBox "The current lineweight for the circle is " & circleObj.Lineweight
' Change the lineweight for the circle
circleObj.Lineweight = acLnWt211
circleObj.Update
MsgBox "The current lineweight for the circle is " & circleObj.Lineweight
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_LineWeight()
;; This example creates a circle in model space and then
;; finds the current lineweight for the circle. The lineweight
;; is then changed to a new value.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the circle
(setq centerPoint (vlax-3d-point 0 0 0)
radius 5)
;; Create the Circle object in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq circleObj (vla-AddCircle modelSpace centerPoint radius))
(vla-ZoomAll acadObj)
;; Find the lineweight for the circle
(alert (strcat "The current lineweight for the circle is " (itoa (vla-get-Lineweight circleObj))))
;; Change the lineweight for the circle
(vla-put-Lineweight circleObj acLnWt211)
(vla-Update circleObj)
(alert (strcat "The current lineweight for the circle is " (itoa (vla-get-Lineweight circleObj))))
)