I'm sending a LISP to test that writes only one line and a number, u could make this line stay linked to this text so that if I change the xdata of that line text update?
(defun c:ll (/)
(regapp "Perfil")
(vl-load-com)
(setq pt1 '(100.0 100.0 0.0)
pt2 '(300.0 100.0 0.0))
(command "line" pt1 pt2 "")
(setq ultimo (entlast)
elist (entget ultimo))
(ACET-SS-ZOOM-EXTENTS (ACET-list-TO-SS (list ultimo)))
(setq xdata (list (list -3 (list "Perfil" (cons 1000 "20")))))
(setq lstf (append elist xdata))
(entmod lstf)
(entupd ultimo)
;text
(command "TEXT" "j" "bl" pt1 "0" (cdr (car (cdr (cadr (assoc -3 (entget ultimo '("*"))))))))
(princ)
)
Solved! Go to Solution.
Solved by augusto.goncalves. Go to Solution.
Set command text..
(defun c:ll (/)
(regapp "Perfil")
(vl-load-com)
(setq pt1 '(100.0 100.0 0.0)
pt2 '(300.0 100.0 0.0))
(command "line" pt1 pt2 "")
(setq ultimo (entlast)
elist (entget ultimo))
(ACET-SS-ZOOM-EXTENTS (ACET-list-TO-SS (list ultimo)))
(setq xdata (list (list -3 (list "Perfil" (cons 1000 "20")))))
(setq lstf (append elist xdata))
(entmod lstf)
(entupd ultimo)
;texto
(command "TEXT" "j" "bl" pt1 "35" "0" (cdr (car (cdr (cadr (assoc -3 (entget ultimo '("*"))))))))
(princ)
)
Felipe,
Sorry for this delay...
Please note that, if you setup a reactor, it will only work if the LISP code is loaded. Also, you'll need to implement the action to move both objects together.
Here is the main Reactor documentation: http://docs.autodesk.com/ACD/2013/ENU/files/GUID-B83B512E-CEF6-43C5-9099-398999E254AF.htm And this is a more specific help: http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-310D685C-142E-4DA1-BDA1-B6E9AC5E98E8
Finally this guy made a good example: http://www.cadtutor.net/forum/showthread.php?45104-Help-me-Example-Reactor-Visual-lisp
Hope this helps!