半径寸法および直径寸法の中心マークのタイプを指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: acDimCenterType 列挙型
中心マークは寸法線を円または円弧の外側に配置した場合にのみ表示されます。
VBA:
Sub Example_CenterType()
' This example creates a diametric dimension in model space.
' It then changes the type of center for the dimension.
Dim dimObj As AcadDimDiametric
Dim chordPoint(0 To 2) As Double
Dim farChordPoint(0 To 2) As Double
Dim leaderLength As Double
' Define the dimension
chordPoint(0) = 5#: chordPoint(1) = 3#: chordPoint(2) = 0#
farChordPoint(0) = 5#: farChordPoint(1) = 5#: farChordPoint(2) = 0#
leaderLength = 1#
' Create the diametric dimension in model space
Set dimObj = ThisDrawing.ModelSpace.AddDimDiametric(chordPoint, farChordPoint, leaderLength)
ZoomAll
' Set the center to be none
dimObj.CenterType = acCenterNone
dimObj.Update
MsgBox "The dimension center type is set to none."
' Change the center type to center mark
dimObj.CenterType = acCenterMark
dimObj.Update
MsgBox "The dimension center type is set to center mark."
' Change the center type to center line
dimObj.CenterType = acCenterLine
dimObj.Update
MsgBox "The dimension center type is set to center line."
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_CenterType()
;; This example creates a diametric dimension in model space.
;; It then changes the type of center for the dimension.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the dimension
(setq chordPoint (vlax-3d-point 5 3 0)
farChordPoint (vlax-3d-point 5 5 0)
leaderLength 1)
;; Create the diametric dimension in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq dimObj (vla-AddDimDiametric modelSpace chordPoint farChordPoint leaderLength))
(vla-ZoomAll acadObj)
;; Set the center to be none
(vla-put-CenterType dimObj acCenterNone)
(vla-Update dimObj)
(alert "The dimension center type is set to none.")
;; Change the center type to center mark
(vla-put-CenterType dimObj acCenterMark)
(vla-Update dimObj)
(alert "The dimension center type is set to center mark.")
;; Change the center type to center line
(vla-put-CenterType dimObj acCenterLine)
(vla-Update dimObj)
(alert "The dimension center type is set to center line.")
)