Hi,
I have created many lisp files and I'm auto loading (for demand loading) it through acad.lsp on start up.
I'm using a different profile, custom CUI (buttons for the my custom lisp commands) and Toolpalettes.
The issue is, AutoCAD is creating huge undo files (100+ GB for a single file in some cases.) in temp folder while I'm working on large drawings(50MB to 300+MB), even if I'm not using any of my LISP commands. Which fills up the C drive up to the point of not enough memory error.
Is this normal or have I messed something up in my code/profile/CUI?
Since this happens even if I'm not using any of my lisp commands, how can I get to the root of the problem?
Any help would be greatly appreciated!
Thanks in advance.
The Undo record has nothing to do with AutoLisp usage per se, but keeps track of all the things you do, ordinary commands included as well as AutoLisp routines, macros, scripts, etc. If those are bloating the Undo history within a given editing session [it's all forgotten when you close the drawing anyway], the Control option in the UNDO command lets you clear out all of that. When you're at a place where you're confident you won't need to back up, you can use my DUH command to Dump the Undo History, or just do the same procedure manually. It just turns off the keeping of any Undo history, which gets rid of its record of that, and then turns it back on:
;; DumpUndoHistory.lsp
(defun C:DUH ()
(setvar 'cmdecho 0)
(command "_.undo" "_control" "_none" "_.undo" "")
(setvar 'cmdecho 1)
(prompt "\nDumped Undo History.")
(princ)
)
Hi @Kent1Cooper ,
Thank you for the clarification and the code.
It seems to happen only when there is a heavy block involved. (heavy in the sense it has multiple arrays and meshes in those arrays. Does the undo history also store the entities deleted or created through these arrays in these blocks? I don't see how the block would affect the undo file but the issue does occur when that block is being used.
Can't find what you're looking for? Ask the community or share your knowledge.