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

    WxWindows for SketchUp Dialogs

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

      @unknownuser said:

      Then why are you 'going GAGA' over Modo?

      I'm not going "GAGA over ArchiCad nor Modo", I'm simply mentioning these programs have had more success in how to integrate addon language components into their main program. Its my hope that SU will improve, and perhaps someone on their staff will look at those examples. ....That's ALL!

      I'm quite sure anyone that has ever written a Ruby program, would love to see a standardized Ruby GUI interface, becoming part of the next major release of SU.

      my plugins
      tomot

      1 條回覆 最後回覆 回覆 引用 0
      • T 離線
        tomasz
        最後由 編輯

        @jim said:

        The controls example does work for me under XP. But it also does crash frequently.

        Jim, you probably have Ruby installed, have you? I don't have. Will see if it helps.

        I hope this solution will be developed, as I hate playing with HTML and JavaS (I have already tied and have some 'success'). I would love to use Wx without bugsplats.

        Tomasz

        Author of Thea Render for SketchUp

        1 條回覆 最後回覆 回覆 引用 0
        • P 離線
          peter3443
          最後由 編輯

          I've just posted version 0.2 of the wxSU plugin.

          You can download it here: http://wxsu.sourceforge.net/

          The new release fixes several bugs, updates to wxRuby 1.9.9, and has a few other improvements.

          1 條回覆 最後回覆 回覆 引用 0
          • J 離線
            Jim
            最後由 編輯

            Welcome to the forums Peter; thanks for the update.

            Hi

            1 條回覆 最後回覆 回覆 引用 0
            • I 離線
              ilay7k
              最後由 編輯

              Peter, thank you!

              1 條回覆 最後回覆 回覆 引用 0
              • T 離線
                tomasz
                最後由 編輯

                Peter, Thank you! Now it works! I hope I will soon make use of your gift.

                Tomasz

                Author of Thea Render for SketchUp

                1 條回覆 最後回覆 回覆 引用 0
                • P 離線
                  peter3443
                  最後由 編輯

                  Just reviving this thread briefly to let everyone know I've just posted version 0.3.0 of the wxSU plugin.

                  You can download it here: http://sourceforge.net/project/showfiles.php?group_id=240585&package_id=292646

                  Version 0.3.0 Release Notes

                  • Update of wxRuby engine and documentation to version 2.0.0.

                  • Bug fix to prevent the creation of multiple instances of the wxSU::App class. Multiple instances can cause crashes and conflicts.

                  • Bug fix for conflict with V-Ray plugin that prevented SketchUp from shutting down completely after exiting.

                  • Better error message and checking for the DLL libraries "msvcp71.dll" and "msvcr71.dll" required by wxRuby on Windows with SketchUp 7.

                  • Required DLL libraries ("gdiplus.dll", "msvcp71.dll", and "msvcr71.dll") are now installed automatically if missing.

                  1 條回覆 最後回覆 回覆 引用 0
                  • T 離線
                    tomasz
                    最後由 編輯

                    Thanks Peter for the update. I give it a try. Is this extension also free to use in commercial scripts?

                    Tomasz

                    Author of Thea Render for SketchUp

                    1 條回覆 最後回覆 回覆 引用 0
                    • P 離線
                      peter3443
                      最後由 編輯

                      @unknownuser said:

                      Is this extension also free to use in commercial scripts?

                      Yes, wxSU has always been distributed under the BSD License which allows you to package wxSU with either free/open source or commercial works. The wxSU part of the package must still include the source code (unencrypted) and the original copyright notices, but you can handle the rest of your package however you want. See the full license (License.txt) for more details.

                      1 條回覆 最後回覆 回覆 引用 0
                      • B 離線
                        BillW
                        最後由 編輯

                        I would just like to thank Peter for his work with WxSU. Personally, I would much rather use WxSU than Webdialogs, much more flexible and entirely in Ruby and cross platform. With auto sizing, any dialog will even change to match screen resolution. You can also set a minimum dialog size for resizing.

                        To give some idea of the rich capabilities, find enclosed a flash video of a set of dialogs (WIP) I have been working on and a jpeg showing the main dialog.


                        Sketchup WxSu.swf


                        Build entity.JPG

                        1 條回覆 最後回覆 回覆 引用 0
                        • J 離線
                          Jim
                          最後由 編輯

                          Is it stable? If so, it's a go.

                          Hi

                          1 條回覆 最後回覆 回覆 引用 0
                          • T 離線
                            tomasz
                            最後由 編輯

                            I have done some progress using WxSU. Thank you Peter!

                            Is there a way to hide a WxSU Frame when SU program is minimized?
                            I cannot achieve it (Vista). I thought it should work when SU frame is specified as a parent window (WxSU.app.sketchup_frame).

                            I have checked that even all examples always stay visible when SU is being minimized.

                            Tomasz

                            Author of Thea Render for SketchUp

                            1 條回覆 最後回覆 回覆 引用 0
                            • T 離線
                              tomasz
                              最後由 編輯

                              @billw said:

                              ... Personally, I would much rather use WxSU than Webdialogs, much more flexible and entirely in Ruby and cross platform.

                              Have you used the WxFormBuilder? It would be nice to have a straight output compatible with WxSU! There is a beta which works with Python.

                              Tomasz

                              Author of Thea Render for SketchUp

                              1 條回覆 最後回覆 回覆 引用 0
                              • T 離線
                                tomasz
                                最後由 編輯

                                I have found that WxSU won't close a Dialog on SU exit. It closes Frames without a problem.

                                I haven't figured it out how to fix it yet.

                                Tomasz

                                Author of Thea Render for SketchUp

                                1 條回覆 最後回覆 回覆 引用 0
                                • T 離線
                                  tomasz
                                  最後由 編輯

                                  I would appreciate any help with solving this strange bugsplat which appears instead of a simple ruby error message in the console.
                                  It happens after triggering an 'evt_button'.

                                  require("wxSU/lib/Startup")
                                  
                                  module Test
                                  
                                  	class MainMenu < Wx;;Frame
                                  
                                  		def initialize()
                                  			super(WxSU.app.sketchup_frame, -1, "Test", Wx;;DEFAULT_POSITION, Wx;;Size.new(440,260), WxSU;;CHILD_FRAME_STYLE | Wx;;FRAME_FLOAT_ON_PARENT | Wx;;FRAME_NO_TASKBAR )
                                  			main_panel = Wx;;Panel.new(self, -1)
                                  
                                  			button = Wx;;Button.new(main_panel, -1, "Action!", Wx;;DEFAULT_POSITION, Wx;;DEFAULT_SIZE)
                                  
                                  			evt_button(button.get_id) {|event| button_click(event) }
                                  
                                  		end
                                  
                                  		def button_click(event)
                                  			xx44 ## HERE COMES INNOCENT RUBY ERROR
                                  		end
                                  
                                  	end
                                  
                                  	main_menu=MainMenu.new
                                  	main_menu.show
                                  
                                  end
                                  

                                  event_bugsplat.rb

                                  Author of Thea Render for SketchUp

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • T 離線
                                    tomasz
                                    最後由 編輯

                                    Hi,
                                    Has someone succeed to run wxSU on MAC SnowLeopard? I have received a report that wxSU 3.0 failed to start on that system.

                                    It looks like it has to be compiled for SmowL in a special way.
                                    EDIT: PC version from the ZIP file doesn't run well on MAC 👊 😳

                                    I would love to see more people involved in moving this library into a decent stage of development, because I find that it is very easy to build even complicated interfaces and WxWidgets can be used when writing programs in C++, so the lessons learned in Ruby can be used in programming SU C++ extensions.

                                    Tomasz

                                    Author of Thea Render for SketchUp

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • T 離線
                                      tomasz
                                      最後由 編輯

                                      PROBLEM:
                                      Windows: The SketchUp main window is not recognised correctly when an SKP file is being opened by double-click.

                                      FIX:
                                      MsWindowsFrame.rb
                                      line 60 should read:

                                      model_name=File.basename(model_path,".skp")
                                      

                                      was model_name=File.basename(model_path) which was including extension of a SU file.

                                      BTW. Why Sketchup.active_model.name returns always an empty string. Shouldn't it refer to the file name??


                                      The rb file with the fix

                                      Author of Thea Render for SketchUp

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • thomthomT 離線
                                        thomthom
                                        最後由 編輯

                                        @unknownuser said:

                                        BTW. Why Sketchup.active_model.name returns always an empty string. Shouldn't it refer to the file name??

                                        No - form the manual: http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/model.html#name

                                        
                                        The name method retrieves the string name of the model.
                                        
                                        

                                        Does not refer to filename. But I think it's similar to definition.name. When you import one model into another it comes in as a component - and I think this property refers to what the definition name will be.

                                        But you have model.path instead:
                                        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/model.html#path

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

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

                                          @unknownuser said:

                                          model_name=File.basename(model_path,".skp")
                                          

                                          was model_name=File.basename(model_path) which was including extension of a SU file.

                                          The Model.title method returns the basename (ie filename,) minus the file extension.

                                          Note comparison:

                                          
                                          model_name=File.basename(model_path,".skp")
                                          Sketchup.active_model.title == model_name
                                          # would return true
                                          
                                          

                                          I'm not here much anymore.

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • thomthomT 離線
                                            thomthom
                                            最後由 編輯

                                            @dan rathbun said:

                                            The Model.title method returns the basename (ie filename,) minus the file extension.

                                            Uh? is that something SU implements? don't see it in the manual...

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

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement