Jump to content

Recommended Posts

Posted

Cursorsize changes the size, cursortype will change to Windows style pointer. But there isn’t a cursorcolor. Is there a way to use lisp to change the cursor color?

Posted (edited)

Its set in OLE_COLOR, so some color conversion might be necessary.

Or you can hardcode the color by changing it in the settings and retrieving the color-code using the first code below.

 

Here is how to get the current color:

(if (setq dis (vla-get-display (vla-get-Preferences (vlax-get-acad-object))))
  (vlax-variant-value (vlax-variant-change-type (vla-get-ModelCrosshairColor dis) vlax-vbLong)) ; Current color
)

 

And this way you can change the cursor color:

(if (setq dis (vla-get-display (vla-get-Preferences (vlax-get-acad-object))))
  (vla-put-ModelCrosshairColor dis 255) ; Change to red
)
Edited by dexus

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...