acaddoc.lsp
acaddoc.lsp must also be manually created from a blank notepad .txt file and reanmed. It may exist with or without the acad.lsp.
This file contains any code which should run at the start of any .dwg drawing whether it is new or existing.
acaddoc.lsp must also be manually created from a blank notepad .txt file and reanmed. It may exist with or without the acad.lsp.
This file contains any code which should run at the start of any .dwg drawing whether it is new or existing.
;acaddoc.lsp
;See acad.lsp for how to use it to call this acaddoc.lsp file.
;Optionally force DIMASSOC to equal 1
;(command "dimassoc" "1")
;Optionally force WIPEOUT Frames to equal OFF
;(command "wipeout" "f" "off")
;Optionally force SAVETIME to equal IO minutes
;(command "SAVETIME" "10")
;Optionally force PLOTSTAMP Log to equal OFF
;(command "_-PLOTSTAMP" "_LOG" "_NO" "PLOT.LOG" "")
If a security message appears asking about how to load this file, then you have not set your Trusted Location path.
Click Load Once, go fix that, and this message will go away.
Always Load - designed to load at every drawing, so it is recommended to lock it in permanently.
Load Once - will load only for this one drawing but it will prompt you next time too.
(setvar 'VISRETAIN' 1)
(setvar 'SAVEFILEPATH' "C:\\TEMP")
(setvar 'savetime' 10)
(setvar 'Proxyshow' 1) ;;turns proxy graphics on
(setvar 'Proxynotice' 0)
(setvar 'Textsize' 0.1) ;;set text size
(setvar "MENUBAR" 1)
There are a few files which can try oto infiltrate your CAD environment. This routine attempts to spot and delete them.
Unknown code source.
;;;-----------------------------------------
;Some common mallicious AutoLISP which like to show up and disrupt things.
;Simply look for them and delete them at every drawing open.
(defun cleanvirus(/ lspfiles lspfile x)
(setq lspfiles '("acad.vlx" "logo.gif" "acad.fas" "cad.fas"))
(foreach lspfile lspfiles
(while (setq x (findfile lspfile))
(progn
(vl-file-delete x)
(princ "\nDeleted file(s):. Notify CAD Admin if you actually see this message.\n")
(princ x)
(princ "\nNotify CAD Admin if you see this message.\n")
);progn
);while
);foreach
(princ)
);defun
(cleanvirus)
;;;-----------------------------------------
;;;-----------------------------------------
;Action: Set PLOTSTAMP Log to Off
;Reason: No one looks at the plot.log and if found is usually deleted, so lets turn this default off each time.
(command "_-PLOTSTAMP" "_LOG" "_NO" "PLOT.LOG" "")
(princ "\n[SUCCESS] Plotstamp .log turned off")
;;;-----------------------------------------
;;;-----------------------------------------
;Action: Set PDFSHX to 0
;Reason: Prevents shx objects from exporting to the PDFs
(setvar "PDFSHX" 0)
(princ "\n[SUCCESS] SHX files no longer export to PDF")
;;;-----------------------------------------
Originally found in a custom.lsp and a few people like working in head on views instead of 3D isometric views.
;Views - Taken directly from Image's custom.lsp and is perhaps the only things used from that file.
(defun c:1 () (prompt "SW iso...") (command "_.vpoint" "_non" "*-1,-1,1" "ucs" "w" "UCSICON" "ON"))
(defun c:11 () (prompt "SW oblq...") (command "_.vpoint" "_non" "*-6,-4,1" "ucs" "w" "UCSICON" "ON"))
(defun c:111 () (prompt "-SW oblq...") (command "_.vpoint" "_non" "*-6,-4,-1" "ucs" "w" "UCSICON" "ON"))
(defun c:15 () (prompt "SW 45...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,-1,0" "_.vpoint" "r" "225" "0"))
(defun c:215 () (prompt "SSW...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,-1,0" "_.vpoint" "r" "245" "0" ))
(defun c:235 () (prompt "SSE...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,-1,0" "_.vpoint" "r" "295" "0" ))
(defun c:2 () (prompt "Front...") (command "_.vpoint" "_non" "*0,-1,0" "ucs" "v" "UCSICON" "ON"))
(defun c:3 () (prompt "SE iso...") (command "_.vpoint" "_non" "*1,-1,1" "ucs" "w" "UCSICON" "ON"))
(defun c:33 () (prompt "SE oblq...") (command "_.vpoint" "_non" "*6,-4,1" "ucs" "w" "UCSICON" "ON"))
(defun c:333 () (prompt "-SE oblq...") (command "_.vpoint" "_non" "*6,-4,-1" "ucs" "w" "UCSICON" "ON"))
(defun c:35 () (prompt "SE 45...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,-1,0" "_.vpoint" "r" "315" "0"))
(defun c:4 () (prompt "Left...") (command "_.vpoint" "_non" "*-1,0,0" "ucs" "v" "UCSICON" "ON"))
(defun c:415 () (prompt "WSW...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*-1,0,0" "_.vpoint" "r" "205" "0" ))
(defun c:475 () (prompt "WNW...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*-1,0,0" "_.vpoint" "r" "155" "0" ))
(defun c:5 () (prompt "Top...") (command "_.vpoint" "_non" "*0,0,1" "ucs" "w" "UCSICON" "ON"))
(defun c:55 () (prompt "Under...") (command "_.vpoint" "_non" "*0,0,-1" "ucs" "w" "UCSICON" "ON"))
(defun c:6 () (prompt "Right...") (command "_.vpoint" "_non" "*1,0,0" "ucs" "v" "UCSICON" "ON"))
(defun c:695 () (prompt "ENE...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*1,0,0" "_.vpoint" "r" "25" "0" ))
(defun c:635 () (prompt "ESE...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*1,0,0" "_.vpoint" "r" "335" "0" ))
(defun c:7 () (prompt "NW iso...") (command "_.vpoint" "_non" "*-1,1,1" "ucs" "w" "UCSICON" "ON"))
(defun c:77 () (prompt "NW oblq...") (command "_.vpoint" "_non" "*-6,4,1" "ucs" "w" "UCSICON" "ON"))
(defun c:777 () (prompt "-NW oblq...") (command "_.vpoint" "_non" "*-6,4,-1" "ucs" "w" "UCSICON" "ON"))
(defun c:75 () (prompt "NW 45...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,1,0" "_.vpoint" "r" "135" "0" ))
(defun c:8 () (prompt "Back...") (command "_.vpoint" "_non" "*0,1,0" "ucs" "v" "UCSICON" "ON"))
(defun c:895 () (prompt "NNE...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,1,0" "_.vpoint" "r" "65" "0" ))
(defun c:875 () (prompt "NNW...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,1,0" "_.vpoint" "r" "115" "0" ))
(defun c:9 () (prompt "NE iso...") (command "_.vpoint" "_non" "*1,1,1" "ucs" "w" "UCSICON" "ON"))
(defun c:99 () (prompt "NE oblq...") (command "_.vpoint" "_non" "*6,4,1" "ucs" "w" "UCSICON" "ON"))
(defun c:999 () (prompt "-NE oblq...") (command "_.vpoint" "_non" "*6,4,-1" "ucs" "w" "UCSICON" "ON"))
(defun c:95 () (prompt "NE 45...") (command "UCSICON" "OFF" "_.vpoint" "_non" "*0,1,0" "_.vpoint" "r" "45" "0" ))