Specifies the crosshairs size as a percentage of the screen size.
Supported platforms: Windows only
VBA:
object.CursorSize
Type: PreferencesDisplay
The object this property applies to.
Read-only: No
Type: Integer
A positive integer from 1 to 100 representing the percentage of total screen area to size the crosshairs to.
The default value for this property is 5 percent.
The allowable range is 1 to 100 percent of the total screen. At 100 percent, the ends of the crosshairs are not visible. If the size is decreased to 99 percent or below, the crosshairs have a finite size and the ends of the crosshairs are visible when moved to the edge of the drawing area.
VBA:
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))) )