Guest THE BRAT Posted December 9, 2003 Share Posted December 9, 2003 This is a message I get once in awhile when I try to change my osnap settings on a dwg that is sent to me by designers. AutoCAD won't let me change the settings and then I have to right button click for endpoint, midpoint,quadrant,..etc. I can copy the dwg. to another dwg and the problem is solved...but what a pain having to unlock and relock all the layers in the dwg. Is this some sort of lock on the designers dwg that I can change, or maybe its created in an earlier version of AutoCAD? Its not life threatening and I can work around it but I feel its a waste of time!....any takers?... Quote Link to comment Share on other sites More sharing options...
Guest Flores Posted December 9, 2003 Share Posted December 9, 2003 Actually you are talking about 2 different variables. SNAPUNIT sets the snap spacing for the current viewport while OSMODE sets running Object Snap modes using the following bitcodes. 0 NONe 1 ENDpoint 2 MIDpoint 4 CENter 8 NODe 16 QUAdrant 32 INTersection 64 INSertion 128 PERpendicular 256 TANgent 512 NEArest 1024 QUIck 2048 APParent Intersection 4096 EXTension 8192 PARallel Flores Quote Link to comment Share on other sites More sharing options...
Guest THE BRAT Posted December 9, 2003 Share Posted December 9, 2003 ....and so how do I get around it? Quote Link to comment Share on other sites More sharing options...
Guest Flores Posted December 9, 2003 Share Posted December 9, 2003 3 things: Copy and paste the lisp routine. Put the location of the .lsp in the ACAD support path. Copy and paste the tool button macro into a new user-defined button. TogOsnap.lsp ;| TogOsnap.lsp Enter tos at command line to toggle Osnap on and off Good example of toggling a variable |; (defun C:tos () (if (= (getvar "osmode") 0) (progn (setvar "osmode" 133) (prompt "\nEnd, Cen, and Perp Osnaps on") ) ;progn (progn (setvar "osmode" 0) (prompt "\nOsnaps off.") ) ;progn ) ;if (princ) ) ;defun (prompt "To use, enter tos at the command line.") (princ) ;| Here are the bitcodes just add up your favorites Example: End + Cen + Perp is 1 + 4 + 128 = 133 Thus (setvar "osmode" 133) 0 NONe 1 ENDpoint 2 MIDpoint 4 CENter 8 NODe 16 QUAdrant 32 INTersection 64 INSertion 128 PERpendicular 256 TANgent 512 NEArest 1024 QUIck 2048 APParent Intersection 4096 EXTension 8192 PARallel |; Add location to support path: Tools > Options > Files tab > Support Path Search Path (add > browse) Toolbutton macro: ^C^C(if c:tos (princ)(load "togosnap")) tos You will need to change the osmode variable to your preferred settings, then change the prompt to display your preferred osnaps. Example: (prompt "\nEnd, Mid, and Quad Osnaps on") Flores Quote Link to comment Share on other sites More sharing options...
Guest THE BRAT Posted December 9, 2003 Share Posted December 9, 2003 WOW!!...I did'nt expect such a complicated answer! I'm not really big on the lisp side of AutoCAD...YET! Is this a permanent solution to this problem or do I load this whenever I come across this problem? And does the button macro always stay in a toolbar?.....have I misunderstood this? I often toggle through many of the osnaps depending on what I'm doing. Will this make certain osnaps stay on?..or off? Quote Link to comment Share on other sites More sharing options...
Mr T Posted December 9, 2003 Share Posted December 9, 2003 WOW!!...I did'nt expect such a complicated answer! I'm not really big on the lisp side of AutoCAD...YET! Is this a permanent solution to this problem or do I load this whenever I come across this problem? And does the button macro always stay in a toolbar?.....have I misunderstood this? I often toggle through many of the osnaps depending on what I'm doing. Will this make certain osnaps stay on?..or off? Investigate the settings within the command OPTIONS called profiles. Nick Quote Link to comment Share on other sites More sharing options...
Guest Flores Posted December 9, 2003 Share Posted December 9, 2003 Maybe an easier answer would be "You don't have to unlock and relock all the layers in the dwg to change the osnaps, just CTRL + LEFT CLICK to reset your preferred osnaps". Flores Quote Link to comment Share on other sites More sharing options...
Guest THE BRAT Posted December 10, 2003 Share Posted December 10, 2003 I don't have a problem accessing or turning osnap on or off when there's no error message I've got that part down, and I only unlock the layers when I have to copy the dwg into another dwg. I'll also follow up on what Mr T suggested...I'm not discounting what you have advised Flores, I'm just not that advanced yet....but I will try the lisp today Quote Link to comment Share on other sites More sharing options...
Guest THE BRAT Posted December 10, 2003 Share Posted December 10, 2003 okay, i've entered the lisp and it works great! i've also copied and changed some of the values in it and set up a few different lisp routines that will come in handy for different aspects of my work. Thanks to all who offered help, and do you know any good books about explaining and learning lisp programming.....i'm hooked! Quote Link to comment Share on other sites More sharing options...
Guest Flores Posted December 10, 2003 Share Posted December 10, 2003 Glad you gave it a try... LISP isn't as scary as it looks. I have a grasp of AutoLISP, but Visual LISP throws me in for a loop, but I hope to learn it soon. Before you go out and buy some books, there are several places on the internet that can help you out. Also, there are several good sites to download lisp routines. Tutorials: http://www.afralisp.com/tutor.htm http://home.netcom.com/~rogh/autolisp/ http://www.geocities.com/cadgurucool/tutorial.htm LISP Downloads http://www.cadalog.com/swsubcat.php?value=ACG http://www.caddepot.com/dcd/Autodesk/ There are tons of free info and routines on the net that you ought to take advantage of. Flores Quote Link to comment Share on other sites More sharing options...
hendie Posted December 10, 2003 Share Posted December 10, 2003 and also, check out the "swamp" in my signature line Quote Link to comment Share on other sites More sharing options...
Guest THE BRAT Posted December 10, 2003 Share Posted December 10, 2003 Thanks I'll check them out! Quote Link to comment Share on other sites More sharing options...
Arizona Posted December 11, 2003 Share Posted December 11, 2003 All you had to do is set your "snap" spacing to a positive number. This error happens when the snap unit is set to ZERO in both the x & y direction. The far left tab (snap & grid) of the drafting settings dialog box (what you enter when you attempt to change the osnap mode) is the place to change these settings. This is a message I get once in awhile when I try to change my osnap settings on a dwg that is sent to me by designers. AutoCAD won't let me change the settings and then I have to right button click for endpoint, midpoint,quadrant,..etc. I can copy the dwg. to another dwg and the problem is solved...but what a pain having to unlock and relock all the layers in the dwg. Is this some sort of lock on the designers dwg that I can change, or maybe its created in an earlier version of AutoCAD? Its not life threatening and I can work around it but I feel its a waste of time!....any takers?... Quote Link to comment Share on other sites More sharing options...
RDBArchitect Posted August 15, 2014 Share Posted August 15, 2014 RDBArchitect Drawings received from sources other than your inner office may be have settings that you are used to , or they may be corrupt. I would simply copy clip the drawing and copy paste it into new drawing files of your choice (verify that the recipient drawing has the correct snap settings) Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 15, 2014 Share Posted August 15, 2014 RDBArchitect Drawings received from sources other than your inner office may be have settings that you are used to , or they may be corrupt. I would simply copy clip the drawing and copy paste it into new drawing files of your choice (verify that the recipient drawing has the correct snap settings) Welcome to CADTutor RDB. No doubt the OP will be gratified to have a viable solution, after close to an 11 year wait, hopefully he isn't still working on that same drawing! Please check dates on threads, before responding to them, as Necromancing old threads is generally frowned on here, as it clutters up the board with waters long gone under the bridge. Nonetheless, it still happens, occasionally, even to those who are longtime forum members. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted August 15, 2014 Share Posted August 15, 2014 Is this a new record? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.