PDA

View Full Version : Help adding OSNAP to LISP


ReachAndre
2006-03-02, 10:05 PM
I am starting to create lisps of my own (FINALLY AFTER YRS) A gentleman was kind enough to paste the lisp below. I am trying to make the first point snap to intersection and the following points snap to center.I noticed on other threads people have use osmode and a code (Ex: code 255..... How doe this work? and where can I find information on OSNAP code. Thanks in advance everyone
Here is the lisp the gentleman was kind enough to write and post for me to use.

(defun c:FakeBaseline (/ Pt1 Pt2)
(if (setq Pt1 (getpoint "n Select baseline origin point: "))
(while (setq Pt2 (getpoint Pt1 "n Select second point for dimension: "))
(command "_.dimlinear" Pt1 Pt2 pause)
)
)
(princ)
)[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]

T.Willey
2006-03-02, 10:46 PM
Osmode is a system variable, and the number supplied tells it what to set as running osnaps. If you want to use it, just set the osnap the way you want, and then type in osmode at the command, and it should tell you the current value. You can then add that value to the lisp routine posted where you want to use those snaps.

HTH.

miff
2006-03-02, 11:54 PM
In addition to what Tim said, look in the Online Command Reference under "System Variables" for OSMODE. There you will find all of the corresponding numbers for the different object snaps.

Jeff