- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm very new to autoCAD and especially to LISP. I'm creating some drawings where I use a lot of different lineweights and I find it annoying that I have to set 'LWDISPLAY' on everytime I open a new drawing. That's why I wanted to create a LISP routine that automatically sets the 'LWDISPLAY' on.
I used chatGPT to create it and this is what I got:
(defun c:SetLwDisplayOn ()
(setq old-lw (getvar "LWDISPLAY")) ; Get the current value of LWDISPLAY
(setvar "LWDISPLAY" 1) ; Set LWDISPLAY to ON
(princ "\nLWDISPLAY is now ON.") ; Print confirmation message
(princ) ; End quietly
)
Then I added this file to the startup suite with 'APPLOAD' but it doesn't seem to work. 'LWDISPLAY' is always off when I open a new drawing.
So I tried another option where I call this routine with the acaddoc.lsp file. This is what I wrote in this file:
(load "C:\\Users\\MyName\\Documents\\AutoCAD\\2025\\startup_lwdisplay.lsp")
(SetLwDisplayOn) ; Run the function to set LWDISPLAY to ON
acaddoc.lsp is located in: C:\Program Files\Autodesk\AutoCAD 2025\Support
Then I added the acaddoc.lsp file to the startup suite but it still doesn't work.
Is there something I'm missing or is there another way to accomplish this?
Thank you in advance!
Solved! Go to Solution.