sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Prompting user to select objects while running script

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 266 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.
    • Y Offline
      yiannicivil
      last edited by

      I am trying to make a plugin in which I need selection inputs from the user.
      Atually I need to be able as a user to select one group in sketchup (via mouse clicking), name it somewhat in ruby,
      then select another group (via mouse clicking again) and give it another name in ruby, so I can go on with calculations, manipulating geometry etc.
      How is this possible? I really tried to find out on my own but I didnt come up with a solution in the resourses that I have by far.
      I see plugins that when they run, they prompt the user to select stuff, even show graphic previews of the result, etc.
      I cant realize how this can be coded...
      Any help - explanations - resources - tutorials - references would be great!

      1 Reply Last reply Reply Quote 0
      • tt_suT Offline
        tt_su
        last edited by

        Sounds like you need to implement a custom Tool: http://www.sketchup.com/intl/en/developer/docs/ourdoc/tool

        You can make the tool select entities the user clicks on by using the PickHelper class.

        Both these classes has examples in the documentation that will get you started.

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

        Advertisement