Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 10
mrkaplan
1233 Views, 9 Replies

snapmode

I am trying to understand what SNAPMODE does . I use acad 2009 . I have no problem to control my snaps , i use the cui macros to turn it on/ off . I am just curious .

Help says : snapmode has values 0 or 1,  and turns osnap on / off

 

Now when i set my snapmode, it can accept 0 , 1 or 2  . 

And changing value has no effect  . 

any idea why  ?

9 REPLIES 9
Message 2 of 10
stevor
in reply to: mrkaplan

Best bet is to read the directions about snap and object snap, from Autodesk or use google. Both can be controlled programmatically, with many examples here, etal. Search phrases: 'snap mode autocad' 'snap mode autolisp' 'setvar autolisp' and the more common type 'osmode.'
S
Message 3 of 10
Kent1Cooper
in reply to: mrkaplan


@mrkaplan wrote:

....

Help says : snapmode has values 0 or 1,  and turns osnap on / off

 

Now when i set my snapmode, it can accept 0 , 1 or 2  . 

And changing value has no effect  . 

....


For me, there's no apparent effect from changing the value between 1 and 2 [Snap is on either way, and I don't notice anything else that's different], but setting it to 0 does turn Snap off.  Is that not the case for you?

Kent Cooper, AIA
Message 4 of 10
mrkaplan
in reply to: Kent1Cooper

no, that's not the case for me . 0 value also leaves osnap unchanged .

Message 5 of 10
pbejse
in reply to: mrkaplan


@mrkaplan wrote:

no, that's not the case for me . 0 value also leaves osnap unchanged .


snapmode is for grid snap  not osnaps

 

i think you meant osmode

 

 

 

Message 6 of 10
mrkaplan
in reply to: pbejse

from the help file  :

" snapmode


Type: Integer
Saved in: Drawing
Initial value: 0

Turns the Snap mode on and off.

0
 Snap off
 
1
 Snap on for the current viewport
"

 

not specific about grid snaps . 

besides , snapmode  doesnt change grid snaps either

 

 



Message 7 of 10
Kent1Cooper
in reply to: mrkaplan


@mrkaplan wrote:

no, that's not the case for me . 0 value also leaves osnap unchanged .

from the help file  :

" snapmode

...

Turns the Snap mode on and off.
.... 

not specific about grid snaps . 

besides , snapmode  doesnt change grid snaps either

....


Whether you call it "grid snaps" or "positional snap" or something else, don't confuse Snap with Object snap, as the o quoted above suggests you may be doing.  SNAPMODE is about whether or not the cursor jumps between, or is limited to only, locations that are multiples of the SNAPUNIT setting from the SNAPBASE [origin] setting.  It is affected in other ways by various other System Variables whose names begin with SNAP [e.g. Standard vs. Isometric -- see the list of System Variables in the Command Reference in Help].

 

Snap settings are not related in any way to Object snap [Osnap], which is about locking onto locations on objects [endpoints, intersections, etc.], and is controlled by the OSMODE setting, on which the SNAPMODE setting has no effect [and vice versa].

 

Referring to positional snap as "grid snaps" has the potential to cause confusion with Grid settings, but SNAPMODE is not related to the the visible Grid if you have that on.  The SNAPUNIT setting will affect the visible Grid only if GRIDUNIT is set to 0,0, in which case the Grid dot spacing will match the Snap spacing.  And a non-zero SNAPANG setting will rotate the Grid.

 

Let me repeat my earlier question in a different way:

 

Set SNAPUNIT [either with the Snap command, in which case you can give it just one number, or by typing in SNAPUNIT, in which case you need to give it two with a comma between] to some clunky value, say, at least 10% of the height of the visible screen area.  With SNAPMODE set to 1 [or 2], does the cursor jump in increments of that size as you move your mouse around?  With SNAPMODE set to 0, does it flow smoothly as you move your mouse around?  That's the way SNAPMODE is supposed to work.

Kent Cooper, AIA
Message 8 of 10
pbejse
in reply to: Kent1Cooper


@Kent1Cooper wrote:

Whether you call it "grid snaps" or "positional snap" or something else, don't confuse Snap with Object snap,


There you go Smiley Happy

 

Thank you for the explanation Kent

 

 

Message 9 of 10
jclong
in reply to: pbejse

I see where the discussion went and I came here after searching for SNAPMODE.  The reason I came here is to find out what value 2 does.  I understand the 0 and 1 on/off but what is different when you choose SNAPMODE (2) ?   How does it differ from 0 and 1 ?

 

Curt Long

Message 10 of 10
Shneuph
in reply to: jclong

I think that snapmode set to 1 turns snap on always.  Snapmode set to 2 turns snap on only when a command is active.  Test it out.

 

edit:

No, I was wrong about that.. I don't notice a difference between snapmode being set to 1 or 2.

Also, you can change the behavior of snap as I described originally in the snap command under Legacy.  This apparently doens not affect the snapmode variable though.

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

Post to forums  

Autodesk Design & Make Report

”Boost