I made a series of 'menu' for most osnaps, like this: [Endpoint]'osmode;1; [Midpoint]'osmode;2; [Intersec]'osmode;32; [ApparentInt]'osmode;2048; [Extension]'osmode;4096; [Center]'osmode;4; [Quadrant]'osmode;16; [Tangent]'osmode;256; [Perpend]'osmode;128; [Parallel]'osmode;8192; [Insert]'osmode;64; [Node]'osmode;8; [Nearest]'osmode;512; [all osnaps]'osmode;15359; [no osnaps]'osmode;0;
It's also possible to combine osnaps, like Endpont and Center, osmode would become 1+4=5 ('osmode;5;)
Hope it helps.
Jan
"Roy Knapp" schreef in bericht news:Xns9517DD678A14Croynish@216.168.3.44...
"JP" wrote in news:cbub94$jht$ snipped-for-privacy@reader13.wxs.nl:
sorry, I want it IN the lisp code. I too have a pull down menu to reset the running mode. that is what I want to over ride in the lisp.
if you want any combination, you could look up the various values and do the math, but I just type osmode on the command line after I have it set and it returns as the default the current comination, whether it's center- mid-perp or node-tangent, or whatever wackyness,,,,,,,
I found an old line of code I wrote years ago that works, (setq pt (osnap (cadr a) "nea")) but I still think I have seen it done slicker.
I just figured out the matrix for justification of MTEXT and I am having way too much fun rewriting old code with the improvements.
Save the current settings (setq old_osmode (getvar "osmode")) then change it to whatever you like with a setvar call,(setvar "osmode" ###) do your business, then restore it with another setvar call, (setvar "osmode" old_osmode) It's all in the help.
MichaelB
formatting link
----- Original Message ----- From: "Roy Knapp" Newsgroups: alt.cad.autocad Sent: Tuesday, June 29, 2004 10:43 PM Subject: over rides for snap and variables
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.