Multi-Point Tool

Multi-Point Tool

Postby medeek » Mon Jul 03, 2017 8:25 pm

I'm working on a new tool for the foundation plugin (http://design.medeek.com/resources/mede ... lugin.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?
0
Nathaniel P. Wilkerson PE
Medeek Engineering Inc
design.medeek.com
User avatar
medeek 
PluginStore Author
PluginStore Author
 

Re: Multi-Point Tool

Postby Dan Rathbun » Tue Jul 04, 2017 12:39 pm

medeek wrote: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 and COPY_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:
viewtopic.php?f=180&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 or onKeyUp callback.
0
    I'm not here much anymore. But a PM will fire email notifications.
    User avatar
    Dan Rathbun 
    PluginStore Author
    PluginStore Author
     

    SketchUcation One-Liner Adverts

    by Ad Machine » 5 minutes ago



    Ad Machine 
    Robot
     



     

    Return to Developers' Forum

    Who is online

    Users browsing this forum: No registered users and 4 guests

    Visit our sponsors: