Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/21/2026 in all areas

  1. What year AutoCAD LT, I believe only LT 2024 and newer can use LISP?
    1 point
  2. Quick update on this issue: It turned out to be related to a recent Windows security update affecting graphics applications. I reached out to BricsCAD support and got confirmation that update KB5074109 was causing issues, and a newer cumulative update (KB5078127) includes fixes for it. Reply from BricsCAD:- Hi Aniruddha, We found that there has been a Windows Security Update - KB5074109 - which affects graphic applications. The new update KB5078127 is cumulative and includes security fixes and improvements from the January 13, 2026, security update (KB5074109) and the out-of-band update (KB5077744) from January 17, 2026. See more info here: https://support.microsoft.com/en-us/topic/january-24-2026-kb5078127-os-builds-26200-7628-and-26100-7628-out-of-band-cf5777f6-bb4e-4adb-b9cd-2b64df577491 Please check if you have that update on your computer. Kind regards, Cosmina. After checking and updating the system accordingly, the issue seems to be resolved and BricsCAD is no longer freezing on startup. Sharing this here in case anyone else runs into a similar problem. Thanks everyone for the suggestions and help.
    1 point
  3. Thanks Tharwat for the comment. Maybe this is better, you can erase some texts . If adding, just do the TSUM again with all the element texts. (vl-load-com) (defun getsum (b) (rtos (apply '+ (mapcar '(lambda(x) (if (vlax-erased-p x) 0 (atof (vla-get-TextString x)))) b)) 2 0) ) (defun modifyObj (notifier-object obj_reactor parameter-list / ) (vla-put-TextString (car (vlr-data obj_reactor)) (getsum (vlr-owners obj_reactor))) ) (defun eraseObj (notifier-object obj_reactor parameter-list / ) (vlr-owner-remove obj_reactor notifier-object) ) (defun c:TSum (/ ss rst lst data lreac reac) (prompt "\nChoose element texts:") (setq ss (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget '((0 . "*TEXT")))))) rst (vlax-ename->vla-object (car (entsel "\nChoose result text:"))) lst (mapcar 'vlax-ename->vla-object ss)) (if (assoc rst (setq data (mapcar 'vlr-data (setq lreac (cdar (vlr-reactors :vlr-object-reactor)))))) (foreach item lst (if (not (member item (vlr-owners (setq reac (nth (vl-position (list rst) data) lreac))))) (vlr-owner-add reac item))) (setq obj_reactor (vlr-pers (vlr-object-reactor lst (list rst) '((:vlr-objectClosed . modifyObj) (:vlr-erased . eraseObj))))) ) (vla-put-TextString rst (getsum lst)) (princ) )
    1 point
  4. Another way is using reactors, just like this: (vl-load-com) (defun getsum (b) (rtos (apply '+ (mapcar '(lambda(x) (atof (vla-get-TextString x))) b)) 2 0) ) (defun modifyObj (notifier-object obj_reactor parameter-list / tm ) (if (/= (setq tm (getsum (vlr-owners obj_reactor))) (vla-get-TextString (car (vlr-data obj_reactor)))) (vla-put-TextString (car (vlr-data obj_reactor)) tm)) ) (defun c:TSum (/ ss rst lst) (prompt "\nChoose element texts:") (setq ss (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget '((0 . "*TEXT")))))) rst (vlax-ename->vla-object (car (entsel "\nChoose result text:"))) lst (mapcar 'vlax-ename->vla-object ss)) (vla-put-TextString rst (getsum lst)) (setq obj_reactor (vlr-pers (vlr-object-reactor lst (list rst) '((:vlr-objectClosed . modifyObj))))) (princ) ) You set the connections only once between texts and result text with command TSUM. When you modify the element texts, the result text also change. Save you drawing before closing to save reactors. Next time opening it, the connection still exists. But you have to load this lisp again to let acad knows the function. The routine still doesn't have stuff about adding or deleting element texts yet.
    1 point
×
×
  • Create New...