jjatho Posted October 5, 2015 Posted October 5, 2015 I'm writing an AutoLISP script that will auto dimension some objects I use quite often, but in different configurations and patterns. I'm using the following in the script to deal with 2D snap: (setq snapMode (getvar "osmode")) ;Get current Object Snap Mode (setvar "osmode" 0) ;Turn off Object snap (setvar "osmode" snapMode) ;Restore Object Snap values Those three lines are in the correct locations in the code to adjust the snap modes as needed. The code works flawlessly when 3D Object snap is turned off, but the dimensions end up in the wrong spots when 3D object snap is on. Googling didn't help, so I'm hoping that there's a way to turn off 3D snap via AutoLISP. I work in both 2D and 3D all day long, so keeping 3D turned off at all times isn't the best option here. Quote
tombu Posted October 5, 2015 Posted October 5, 2015 You probably need to set the 3dosmode system variable as well. Quote
jjatho Posted October 5, 2015 Author Posted October 5, 2015 Thanks! Fixed it instantly. For some damn reason I couldn't find the system variable via googling. Quote
Dadgad Posted October 6, 2015 Posted October 6, 2015 Thanks! Fixed it instantly. For some damn reason I couldn't find the system variable via googling. When in doubt, and trying to figure out a system variable, try using SYSVDLG, where it is usually pretty easy to find what you are looking for, and much more. An excellent way to learn plenty about the software, and available options, just use your keyboard cursor to scroll throught the list, to quickly review functionality, once you think you are in the right neck of the woods on the list. Quote
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.