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

    Webdialogs for SketchUp ......RIP!

    Scheduled Pinned Locked Moved Developers' Forum
    55 Posts 15 Posters 3.2k Views 15 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.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      I doubt that more than one scripting interface can be used at a time.

      It would cause twice the slowdown.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • danielbowringD Offline
        danielbowring
        last edited by

        @dan rathbun said:

        %(#BF4000)[If you trash Ruby.. I TRASH YOU ! 😠]

        I can appreciate that for 1.9.x or 2.x, but for 1.8.6?

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

          @tomot said:

          IThere is a new framework called Visual Programming & Scripting.

          Link to this framework?

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

          1 Reply Last reply Reply Quote 0
          • jolranJ Offline
            jolran
            last edited by

            I thought Visual Programming was more of a concept. Like "flow-based programming" and it's likes.

            I don't think neither Grasshopper nor Dynamo where created in Python ?

            Don't know diddly about Python but here is a link:

            http://www.pyfproject.org

            I'm working on a node-flow based "thingy". And I think it's quite doable in Sketchups enviroment. Nothing fancy as Grasshopper, but maybe some modest usable plugin.

            1 Reply Last reply Reply Quote 0
            • D Offline
              driven
              last edited by

              I think WebDialogs are far from dead, and that you have more chance of achieving the functionality of grasshopper [ ironPython when I tried it ] with a Ruby/Js combination.

              with projects like http://jsmaker.com/jsmaker/ javascript is becoming the language of choice for cutting edge development, and it works well with ruby.
              john

              learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                Yeah, I'm not finding any references of such a python framework - let alone just a framework in any language.

                And considering the advances of HTML5 and CSS3 - not only on the web but in apps on both mobile and win8 I don't see WebDialogs as a dead end. However, WebDialogs needs a cleanup and ship with a custom webcontrol independent from the OS and consistent across platforms.

                This whole thing after to rather be a UI concept, which would be limited to language.

                Sent from my LT25i using Tapatalk 2

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

                1 Reply Last reply Reply Quote 0
                • danielbowringD Offline
                  danielbowring
                  last edited by

                  @thomthom said:

                  Yeah, I'm not finding any references of such a python framework - let alone just a framework in any language.

                  And considering the advances of HTML5 and CSS3 - not only on the web but in apps on both mobile and win8 I don't see WebDialogs as a dead end. However, WebDialogs needs a cleanup and ship with a custom webcontrol independent from the OS and consistent across platforms.

                  This whole thing after to rather be a UI concept, which would be limited to language.

                  I think having the ruby<->js interactions done through XMLHTTPRequests would be great too, because then we know for certain it's asynchronous can can use existing frameworks to aid the communication.

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

                    hmm... I can see times where async can be useful, but more often I want synchronous communication.

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

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Aerilius
                      last edited by

                      Sometimes I want a method to wait until a webdialog is closed to give a return value. But all tries so far have frozen SketchUp and then also the webdialog. (Example usage: unit tests or API methods that don't work with async Proc callbacks)

                      WebDialogs are more cross-platform and scale better than SketchUp's own antique UI. Text fits on buttons. Following best practices makes them easily work with any dpi.

                      1 Reply Last reply Reply Quote 0
                      • AdamBA Offline
                        AdamB
                        last edited by

                        @aerilius said:

                        Sometimes I want a method to wait until a webdialog is closed to give a return value. But all tries so far have frozen SketchUp and then also the webdialog. (Example usage: unit tests or API methods that don't work with async Proc callbacks)

                        Can you not just set a semaphore in the closure?

                        Developer of LightUp Click for website

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          Aerilius
                          last edited by

                          Do you have an example code snippet? When I search for a ruby semaphore, I find threads etc.

                          1 Reply Last reply Reply Quote 0
                          • AdamBA Offline
                            AdamB
                            last edited by

                            actually, I don't think you even need atomic structures like semaphores.

                            All I'm saying is that in your *on_close()*or add_action_callback() methods, just set a flag.

                            So your (pseudo-) code is:

                            dlg.show
                            <wait until your flag has been set by the dialog callbacks>
                            ...

                            Developer of LightUp Click for website

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              Aerilius
                              last edited by

                              I will experiment again, but as far as I remember the single thread of SketchUp's Ruby freezes so that either the flag can not be set (because it is busy waiting) or whatever I do to wait never gets time to notice the changed flag.

                              1 Reply Last reply Reply Quote 0
                              • danielbowringD Offline
                                danielbowring
                                last edited by

                                @thomthom said:

                                hmm... I can see times where async can be useful, but more often I want synchronous communication.

                                How often does it actually need to be synchronous though? That is, the code must be executed before the next line. Also, how often can that not be turned into a async form (callbacks, promises, ...)?

                                My main point is that predictability and expectations are important in API design. Also, the current implementation (window.location = ...) can have side effects - for example it will block/cancel any current requests, such as redirects or xhrs.

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

                                  @unknownuser said:

                                  Also, the current implementation (window.location = ...) can have side effects - for example it will block/cancel any current requests, such as redirects or xhrs.

                                  Oh - haven't noticed that yet! ...that should be in the Lost Manual... that's important stuff.

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

                                  1 Reply Last reply Reply Quote 0
                                  • I Offline
                                    ilay7k
                                    last edited by

                                    I vote for python. I work with it in cinema4d; ironpython - revit, robur(road software). And small [highlight=#ff4040:1yirh56j]c[/highlight:1yirh56j][highlight=#4000ff:1yirh56j]ythoning[/highlight:1yirh56j] πŸ€“

                                    and it has 64bit framework or anyCPU type...if current sku team can not port ruby to x64.

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      tomot
                                      last edited by

                                      I forgive Dan, he was probably off his meds again, although you can always count on him to give you his undivided attention when one is looking for a problem that needs solving. πŸ˜„ I'm not talking about dumping Ruby.

                                      You can see the Visual Programming, in the attached pic, the underlying Scripting is what makes the 3d surface appear, but its not something the user has to concern him or herself about. If you want to experiment you can replace a DIV module with a MULTI module and see the 3d result instantly, or replace TAN with a COS module, etc. etc.

                                      In addition, Download a free copy of Houdini from http://www.sidefx.com/index.php
                                      and you will see the same principles as grasshopper. Houdini calls it Procedural modeling, as opposed to Visual programming. The process is the same.

                                      other examples of what grasshopper can do generating experimental Architecture. http://formularch.blogspot.ca/


                                      grass.jpg

                                      [my plugins](http://thingsvirtual.blogspot.ca/)
                                      tomot

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

                                        Well, yea. Procedural modelling is a mighty interesting topic. However, there is nothing preventing that being done with the current Ruby API and WebDialog we already have.

                                        Procedural modelling can be implemented in whatever underlying scripting or programming language is available.

                                        I'm all for procedural modelling and I'm mighty interested in whatever project jolran is plotting.

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

                                        1 Reply Last reply Reply Quote 0
                                        • jolranJ Offline
                                          jolran
                                          last edited by

                                          Yet another Grasshopper framegrab...

                                          One thing not discussed here regarding visual-flow-mombo-jumbo-programming is the complexity behind evaluating the chain of hierarchy, and when or what to update as soon as something changes in the gui.

                                          I'm not sure Python would have any advantages over Ruby solving that computation..

                                          But I guess that discussion is OT.

                                          The GUI part is all very possible with webdialogs. In fact it's already happening πŸ˜‰

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

                                            @jolran said:

                                            In fact it's already happening πŸ˜‰

                                            πŸŽ‰

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

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

                                            Advertisement