sketchucation logo sketchucation
    • Login
    1. Home
    2. udpsocketlover
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    U
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Plugin infinite loop (intentional) causes Sketchup to hang

      Basically, I'll be receiving a string via TCP constantly, interpreting the string, and then drawing shapes based upon the string. I don't think that falls into any of those categories, am I out of luck?

      posted in Newbie Forum
      U
      udpsocketlover
    • Plugin infinite loop (intentional) causes Sketchup to hang

      Hey,

      So, I'm running the following code within a *.rb file":

      UI.menu("Plugins").add_item("Test"){
      	sleep 1
      	puts "Testing"
      	counter = 0
      	while true do
      		puts counter
      		counter = counter + 1
      		sleep 1
      	end
      }
      

      This is a simple script to just test the capabilities.

      What happens, is that SU becomes unresponsive while this is running (which makes sense), but I'm curious as to how people get plugins to run code constantly. My end project is a plugin which receives real-time data and acts upon it, so this small step is very important.
      Any help is appreciated and sorry if it seems like a silly question, thanks!

      posted in Newbie Forum sketchup
      U
      udpsocketlover
    • 1 / 1