From within the primitive command, is there any way to get whether the user right-clicked? I'm asking this because I need a way to allow the user to revert if they select the wrong area.
Currently, I modified your code so that if it's the first click, it highlights. If it's the 2nd click, it adds the sum and then removes the highlighting to let them add another area. This gives them an 'accept' method before just adding the area to the sum.
What I'd like to do is offer the ability to revert by having that 2nd click I've introduced be a right click so that if they select the wrong area to sum, they can right click instead of committing the area to the summation. Any way in a primitive command to do this?
If a right-click is the hang-up, I also thought about tracking whether the user clicked the trasientelementcontainer or not. If they did (on the 2nd click), we accept the area and add to the sum. If they accidentally chose the wrong area, they'd just click outside of it to deselect it. The trouble here is I can't seem to find a function to tell whether, based on the data point, the user clicked the transientelementcontainer that we made.
Either solution will be fine..right click or just clicking off the transientelementcontainer. The end result is I need a way to let them decide not to include an area in the event they accidentally choose the wrong one or the flood isn't as expected (in the case of there being an unexpected gap between the boundaries).