See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: cursor freeze in AC2022 with grread

  1. #1
    Member
    Join Date
    2009-09
    Posts
    10
    Login to Give a bone
    0

    Default cursor freeze in AC2022 with grread

    Hi,
    if I run a simple testprogramm ...
    Code:
    ;;; testprogramm ... 
    (defun foo( / x)
     (while(= 5(setq x(car(grread t 15 0))))
      (redraw))
      (princ(strcat "test result: " (itoa x))))
    ;;; end testprogramm
    ... in AutoCAD 2022 (AC2022), while drawing a eg a poli ... type (foo) + enter ... the cursor freeze.
    ... is this a bug?

    I wrote many usefull programms with grread, but in AC2022 the cursor hang.

    thanks for tips ...
    rob
    Last edited by BlackBox; 2021-10-26 at 02:40 PM. Reason: Please use [CODE] Tags

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: cursor freeze in AC2022 with grread

    I am not seeing that in 2022:

    Code:
    Command: (foo)
    test result: 3"test result: 3"
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Member
    Join Date
    2009-09
    Posts
    10
    Login to Give a bone
    0

    Default Re: cursor freeze in AC2022 with grread

    Quote Originally Posted by BlackBox View Post
    I am not seeing that in 2022:

    Code:
    Command: (foo)
    test result: 3"test result: 3"
    ... yes but, to see what the cursor does, you have to be in a eg. Line or poli command.
    So, please draw a line, and after some points call (foo)
    ... than - just in ac2022 the cursor hang.

    Grread this is a really valuable function, because it can evaluate the position of the cursor and the keys.
    I have more than 30 snap functions, which I use permanently.

    thanks for response
    Rob

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: cursor freeze in AC2022 with grread

    Okay, I am able to reproduce this comparing 2019 to 2022... But I still do not believe it is a bug, based on the GRREAD documentation in help:

    <snip>

    Remarks

    Only specialized AutoLISP routines need this function. Most input to AutoLISP should be obtained through the various getXXX functions.

    Entering Esc while a grread is active aborts the AutoLISP program with a keyboard break (unless the allkeys argument has disallowed this). Any other input is passed directly to grread, giving the application complete control over the input devices.

    <snip>
    Ironically, it sounds like Autodesk has fixed a bug in 2022, that previously allowed GRREAD to work in-command in older versions. Since you're only posting a small snippet of code, I don't understand why you'd even want to call GRREAD in-command, when it's usually used to allow you to have a custom LISP routine mimic actual Commands.

    Regardless, as the behavior has changed, you should consider reporting it to Autodesk and/or create an API Support ticket.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    Member
    Join Date
    2009-09
    Posts
    10
    Login to Give a bone
    1

    Default Re: cursor freeze in AC2022 with grread

    Quote Originally Posted by BlackBox View Post
    Okay, I am able to reproduce this comparing 2019 to 2022... But I still do not believe it is a bug, based on the GRREAD documentation in help:



    Ironically, it sounds like Autodesk has fixed a bug in 2022, that previously allowed GRREAD to work in-command in older versions. Since you're only posting a small snippet of code, I don't understand why you'd even want to call GRREAD in-command, when it's usually used to allow you to have a custom LISP routine mimic actual Commands.

    Regardless, as the behavior has changed, you should consider reporting it to Autodesk and/or create an API Support ticket.

    Cheers
    Thank you BlackBox for answer!

    grread is supposed to allow access to the cursor during a command.
    Including cursor point, keyboard clicks and the mouse buttons.
    without an active command it wouldn't make sense.

    i shortened the program example so you don't have to read 5 pages of code including vb program with the same result.
    leemac has very clearly pointed out the value of grread.
    Look here ... http://www.lee-mac.com/grsnap.html

    for me grread opened a new world of point snapping.
    So I could mark the snap point already at that time, before autocad itself considered it necessary.

    It is also noticeable that "cursor hangs" problems in AC22 - not related to grread - are becoming more frequent.

    Best regards
    Rob

Similar Threads

  1. using grread
    By mdsalman2003 in forum AutoLISP
    Replies: 6
    Last Post: 2014-11-22, 06:21 AM
  2. ISOLATEOBJECTS to include the option to Lock, Freeze & VP Freeze
    By Wish List System in forum AutoCAD Wish List
    Replies: 3
    Last Post: 2014-11-08, 06:22 PM
  3. HIDEOBJECTS to include the option to Freeze & VP Freeze
    By Wish List System in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2014-10-28, 02:20 PM
  4. I Freeze Layers on the Sheet but wont Save what I Freeze
    By jrosario in forum AutoCAD General
    Replies: 3
    Last Post: 2008-02-15, 11:48 AM
  5. OSNAPS IN GRREAD FUNCTION
    By hostetterkl in forum AutoLISP
    Replies: 6
    Last Post: 2005-08-03, 06:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •