Running a LISP routine in AutoCAD LT 2026 crashes program

Running a LISP routine in AutoCAD LT 2026 crashes program

msherwoodED9GV
Observer Observer
162 Views
5 Replies
Message 1 of 6

Running a LISP routine in AutoCAD LT 2026 crashes program

msherwoodED9GV
Observer
Observer

I'm trying to run a LISP routine that will open up a .dwg file and modify Layer Color, Layer Linetype, and Layer Lineweight to 'By Layer'.  I can get the routine loaded, am able to run it, and can point it to the file/folder I want to use it on.  It will then open up the first file and seemingly start to run the LISP commands to change these attributes.  It is at this point that the program crashes.  

I know that LT 2026 doesn't support full LISP like the full version does, so am wondering if there are some commands being called here that aren't supported.  If so, does anyone know of a way to accomplish this?  We have thousands of blocks in our block library, and I'm trying to find a way to batch process them so that we can standardize how our blocks plot by having consistent lineweights.

 

Thanks in advance for any help you may be able to provide.

0 Likes
163 Views
5 Replies
Replies (5)
Message 2 of 6

pendean
Community Legend
Community Legend

FYI @msherwoodED9GV  your lisp does not work in full AutoCAD2025-26 either in a quick test (no program crash though).

Has it ever worked for you? 

0 Likes
Message 3 of 6

msherwoodED9GV
Observer
Observer

I don't have access to full AutoCAD so haven't been able to ever fully test it out.  Does it do anything for you other than opening the first file in the folder you point it to?

0 Likes
Message 4 of 6

msherwoodED9GV
Observer
Observer

Update:  I downloaded BricsCAD as a trial version and am able to run the LISP routine with no issues.  It flawlessly executed the script and cleaned a huge number of files in one shot.  I've done more reading on the limitations of LISP in ACAD LT 2026 and a lot of the commands included in this LISP script are not supported in LT.  So I'll use Brics to get the work done since this is really just a one-and-done situation with our library that I'm trying to address.

0 Likes
Message 5 of 6

Sea-Haven
Mentor
Mentor

A 2 second look I would guess problem is here. trying to jump to other dwg's and continue a lisp is known to fail, as the lisp stops when you open another dwg.

    ;; Open drawing
    (setq doc (vla-open (vla-get-Documents acadApp) fullpath))
    (vla-Activate doc)

  If you want to continue to use LT then maybe look at writing a script, this should work with LT. You just have to write the actual script file then call it. Just edit your current code so it runs on current open dwg save and close can live in the lisp.

 

Open dwg1
(load "mycleanup")
open dwg2
(load "mycleanup")
open dwg3
(load "mycleanup")
and so on.

 

0 Likes
Message 6 of 6

msherwoodED9GV
Observer
Observer


Thanks for the feedback Sea-Haven.  I actually was able to get the lisp routine to run with no hiccups after I installed BricsCAD.  I've only tried it on a folder with about 30 .dwg files in it, but am about to run it against a backup copy of our full block library to see if it handles jumping from folder to folder.  If it doesn't then I may need to look at using a script, or perhaps use the MultiFileTool that I found elsewhere on this forum.

 

 

0 Likes