CenterMarkSize 属性 (ActiveX)
指定径向尺寸和直径尺寸的中心标记的大小。 支持的平台:仅限 Windows 属性值只读:不 类型:双 一个正实数,指定中心标记或线条的大小。 言论此属性的初始值为 0.0900。 如果该属性设置为 ,则此属性不可用。CenterTypeacCenterNone 注意:此属性将覆盖给定维度的 DIMCEN 系统变量的值。
例子VBA: Sub Example_CenterMarkSize() ' This example creates a diametric dimension in model space. ' It then changes the type of center for the dimension to ' center mark, and adjusts the size of the center mark. 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 ' Change the center type to center mark and set the size of the center mark dimObj.CenterType = acCenterMark dimObj.CenterMarkSize = 0.1 dimObj.Update MsgBox "The center mark size is: " & dimObj.CenterMarkSize dimObj.CenterMarkSize = dimObj.CenterMarkSize * 2 dimObj.Update MsgBox "The center mark size is: " & dimObj.CenterMarkSize End Sub 可视化 LISP: (vl-load-com) (defun c:Example_CenterMarkSize() ;; This example creates a diametric dimension in model space. ;; It then changes the type of center for the dimension to ;; center mark, and adjusts the size of the center mark. (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) ;; Change the center type to center mark and set the size of the center mark (vla-put-CenterType dimObj acCenterMark) (vla-put-CenterMarkSize dimObj 0.1) (vla-Update dimObj) (alert (strcat "The center mark size is: " (rtos (vla-get-CenterMarkSize dimObj) 2))) (vla-put-CenterMarkSize dimObj (* (vla-get-CenterMarkSize dimObj) 2)) (vla-Update dimObj) (alert (strcat "The center mark size is: " (rtos (vla-get-CenterMarkSize dimObj) 2))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 12:36
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.