Author Topic: custom cursor in AutoCAD  (Read 4279 times)

0 Members and 1 Guest are viewing this topic.

rajat_mallick

  • Guest
custom cursor in AutoCAD
« on: March 23, 2006, 11:14:57 AM »
Hi !

Is it possible to use "custom cursor" in AutoCAD through Visual Lisp ??

-Rajat Mallick :lmao:

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: custom cursor in AutoCAD
« Reply #1 on: March 23, 2006, 11:30:57 AM »
I don't know about through VisualLisp, although there are some external applications that can do it, as I have seen some where the cursor was changed.

I have tried to duplicate it with an external application but the way AutoCAD deals with the crosshairs, you would need to have some serious event trapping and that makes it a bit more difficult than I really cared bother with ... after all, it wasn't really that important to me ....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: custom cursor in AutoCAD
« Reply #2 on: March 23, 2006, 11:35:20 AM »
Welcome to the Swamp.

You may get some ideas from this cool routine.
http://www.theswamp.org/index.php?topic=9133.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Serge J. Gianolla

  • Guest
Re: custom cursor in AutoCAD
« Reply #3 on: March 23, 2006, 05:55:28 PM »
Depends what you are after! DOSLib from www.mcneel.com has a function to change cursor to hourglass.

They actually have announced the release of DOSLib for AutoCAD 2007, today.

zoltan

  • Guest
Re: custom cursor in AutoCAD
« Reply #4 on: March 23, 2006, 06:07:55 PM »
I tried like crazy with this AcitveX component, but I could never get it to work:
http://www.jcomsoft.com/anicur.htm

Here is the not-working code:
Code: [Select]
(Defun C:test ()
 (VL-Load-Com )
 
 (VLAX-Import-Type-Library
  :TLB-Filename "C:/Documents and Settings/Zoltan/My Documents/Projects/AniCursor/AniCur.ocx"
  :Methods-Prefix "ani-"
  :Properties-Prefix "ani-"
  :Constants-Prefix "ani-"
 ) ;;Import AniCursor type library

 (VLAX-Import-Type-Library
  :TLB-Filename "C:/Documents and Settings/Zoltan/My Documents/Projects/AniCursor/hWnd.ocx"
  :Methods-Prefix "wnd-"
  :Properties-Prefix "wnd-"
  :Constants-Prefix "wnd-"
 ) ;;Import hWnd type library
 
 (SetQ aniAppObj (VLAX-Get-or-Create-Object "AniCursor.AniCursor") ) ;;Get AniCursor application object
 (SetQ wndAppObj (VLAX-Get-or-Create-Object "hWndCtrl.hWndCtrl") ) ;;Get hWnd application object

 (GetString ) ;;pause after that stupid registration dialog, and regain focus

 (SetQ DocWndHnd (VLA-Get-HWND (VLA-Get-ActiveDocument (VLAX-Get-Acad-Object))) ) ;;Get window handle of active document
 (SetQ AcadWndHnd (wnd-GetParent wndAppObj DocWndHnd) ) ;;get the handle of the parent
 (SetQ SomeWndHnd (wnd-GetParent wndAppObj AcadWndHnd) ) ;;get the handle of..umm..someother parent
 
 (ani-ReadAni aniAppObj "C:/Program Files/MDT6/desktop/support/lmcycle.ani" ) ;;steal cursor from MDT

 (VLAX-Put-Property aniAppObj 'hWnd SomeWndHnd ) ;;set the animation cursor application's hWnd to AutoCad's
 
 (ani-StartAniCursor aniAppObj ) ;;start the animating cursor

 (GetString) ;;pause

)

Sorry, I am of no help.