• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

Mimic 'select' in custom tool

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 2 Posters 129 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    kwalkerman
    last edited by 21 Dec 2011, 18:30

    Hi,

    I am writing a script where I want the user to be able to select some entities, have code do something with those entities, then ask the user to select some more entities, have the user do something with those entities, and so-on.

    The best way to do this is by using a tool - have the user use the tool to select items, press a command to execute the ruby script, the tool will re-set itself and the user can select more items. However, I'm not sure how to have the user select within a custom tool.

    Thanks,

    --
    Karen

    1 Reply Last reply Reply Quote 0
    • K Offline
      kwalkerman
      last edited by 21 Dec 2011, 18:31

      Duh, brain fart - use onMButtonDown to detect user's selection of objects...

      1 Reply Last reply Reply Quote 0
      • D Offline
        Dan Rathbun
        last edited by 22 Dec 2011, 10:28

        An easier way is to make menu macros for the context menus (the right-click popup and the Edit menu's selection submenu.)

        FYI: I posted a boilerplate sample

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement