Grips, grip-stretch and reactors...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have reactors that update mtext based on the size of a rectangle after it's been modified via grip_stretch. Everything is working well so far. Now, I'm trying to refine it so the user can't change the rectangle by stretching corners, because the rectangle must remain a rectangle.
I have been successful in identifying a corner grip stretch in my "vlr-CommandWillstart" reactor callback. However, I have not been successful in cancelling the stretch. I'm thinking that it's becasue the stretch has not actually *started* yet, so there is nothing to cancel?
I've tried something like this (from other forums - hat tip to Lee Mac), but it didn't work:
(vl-catch-all-apply 'vlax-invoke (list (vlax-create-object "WScript.Shell")'sendkeys "{ESC}"))
Here are my options in order of preference:
1) When rectangle is selected, only show midpoint grips (or disable corner grips). This would be the cleanest way to do it (only present the user with "permitted" actions), but I don't know if this is possible or not.
2) If "1" is not possible, if corner grip is being stretched, cancel the grip-stretch.
3) Last resort, undo the corner grip-stretch (I already know how to do this).
Thanks in advance for any help in getting me pointed in the right direction!!