Multi-Point Tool
-
I'm working on a new tool for the foundation plugin (http://design.medeek.com/resources/medeekfoundationplugin.html) that allows the user to select a single point for positioning a simple spread/pad footing.
Under regular usage the user will select the point and then the tool will draw the footing (rebar, post, pedestal etc...) This is fairly straight forward for me to code.
What I would like to do is make it possible to hold down the control key or some other key while selecting the point to position the footing, thereby the allowing the user to select multiple points. The footing component (assembly) instance will then be created at each location.
Is such a thing possible?
-
@medeek said:
What I would like to do is make it possible to hold down the control key or some other key while selecting the point to position the footing, thereby the allowing the user to select multiple points.
(As said also in the other forum...)
The convention for SketchUp is that the CTRL key acts as a toggle in and out of copy mode. (This is why the API defines the constants as
COPY_MODIFIER_KEY
andCOPY_MODIFIER_MASK
.Examine how the SelectionTool switches in and out of add or subtract mode, and the cursor changes to show + or - satellite icons. Or the MoveTool, ... etc.
Also see this other thread here at SCF:
http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=67837#p621579
You'll need to decide how to let the user tell the tool when they are done picking points.
Another convention is that the ESC key resets the tool to it's initial state, or cancels the current state. (See the
onCancel
callback.)The ENTER is another way, detected via a
onReturn
oronKeyUp
callback.
Advertisement