autosnap markers invisible when invoked thru older lisp routines

autosnap markers invisible when invoked thru older lisp routines

bob_ups
Explorer Explorer
861 Views
4 Replies
Message 1 of 5

autosnap markers invisible when invoked thru older lisp routines

bob_ups
Explorer
Explorer

Just switched from release 2014 to 2018 and trying to bring all my legacy lisp routines with me. There are several lisps that don't work, but the most puzzling is how autosnap markers are invisible - but only when invoked thru one of my simple routines. For instance, "move", "nea", "per". 

Note that the osnap function actually works (tested this carefully) but the markers don't show. The markers do show when I invoke move, copy, etc. at the command line with running osnap (or picking a snap mid-command).

I've tried every setting for the autosnap variable, but if the markers are visible outside of my lisps, the problem would not be with the variable settings (would it?). 

It is pretty disconcerting not to see (and rely on) the markers. What changed between 2014 and 2018?

 

0 Likes
Accepted solutions (1)
862 Views
4 Replies
Replies (4)
Message 2 of 5

bob_ups
Explorer
Explorer

Suppose I could list one of the simple culprits - an old routine that's worked through numerous releases over the past 25 years. As I go to the  trouble of all this (my first Acad inquiry online), can't help wondering if there isn't something really simple I'm missing, but... anyway:

 

;SHORTHAND COMMAND TO MOVE FROM NEAREST TO PERPENDICULAR
(defun C:MNP ()
(PROMPT "\n..MOVE NEArest TO PERpendicular")
(setq XX (SSGET))
(COMMAND "MOVE" "P" "" "NEA" PAUSE "PER")
)

 

Once again, autosnap markers ('nea', 'per' in this case) do not present themselves (nor is 'magnet' function evident whatsoever - just realized this!) when I type MNP, then enter.

The command prompts correctly, and if I hover over, and then pick a line, then the other line, the command executes. A check reveals osnaps were functioning.

Immediately performing the same basic command by typing move (M) at command line, then grab 'nearest'/'perpendicular' lines - everything's kosher - markers and magnet show and work!

 

p.s. By the way credit due to Roger C. for writing the above lsp, way, way back 😉

 

0 Likes
Message 3 of 5

DannyNL
Advisor
Advisor
Accepted solution

I've tested your routine in AutoCAD 2018 and everything seems to be OK.

 

But check the variable OSNAPCOORD. It should be 0 or 2, usually 2.

You can find the same setting in the Options-->User Preferences-->Priority for Coordinate Data Entry

0 Likes
Message 4 of 5

bob_ups
Explorer
Explorer

Great! Set osnapcoord from <1> to <2> and it works like a charm.

Thanks for the super response!

0 Likes
Message 5 of 5

DannyNL
Advisor
Advisor

You're welcome & glad I could help Smiley Happy

0 Likes