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

    Pause/ Hold script for extra user input

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 748 Views 3 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.
    • M Offline
      MattC
      last edited by

      Hello,
      Is it possible to hold script until user performs specific action ?

      I have a situation like this:

      • 2 groups that consist from one face each,
      • script is activated, user clicks first group and then second group,
      • script checks for intersection between those two, sometimes intersection is not found, then useg gets MB if he wants to pick two points that will define an intersection line(p1, p2).

      Problem: After user clicks YES, script continues and then crashes because points p1 and p2 were not clicked.

      I apprecciate any sugestions
      Matt

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        After the messagebox, activate a Tool that asks the user to pick to points.

        When you say crash, does SketchUp bugsplat? Or did you mean an error was thrown in the Ruby Console?

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • M Offline
          MattC
          last edited by

          I was not precise, After messagebox there is a call for function that uses two groups and two points as an arguments. And it returns error in ruby console.
          Thanks for a tip. I was thinking about something like that.
          But then another questions arise:
          Lets say that my basic tool is Slot, and tool that will be used for picking points up will be Pointpicker. Lets say that point1 and point2 can be stored in an array : [p1,p2]
          Q1 - what should be the callout? [p1,p2]=Sketchup.active_model.select_tool Pointpicker.new
          Q2 - when the Pointpicker tool will be called from within Slot tool, will Slot tool be deactivated ? And after 2 points will be picked with the Pointpicker tool, how will it know that it should go to the Slot tool to specific line ?

          Thanks in advance.
          Matt

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            Read the linetool.rb example in the "Plugins/Examples" directory.

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • M Offline
              MattC
              last edited by

              Ok, solved it in another way.
              Thanks anyway.
              Matt

              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