I'm trying to learn reactors. I'm pretty knowledgeable in Lisp and this is my first step into the frigid waters of Reactors...
I have an object reactor that updates MText based on changes to a rectangle. The rectangle represents the "coverage area" of steel decking on a building. If the user changes the "coverage area", the MText that is grouped with the rectangle updates to show the # of sheets of deck and the length of the deck. Area Width / Panel Width = # of pieces and Area Length = length of deck.
We furnish our deck cut to *length*, but not to width (we furnish xx pieces at, say, 24" wide and they cut the last piece to the required width at the jobsite). So, I want to restrict the user to "panel width" increments in the "area width" direction. Also, since I'm working with buildings, the direction of the deck length will often vary.
When initially laying out the coverage area, I do this with grid snap units/modes and by setting a user coordinate system oriented to the deck area being drawn.
I'd like to have a command reactor that is triggered by a Grip-Stretch so that my callback could essentially orient the UCS to the "coverage area" that is being modified so the coverage area would snap to panel-width increments.
I'm stumped on this issue (so far):
The command reactor passes 2 arguments to the callback, the reactor calling on the callback and the command name that is active. I have not figured out yet how to determine *which* coverage-area rectangle is being stretched so that I could determine the orientation of it.
Once I can identify the object being modified, then I can (hopefully) figure out how to simulate changing the UCS (since I can't call commands from a callback) - I'm thinking using sysvars to establish a polar snap angle/distance...
Any ideas or suggestions?? Thanks in advance!!!