- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All
I am having an issue with a lisp routine that sets a drawing to a set of defaults. I.E. zooms to extents,ortho on grid off ETC
I have the routine work all but the osnaps/osmode.
I can add the osnaps i want by listing them but i cannot add the apparent intersection osnap. the routine doesnt like the space. i tried an underscore, i tried no space, i tried just "apparent" with no success.
I went another route on setting the osmode to the number i wanted "31671" but the osnaps are not turned on after that.
i have also tried to turn on the osnaps with (command "._osnap" "on") after the osmode command no luck there either.
It doesnt matter which was I do it as long as it comes out with the desired osnaps on and theey are enabled.
below is the code i am using
thanks for any help
;Resets Default Drawing Settings
(prompt "\nType DDS-12 to run.....")
(DEFUN C: DDS-12 ()
;;Function sets default linetype, lineweight and color to bylayer
(command "._-LINETYPE" "S" "BYL" "")
(command "._-LWEIGHT" "BYL")
(command "._-COLOR" "BYL")
;;Function sets listed items to desired default settings
(command "._LWDISPLAY" "OFF")
(command "._ortho" "ON")
(command "._GRID" "OFF")
(command "._ZOOM" "E")
(command "._osmode" "31671")
or
(command "._OSNAP" "MIDPOINT,NEAREST,ENDPOINT,QUADRANT,INTERSECTION" "")
(command ".-LAYER" "m" "DefPoints" "c" "250" "" "s" "0" "")
(command "SNAPUNIT" "0.0625,0.0625")
(setvar "sdi" 1)
(setvar "filedia" 1)
);defun
(princ)
Solved! Go to Solution.