sketchucation logo sketchucation
    • 登入
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    Webdialogs for SketchUp ......RIP!

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    55 貼文 15 Posters 4.1k 瀏覽 15 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • T 離線
      tomot
      最後由 編輯

      If Web dialogs & Ruby are not they dead yet, they really should be soon. The only reason they may not be dead yet is too many people have invested too much time in this approach, and hence don't want to change, or lose their jobs. There is a new framework called Visual Programming & Scripting. All of them are Python based. Many 3D programs use Python scripting, furthermore Visual Programming & Scripting is making it easier to engage the casual user of 3D to make his or her own visual scripts, without much investment in learning programming.

      Current examples of programs that use Visual Programming & Scripting:

      1. Vasari & Dynamo for AutoDesk Revit: http://wikihelp.autodesk.com/Vasari/enu/Community/Tutorials/Vasari_Talk_-_Design_and_Analysis_Webinars/Session_20%3a__Augmented_Parametric_Design_with_Dynamo

      2. Grasshopper for Rhinoceros: http://www.grasshopper3d.com/

      I realize most users don't like change, unless it offered by politicians, 😄 But I would suggest a new Python API be developed. I'm not sure if both a Python API and the Ruby API could get along together. If they can't, offer 2 versions of SketchUp one with either API. It wont take long before users will prefer to change to the new Python API. Particularly when they start seeing the advantages over the old Ruby API methods.

      I hope Trimble has the courage to take a look this proposal.

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

      1 條回覆 最後回覆 回覆 引用 0
      • renderizaR 離線
        renderiza
        最後由 編輯

        Hi,

        Saw one of the videos you posted and was really impressed. The ideal situation is for both Webdialog and Visual Programming & Scripting be available for us to use. 👍

        Cheers!

        [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

        1 條回覆 最後回覆 回覆 引用 0
        • Dan RathbunD 離線
          Dan Rathbun
          最後由 編輯

          This suggestion is not new.

          YEARS AGO some people asked to use a Python API instead of Ruby.

          YEARS AGO some other people asked to use a Java API instead of anything else.

          Both of these camps used the same arguments.

          So it really just comes down to preference. People who know and love a certain scripting language do not want to use any other.

          Most of the people making these demands have gone away because they hate Ruby so much.

          Oh Well... no tears for them. There are plenty of other software packages that use their preferred scripting language.

          I LOVE RUBY and want SketchUp to continue to use Ruby

          Anyone who hates Ruby.. can just go and use some other software.

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

          I'm not here much anymore.

          1 條回覆 最後回覆 回覆 引用 0
          • renderizaR 離線
            renderiza
            最後由 編輯

            @dan rathbun said:

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

            That made my day! 🤣

            Didn't realized that Ruby had to be eliminated for Visual Programming & Scripting to work. 😒

            If maybe there was a way to make SketchUp compatible with both then maybe Dan Rathbun will approve. 💚

            [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

            1 條回覆 最後回覆 回覆 引用 0
            • Dan RathbunD 離線
              Dan Rathbun
              最後由 編輯

              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 條回覆 最後回覆 回覆 引用 0
              • danielbowringD 離線
                danielbowring
                最後由 編輯

                @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 條回覆 最後回覆 回覆 引用 0
                • thomthomT 離線
                  thomthom
                  最後由 編輯

                  @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 條回覆 最後回覆 回覆 引用 0
                  • jolranJ 離線
                    jolran
                    最後由 編輯

                    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 條回覆 最後回覆 回覆 引用 0
                    • D 離線
                      driven
                      最後由 編輯

                      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 條回覆 最後回覆 回覆 引用 0
                      • thomthomT 離線
                        thomthom
                        最後由 編輯

                        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 條回覆 最後回覆 回覆 引用 0
                        • danielbowringD 離線
                          danielbowring
                          最後由 編輯

                          @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 條回覆 最後回覆 回覆 引用 0
                          • thomthomT 離線
                            thomthom
                            最後由 編輯

                            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 條回覆 最後回覆 回覆 引用 0
                            • A 離線
                              Aerilius
                              最後由 編輯

                              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 條回覆 最後回覆 回覆 引用 0
                              • AdamBA 離線
                                AdamB
                                最後由 編輯

                                @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 條回覆 最後回覆 回覆 引用 0
                                • A 離線
                                  Aerilius
                                  最後由 編輯

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

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • AdamBA 離線
                                    AdamB
                                    最後由 編輯

                                    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 條回覆 最後回覆 回覆 引用 0
                                    • A 離線
                                      Aerilius
                                      最後由 編輯

                                      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 條回覆 最後回覆 回覆 引用 0
                                      • danielbowringD 離線
                                        danielbowring
                                        最後由 編輯

                                        @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 條回覆 最後回覆 回覆 引用 0
                                        • thomthomT 離線
                                          thomthom
                                          最後由 編輯

                                          @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 條回覆 最後回覆 回覆 引用 0
                                          • I 離線
                                            ilay7k
                                            最後由 編輯

                                            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 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement