Hi all,
I don't understand why my prompt history give me always this error after some Lisp script execution, please?
I use my IntelliCAD v10.0.1572.123806.PE.VC15.x64.CMS100a in US ui .
And my lisp folder in root C:Lisp/
Re: Error: application is locked and cannot be unloaded.
#2Hi,
Please refer to this, hope this helps you.
Regards.
viewtopic.php?p=7032&hilit=application+ ... 3f21#p7032
Please refer to this, hope this helps you.
Regards.
viewtopic.php?p=7032&hilit=application+ ... 3f21#p7032
Re: Error: application is locked and cannot be unloaded.
#3QuanNguyen wrote: ↑Tue Dec 20, 2022 9:18 amPlease refer to this, hope this helps you.
viewtopic.php?p=7032&hilit=application+ ... 3f21#p7032
Code: Select all
(vl-load-com)Code: Select all
(defun c:areacal (/ area dxf_ent ent js n nb ptlst pt_ins)
(if (setq js
(ssget '(
(0 . "LWPOLYLINE")
(-4 . "<AND")
(-4 . "&")
(70 . 1)
(-4 . ">")
(90 . 2)
(-4 . "<")
(90 . 5)
(-4 . "AND>")
)
)
)
(progn
(repeat (setq nb (sslength js))
(setq
ent (ssname js (setq nb (1- nb)))
dxf_ent (entget ent)
ptlst (mapcar 'cdr
(vl-remove-if-not
'(lambda (x) (= (car x) 10))
dxf_ent
)
)
n (length ptlst)
pt_ins (list (/ (apply '+ (mapcar 'car ptlst)) n)
(/ (apply '+ (mapcar 'cadr ptlst)) n)
)
area (vla-get-Area (vlax-ename->vla-Object ent))
)
(entmake
(list
'(0 . "TEXT")
(cons 10 pt_ins)
(cons 40 (getvar "TEXTSIZE"))
(cons 1 (strcat "Area= " (rtos area)))
(cons 72 4)
(cons 11 pt_ins)
)
)
)
)
)
(princ "End AREA calculation!")
)Re: Error: application is locked and cannot be unloaded.
#4I try it at the end but nothing change, always this error!
EDIT: Haaaaa YES QuanNguyen at the start!
Ok now the result is write in the middle of the selection! Ok.
I didn't know that! Thks a lot
EDIT: Haaaaa YES QuanNguyen at the start!
Ok now the result is write in the middle of the selection! Ok.
I didn't know that! Thks a lot
Last edited by SPirou4D on Tue Dec 20, 2022 12:54 pm, edited 1 time in total.
Re: Error: application is locked and cannot be unloaded.
#5It works on IntelliCAD v10.1
Sorry, I don't have the 10.0 version now.
Sorry, I don't have the 10.0 version now.
Re: Error: application is locked and cannot be unloaded.
#6No problem, I understood... I add it at the start of the code. That"s work great!
Thks a lot dear QuanNguyen!
Thks a lot dear QuanNguyen!