osnap
 
 
 

Returns a 3D point that is the result of applying an Object Snap mode to a specified point

(osnap pt mode) 

Arguments

pt

A point.

mode

A string that consists of one or more valid Object Snap identifiers, such as mid, cen, and so on, separated by commas.

Return Values

A point; otherwise nil, if the pick did not return an object (for example, if there is no geometry under the pick aperture, or if the geometry is not applicable to the selected object snap mode). The point returned by osnap depends on the current 3D view, the AutoCAD entity around pt, and the setting of the APERTURE system variable in the Command Reference.

Examples

Command: (setq pt1 (getpoint))

(11.8637 3.28269 0.0)

Command: (setq pt2 (osnap pt1 "_end,_int"))

(12.1424 3.42181 0.0)