Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Snap cursor turning off

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
1401 Views, 8 Replies

Snap cursor turning off

"Snap cursor to 2D reference points" Is constantly turning off after using some lisp commands (maybe some default commands as well that I havent noticed). Not only it is turning off, but turning off every snapping option therefore it can get irritating turning it all back.

Im using ACAD 2021 and hope that someone has a solution.

 

Thanks.

8 REPLIES 8
Message 2 of 9
imadHabash
in reply to: Anonymous

Hi,

>> "Snap cursor to 2D reference points" Is constantly turning off after using some lisp commands

Since you use Lisps then you have to expect such a problem . there is No solution for that except that you load your lisp just when really to want to use . 

 

 

Imad Habash

EESignature

Message 3 of 9
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

"Snap cursor to 2D reference points" Is constantly turning off after using some lisp commands .... Not only it is turning off, but turning off every snapping option therefore it can get irritating turning it all back.

....


Something in the AutoLisp command(s) is setting the OSMODE System Variable to 0, and not setting it back to what it was.  They can be made to save its value first, set it to 0 for their work, and restore it afterwards.  That would need to be done in all such routines.  Alternatively [and it's more complicated], they could be made to turn off running modes without  wiping out your combination, in a way that's equivalent to hitting the F3 key, so you could hit that to turn them back on when the problem occurs.

 

Or, you can set your preferred running Osnap modes, check the value of OSMODE, and make yourself a little Tool Palette item or command name to set it to that value for you, so you can instantly restore it when the problem occurs.  I have one that contains simply:
'osmode 163

which sets it to my preferred combination of END/INT/MID/PER.

 

EDIT:  A question:  Does this happen only if you get out of an AutoLisp-defined command by ESCape, and not if you complete whatever it does normally?  If so, they probably do save and restore OSMODE, but they don't have the proper *error* handling to ensure that it's restored in the event of an error [including cancelling via ESCape].  That can be added, but also would need to be added in all such routines.

Kent Cooper, AIA
Message 4 of 9
dmfrazier
in reply to: Anonymous

If you know there are lisp commands that do this (and are going to do this again), then you have two options:

1. Modify any lisp commands to store your settings and then restore the settings when finished.

2. Create a "button" (macro) that you can use to quickly and easily restore your preferred settings when they get boogered.

Message 5 of 9
cadffm
in reply to: Anonymous

Solution is: Use only well written programs, bullet proof for user usage.

 

The only reason for this is: It isn't a ready program or just bad programming.

 

Osnap set to 0 is bad, without error handling worst.

 

For paid programs: Start a support call as bug report.

The fine way is to disable osnaps for programs with user interacts (and not using osnaps is prefered)

or for 99% of such lisp snippeds, set osnapcoords to 1 so the osnaps act line the userinput manually.

 

If you talk about free source code lisp in www: Learn and edit 🙂

 

 

Sebastian

Message 6 of 9
RobDraw
in reply to: imadHabash


@imadHabash wrote:

Since you use Lisps then you have to expect such a problem .


 

Using LISPs does not mean there are going to be problems. Using poorly written ones can but LISP in itself does not cause problems.

 


@imadHabash wrote:

there is No solution for that except that you load your lisp just when really to want to use . 


 

The solution is to edit the LISP so that it returns the setting(s) to the original value(s).


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
Message 7 of 9
Anonymous
in reply to: Kent1Cooper

The lisp turns off OSNAP right after i enter command, but reading all the answers I am sure it is just because the lisp is poorly writen. Making command name for specific snapping combinations could be very useful in daily work though. Thank you!

Message 8 of 9
RobDraw
in reply to: Anonymous


@Anonymous wrote:

The lisp turns off OSNAP right after i enter command, but reading all the answers I am sure it is just because the lisp is poorly writen. 


 

Turning off OSnaps could very well be by design. Returning to the original setting can be written into the LISP. I'm sure someone over in the Customization and LISP forum would be able to help you out with amending it or recommending a different approach.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
Message 9 of 9
dmfrazier
in reply to: Anonymous

@Anonymous 

Please mark one of these responses (hint: @Kent1Cooper 's) as the solution.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

State of Sustainability Webinar


AutoCAD Inside the Factory