Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reactors

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
felipe.floro
238 Views, 2 Replies

Reactors

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)
)

2 REPLIES 2
Message 2 of 3
felipe.floro
in reply to: felipe.floro

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)
)

Message 3 of 3

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!

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost