Another very nice routine that demonstrates reactors comes from Leonid Nemirovsky. Link Area Text to Boundary (Tip #1985) lets you define a polyline and then select it as an area region. The area value displays as text at the location of your choosing, then the magic begins. As you change the endpoints of the polyline that defines the area boundary, the text for the area regenerates. This is a classic example of how one entity can cause another entity to change under program control. This tip runs only inside AutoCAD 2005 or higher because of Leonid's coding with the Field elements. Look at this code to learn how you can link objects together using Visual LISP reactors. |