Memory issue running Lisp file AutoCAD 2019

Memory issue running Lisp file AutoCAD 2019

jcabinnga
Contributor Contributor
869 Views
7 Replies
Message 1 of 8

Memory issue running Lisp file AutoCAD 2019

jcabinnga
Contributor
Contributor

Hello,

I've been running a Lisp routine that creates drawings from reading a *.txt file. Inserts a drawing template/executes several commands then w/block to a file/next record repeat. AutoCAD crashes after about 700 drawings made +/- (the *.txt file has about 4300+ records -1 per drawing).

Anyway, I think it is a memory problem? Maybe with my laptop or is there a setting in AutoCAD?

I have Dell Precision 3530 Laptop/Windows 10 Pro 64-bit/32GB RAM. AutoCAD 2019 64bit.

Any help would be appreciated. I'm not sure how to go about changing memory settings on the Laptop or AutoCAD.

Thank you,

Jack

 

0 Likes
Accepted solutions (1)
870 Views
7 Replies
Replies (7)
Message 2 of 8

ennujozlagam
Mentor
Mentor

https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Error-...

 

https://forums.autodesk.com/t5/autocad-forum/memory-leak-in-autocad-2019/td-p/8272009





Remember : without the difficult times in your LIFE, you wouldn't be who you are today. Be grateful for the good and the bad. ANGER doesn't solve anything. It builds nothing, but it can destroy everything...
Please mark this response as "Accept as Solution" if it answers your question. Kudos gladly accepted.
0 Likes
Message 3 of 8

jcabinnga
Contributor
Contributor

All of the Links you sent concern 32 bit AutoCAD. I have 2019 64 bit AutoCAD.

Thanks.

0 Likes
Message 4 of 8

pendean
Community Legend
Community Legend
1) What LISP? How does it handle file closing after the WBLOCK?
2) How are you running it on 700+ drawings?
3) How often do you need to do this on 700+ drawings?
4) Share with us a screenshot of your ABOUT command pop-up please from the laptop.


0 Likes
Message 5 of 8

jcabinnga
Contributor
Contributor

1) (part of lisp)...

;;begin reading file - get first line
(setq cur_rec (read-line fn)) ; reads entire record
(setq cur_pos 1 ctr 0) ; initialize pointer and record counter


(while (/= cur_rec "")

(get_field)
(setq field1 field_value)
(get_field)
(setq field2 field_value)

--------------------------------- (then execute several AutoCAD commands)

;;WBLOCK TO FINAL DRAWING FNAME
(command "wblock" field3 "" "0,0" "all" "")
(COMMAND "UNDO" "BACK" "y")

;(princ "/nFinished Record No /n" (+ ctr 1))

(setq cur_rec (read-line fn)) ; reads entire record
(setq cur_pos 1) ; initialize pointer


) ;end while--end of file

--------------------------------------------

2) I execute the lisp on a "Blank" drawing file. It then reads a "record" of the txt file, inserts a template drawing, executes AutoCAD commands, & then Wblocks all to a file per record, then next record - repeat for 4300 records. AutoCAD crashes at about 700 records.

3) not very often 700+ drawings.

4)

jcabinnga_0-1649086725755.png

 

0 Likes
Message 6 of 8

pendean
Community Legend
Community Legend

@jcabinnga Thanks for the screenshot: you are missing all the updates for your 2019 version, the software is currently at the 2019.1.4 level. Get that latest update from your Autodesk Account Page here https://manage.autodesk.com/cep/#products-services/updates

 

IMPORTANT: Restart your PC afterwards.

 

HTH

0 Likes
Message 7 of 8

dgorsman
Consultant
Consultant
Accepted solution

@jcabinnga wrote:

All of the Links you sent concern 32 bit AutoCAD. I have 2019 64 bit AutoCAD.

Thanks.


64 bit or 32 bit, there's still the same problem.  AutoCAD (like most programs) isn't built to handle large numbers of sequential drawings without running into memory problems.  You'll need to batch process them in blocks, typically 50-100, with additional batch processing to set up subsequent (or even simultaneous) sessions to avoid problems like this.  It's not unusual to set up the command console to process a single drawing per session, with multiple sessions running simultaneously up to the effective core count of the processor.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 8 of 8

kpblc2000
Advisor
Advisor

Main question is "show your code" 🙂 I've read and created 10000+ dwg-files throuth one AutoCAD session and there was no troubles. Actually I used ObjectDBX mechanism...

Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям! | Do you find the posts helpful? "LIKE" these posts!
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.


Алексей Кулик aka kpblc | Aleksei Kulik aka kpblc Facebook | LinkedIn
autolisp.ru
Техническая поддержка программистов Autodesk в СНГ
Библиотека пользовательских lisp-функций | Custom Lisp-function library

0 Likes