rjbrittain11 Posted November 13, 2015 Share Posted November 13, 2015 Standards when using the TM command is you have to put in a 1 or 0 depending on where you are. Is it possible to have a lisp that all you have to do is type TM and it automatically switches from where you are, whether it be paperspace or modelspace and switches you to the other without using the 1 or 0? I am on a mac with AutoCAD 2015 if that helps anyone. I also don't know how to make lisp routines, only use them I do remember one of my previous jobs we had a member of our team that was crazy good with AutoCAD programming. He had it set up this way on our PC's but that was in 2006-7 and i can't for the life of me remember what he did or how he did it. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 14, 2015 Share Posted November 14, 2015 (edited) Here is your TM lisp have a look also at my GOTO lisp goto 0 goto 5 like jumping to pages. (defun C:TMM () (if (= (getvar "tilemode") 1) (setvar "tilemode" 0) (setvar "tilemode" 1) ) ) Edited November 20, 2015 by BIGAL Quote Link to comment Share on other sites More sharing options...
RobDraw Posted November 15, 2015 Share Posted November 15, 2015 Really? With all the ways of switching, you need a LISP to do it? Quote Link to comment Share on other sites More sharing options...
David Bethel Posted November 15, 2015 Share Posted November 15, 2015 You can toggle sysvars using something like this : [b][color=BLACK]([/color][/b]defun c:tg [b][color=FUCHSIA]([/color][/b]/ v[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]initget 1 [color=#2f4f4f]"Blipmode Highlight splFrame Orthomode Tilemode Snapmode"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setq v [b][color=NAVY]([/color][/b]getkword [color=#2f4f4f]"\nSYSVAR to Toggle - Blipmode/Highlight/splFrame/Orthomode/Tilemode/Snapmode: "[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setvar v [b][color=NAVY]([/color][/b]- 1 [b][color=MAROON]([/color][/b]getvar v[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]princ v[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] I have a couple of combinations of acad and windows that the function keys are very quirky. So it's either ^b or a toggle for SNAPMODE to make sure it works 100% of the time. You add any sysvar that honors values of 1 or 0 only. -David Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 19, 2015 Author Share Posted November 19, 2015 Here is your TM lisp have a look also at my GOTO lisp goto 0 goto 5 like jumping to pages. (defun C:TMM () (if (= (getvar "tilemode") 1) (setvar "tilemode" 0) (setvar "tilemode" 1) ) sorry for the late reply. I copied this and it doesn't seem to work. Am i doing it right? Steps: 1. Copied into a text file called TB.lsp 2. Put in my support folder under AutoCAD 3. Typed in APPLOAD 4. Loaded the lisp routine 5. typed TM in the command field 6. still getting the 0 or 1 option. So it doesn't seem to have changed anything. Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 19, 2015 Author Share Posted November 19, 2015 You can toggle sysvars using something like this : [b][color=BLACK]([/color][/b]defun c:tg [b][color=FUCHSIA]([/color][/b]/ v[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]initget 1 [color=#2f4f4f]"Blipmode Highlight splFrame Orthomode Tilemode Snapmode"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setq v [b][color=NAVY]([/color][/b]getkword [color=#2f4f4f]"\nSYSVAR to Toggle - Blipmode/Highlight/splFrame/Orthomode/Tilemode/Snapmode: "[/color][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setvar v [b][color=NAVY]([/color][/b]- 1 [b][color=MAROON]([/color][/b]getvar v[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]princ v[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] I have a couple of combinations of acad and windows that the function keys are very quirky. So it's either ^b or a toggle for SNAPMODE to make sure it works 100% of the time. You add any sysvar that honors values of 1 or 0 only. -David you have gone WAY over my head. Is this just another LISP routine that I load? Sorry for my basic n00b questions but im really new to LISP's Quote Link to comment Share on other sites More sharing options...
Cad64 Posted November 20, 2015 Share Posted November 20, 2015 sorry for the late reply. I copied this and it doesn't seem to work. Am i doing it right? Steps: 1. Copied into a text file called TB.lsp 2. Put in my support folder under AutoCAD 3. Typed in APPLOAD 4. Loaded the lisp routine 5. typed TM in the command field 6. still getting the 0 or 1 option. So it doesn't seem to have changed anything. No, don't type TM. That is the normal Tilemode command. Type TMM to run the routine. Also, I modified Bigal's code. It was missing a parentheses and throwing an error when loaded. Try this one: (defun C:TMM () (if (= (getvar "tilemode") 1) (setvar "tilemode" 0) (setvar "tilemode" 1)) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 20, 2015 Share Posted November 20, 2015 Thanks Cad64 for correction copy and paste error. Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 21, 2015 Author Share Posted November 21, 2015 No, don't type TM. That is the normal Tilemode command. Type TMM to run the routine. Also, I modified Bigal's code. It was missing a parentheses and throwing an error when loaded. Try this one: hmmmm..... maybe i found my issue. Of course im using a mac with AutoCAD 2015... I use command APPLOAD and i try to load TMM.lsp and it is saying its unable to load in the bottom of the dialog box once i highlight it as hit the Load button. Any reasons why? I have copied the new code in. Sorry for the beginner questions is that is in fact the problem Quote Link to comment Share on other sites More sharing options...
Cad64 Posted November 21, 2015 Share Posted November 21, 2015 I have Zero experience with Autocad on Mac, so I don't know why the lisp routine won't load. It loads and runs fine on my PC. You copied all of the code that I posted previously, including the last parenthesis at the very bottom, pasted into Notepad and saved as TMM.lsp, correct? Are you able to load and run other lisp routines? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 23, 2015 Share Posted November 23, 2015 You may need to make it a trusted lisp this was bought in about 2014 you can turn it off so it does not check. Maybe this. https://forums.autodesk.com/t5/autocad-for-mac-general/trusted-location-for-custom-lisp-file-acad-mac/td-p/4550515 Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 24, 2015 Author Share Posted November 24, 2015 You may need to make it a trusted lisp this was bought in about 2014 you can turn it off so it does not check. Maybe this. https://forums.autodesk.com/t5/autocad-for-mac-general/trusted-location-for-custom-lisp-file-acad-mac/td-p/4550515 ok so i followed the TRUSTEDPATCH command and it seemed to have worked. Really strange that you still have to do that after you put the file location in the Support Paths. But I seem to have gotten it to work. Thanks all! Quote Link to comment Share on other sites More sharing options...
RobDraw Posted November 24, 2015 Share Posted November 24, 2015 It's a new security "feature". Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 25, 2015 Author Share Posted November 25, 2015 alright next question. I have added an acaddoc.lsp to this folder that i have added to the trusted list. How do i get this to load all my LISP routines automatically when I open AutoCAD? My understanding is that AutoCAD looks for the acaddoc.lsp file and loads whats in it. I have added my code below to what is in this file. Maybe its not coded right? This could be very likely the problem! HAHA (load “arcarrow”) (load “burst”) (load “flexspline”) (load “paste_as_block”) (load “tmm”) (load “txt2txt_mod1”) (load “xclipm”) (load “tb”) Quote Link to comment Share on other sites More sharing options...
Cad64 Posted November 25, 2015 Share Posted November 25, 2015 I have added an acaddoc.lsp to this folder that i have added to the trusted list. How do i get this to load all my LISP routines automatically when I open AutoCAD? You have to tell Autocad where the routines are located. Example: (load "C:/Program Files/Lisp/arcarrow.lsp") (load "C:/Program Files/Lisp/burst.lsp") (load "C:/Program Files/Lisp/flexspline.lsp") etc. . . . Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 25, 2015 Author Share Posted November 25, 2015 You have to tell Autocad where the routines are located. Example: (load "C:/Program Files/Lisp/arcarrow.lsp") (load "C:/Program Files/Lisp/burst.lsp") (load "C:/Program Files/Lisp/flexspline.lsp") etc. . . . awww i will try that. Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 25, 2015 Author Share Posted November 25, 2015 ok below is my code and still a no go on the acaddoc.lsp auto loading at start up. (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/arcarrow.lsp”) (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/burst.lsp”) (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/flexspline.lsp”) (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/paste_as_block.lsp”) (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/tmm.lsp”) (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/txt2txt_mod1.lsp”) (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/xclipm.lsp”) (load “/users/robertbrittain/library/application support/autodesk/roaming/autocad 2015/r20.0/enu/support/tb.lsp”) Quote Link to comment Share on other sites More sharing options...
Cad64 Posted November 25, 2015 Share Posted November 25, 2015 Again I have to plead ignorance. Is that how the Mac file paths look? There is no C:/? Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted November 30, 2015 Author Share Posted November 30, 2015 Again I have to plead ignorance. Is that how the Mac file paths look? There is no C:/? ya there is no "C:/" this is how it looks in the information on the file: /Users/robertbrittain/Library/Application Support/Autodesk/roaming/AutoCAD 2015/R20.0/enu/Support 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.