PDA

View Full Version : Learning how to use Reactors in LISP, where to start



rajat_bapi_mallick
2007-05-24, 06:15 PM
Hi !

Is there any web site or ATP Cources that I can learn about reactor ??

-Rajat

.T.
2007-05-24, 06:46 PM
Hi !

Is there any web site or ATP Cources that I can learn about reactor ??

-Rajat

Hi Rajat,

One place to start would be HERE (http://forums.augi.com/showthread.php?t=42122). About half way down Kennet has an example that will probably help you understand them a bit more.

Adesu
2007-05-25, 03:05 AM
Hi rajat,
here a simple code for reactor as tutorial


; rtc is stand for Reactor Two Circle
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 09 October 2006
; Program no.: 0450/10/2006
; Edit by : Bruno Toniutti 13/10/2006 1).
(defun c:rtc (/ c1 c2 objlst obj_reactor p1 p2 rad vgad vgao vgms)
(vl-load-com)
(setq vgao (vlax-get-acad-object))
(setq vgad (vla-get-activedocument vgao))
(setq vgms (vla-get-modelspace vgad))
(setq p1 '(0 0 0))
(setq p2 '(5 5 0))
(setq rad 0.5)
(setq c1 (vla-addCircle vgms (vlax-3d-point p1) rad))
(vla-put-color c1 acred)
(setq c2 (vla-addCircle vgms (vlax-3d-point p2) rad))
(vla-put-color c2 acblue)
(setq objlst (list c1 c2))
(setq obj_reactor (vlr-object-reactor
objlst
nil
'((:vlr-modified . callback))))
)

(defun callback (notifier-object obj_reactor parameter-list
/ objlist newrad) ; 1).
(setq objlist (vlr-owners obj_reactor))
(setq newrad (vla-get-radius notifier-object))
(if
(= notifier-object (nth 0 objlist))
(vla-put-radius (nth 1 objlist) newrad)
(vla-put-radius (nth 0 objlist) newrad)
)
)





Hi !

Is there any web site or ATP Cources that I can learn about reactor ??

-Rajat