Search the Community
Showing results for tags 'lsp file'.
Found 3 results
Mars posted a topic in AutoLISP, Visual LISP & DCLHello. I am using an old acad.lsp file with custom modified commands. After years of using it without any problems, it suddenly stopped working. This happened on two different computers with different versions of autocad (17 and 18) and without any software or windows updates. AutoCAD prompted me to change "command" to "command-s" in the lisp file and it resumed working. The problem now is that whenever i open a .dwg file it keeps asking me if i want to save the file on c: drive. I would like this to stop. Does anybody know if this is a lisp file issue and how to solve it?
AutoLisp save as with timestamp
donat768 posted a topic in AutoLISP, Visual LISP & DCLHi! I have this code that i found here in the forum it was created by @rlx. My question is how to add an automatic current date and time to the end of the file when im saving it. Many thanks! xoxo (defun c:foo (/ _dir F NF P SF SH) (defun _dir (msg path / sh folder out) (or (vl-file-directory-p path) (setq path (getvar 'dwgprefix))) (cond ((and (setq sh (vlax-get-or-create-object "Shell.Application")) (setq folder (vlax-invoke-method sh 'browseforfolder 0 msg "&H2000" path)) ) (setq out (vlax-get-property (vlax-get-property folder 'self) 'path)) (setq out (strcat (vl-string-right-trim "\\" out) "\\")) ) ) (and sh (vlax-release-object sh)) out ) (if (setq p (_dir "Pick a directory yo!" "E:\\Autocad Files\\SSC\\North Region\\SNE\\")) (progn (setq f (getvar 'dwgname)) (setq sf "Plans") (setq nf (strcat p sf "\\" f)) (cond ((cond ((findfile nf) (print "File exists...") nil) ((vl-file-directory-p (strcat p sf)) (vl-file-copy (strcat (getvar 'dwgprefix) f) nf) t) ((vl-mkdir (strcat p sf)) (vl-file-copy (strcat (getvar 'dwgprefix) f) nf) t) ) (setq sh (vlax-get-or-create-object "Shell.Application")) (vlax-invoke-method sh 'open nf) (vlax-release-object sh) ) ) ) ) (princ) ) (vl-load-com)
Sharing Your Customized Toolbars
MudawarCad posted a topic in AutoLISP, Visual LISP & DCLHi, I'm having a hard time figuring out how to make a toolbar that can be downloaded for all to use. My problem is how do you share a "common directory" with the world? The toolbar works perfectly fine on my computer, because I have defined my own directory in the macro under the cui command. So the question is: how do you make a "common directory" so that the toolbar can be accessed on any computer? I hope I have made myself clear. Thanks!