将十字准线大小指定为屏幕大小的百分比。 支持的平台:仅窗口 属性值只读:不 类型:整数 一个介于 1 到 100 之间的正整数,表示要调整十字准线大小的总屏幕面积的百分比。 言论此属性的默认值为 5%。 允许的范围是整个屏幕的 1% 到 100%。在 100% 时,十字准线的末端是不可见的。如果尺寸减小到 99% 或更低,则十字准线的大小有限,并且十字准线的末端在移动到绘图区域的边缘时可见。 注意:此属性的值存储在 CURSORSIZE 系统变量中。
例子工 务 局: Sub Example_CursorSize()
' This example returns the current setting of
' CursorSize. It then changes the value, and finally
' it resets the value back to the original setting.
Dim preferences As AcadPreferences
Dim currCursorSize As Integer
Dim newCursorSize As Integer
Set preferences = ThisDrawing.Application.preferences
' Retrieve the current CursorSize value
currCursorSize = preferences.DISPLAY.CursorSize
MsgBox "The current value for CursorSize is " & currCursorSize, vbInformation, "CursorSize Example"
' Change the value for CursorSize
newCursorSize = 10
preferences.DISPLAY.CursorSize = newCursorSize
MsgBox "The new value for CursorSize is " & newCursorSize, vbInformation, "CursorSize Example"
' Reset CursorSize to its original value
preferences.DISPLAY.CursorSize = currCursorSize
MsgBox "The CursorSize value is reset to " & currCursorSize, vbInformation, "CursorSize Example"
End Sub
Visual LISP: (vl-load-com)
(defun c:Example_CursorSize()
;; This example returns the current setting of
;; CursorSize. It then changes the value, and finally
;; it resets the value back to the original setting.
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; Retrieve the current CursorSize value
(setq currCursorSize (vla-get-CursorSize (vla-get-Display preferences)))
(alert (strcat "The current value for CursorSize is " (itoa currCursorSize)))
;; Change the value for CursorSize
(setq newCursorSize 10)
(vla-put-CursorSize (vla-get-Display preferences) newCursorSize)
(alert (strcat "The new value for CursorSize is " (itoa newCursorSize)))
;; Reset CursorSize to its original value
(vla-put-CursorSize (vla-get-Display preferences) currCursorSize)
(alert (strcat "The CursorSize value is reset to " (itoa currCursorSize)))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-11-30 04:22
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.