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

    [Plugin] FloorGenerator ( Updated 6-Apr-2017)

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

      @unsuns said:

      Hello Everyone !

      First of all, thank you for the great job you did to bring us that tool.

      However, I have an issue : I wanted to be able to run it through a toolbar button (which I successfully did, but when I close the FG window the button is still activated and if I try to run it again the FG window doesnt show up anymore (even if I use other tools after that).

      Could you please help me to fix it ? 😕

      Just don't "X" out of the WebDialog window, instead Right click in space or select any other tool. This will close the WebDialog window an unselect the Toolbar Icon.

      Nothing is worthless, it can always be used as a bad example.

      http://sdmitch.blogspot.com/

      1 條回覆 最後回覆 回覆 引用 0
      • jolranJ 離線
        jolran
        最後由 編輯

        @unknownuser said:

        Just don't "X" out of the WebDialog window, instead Right click in space or select any other tool. This will close the WebDialog window an unselect the Toolbar Icon.

        Sam. I think you could try trigger some actions during the closing of the dialog with "X", using @yourdialog.set_on_close { #set closing action here }. If you are not already using it, that is.
        As usual concerning webdialogs, I don't know how reliable that method is..

        1 條回覆 最後回覆 回覆 引用 0
        • U 離線
          unsuns
          最後由 編輯

          I tried what you said jolran but I couldn't figure it out. How should I do it ?
          Here is the code:

          ...
          

          [mod=:3izmkj1d]Please don't post entire blocks of code from other authors - it's bad manners...
          Extracts are fine...[/mod:3izmkj1d]

          1 條回覆 最後回覆 回覆 引用 0
          • sdmitchS 離線
            sdmitch
            最後由 編輯

            @jolran said:

            @unknownuser said:

            Just don't "X" out of the WebDialog window, instead Right click in space or select any other tool. This will close the WebDialog window an unselect the Toolbar Icon.

            Sam. I think you could try trigger some actions during the closing of the dialog with "X", using @yourdialog.set_on_close { #set closing action here }. If you are not already using it, that is.
            As usual concerning webdialogs, I don't know how reliable that method is..

            I wasn't. Another one of those things that is there but not a necessity so I just ignored it. Thanks for the suggestion.

            Nothing is worthless, it can always be used as a bad example.

            http://sdmitch.blogspot.com/

            1 條回覆 最後回覆 回覆 引用 0
            • jolranJ 離線
              jolran
              最後由 編輯

              @unknownuser said:

              I tried what you said jolran but I couldn't figure it out. How should I do it ?

              unsuns, I meant this to be tried by Sam at developer-level. I havent dug in his script, so this suggestion was a shot in the dark.

              @unknownuser said:

              I wasn't. Another one of those things that is there but not a necessity so I just ignored it. Thanks for the suggestion.

              Hope it helps.
              /Joel

              1 條回覆 最後回覆 回覆 引用 0
              • U 離線
                unsuns
                最後由 編輯

                Can't I do it myself ? To help improve that script

                1 條回覆 最後回覆 回覆 引用 0
                • sdmitchS 離線
                  sdmitch
                  最後由 編輯

                  Posted new version.

                  Unsuns, I would appreciate it if you would let me take care of my plugins. Thank you.

                  Nothing is worthless, it can always be used as a bad example.

                  http://sdmitch.blogspot.com/

                  1 條回覆 最後回覆 回覆 引用 0
                  • U 離線
                    unsuns
                    最後由 編輯

                    That's alright ! Thank you !

                    1 條回覆 最後回覆 回覆 引用 0
                    • U 離線
                      unsuns
                      最後由 編輯

                      Did you test it ?
                      Now when I select a pattern it closes the window, so I have to reopen to adjust settings and if I select another pattern it's the same.

                      1 條回覆 最後回覆 回覆 引用 0
                      • guanjinG 離線
                        guanjin
                        最後由 編輯

                        @sdmitch said:

                        Posted new version.

                        Unsuns, I would appreciate it if you would let me take care of my plugins. Thank you.

                        eeeeeeee.gif

                        Each pattern, cannot directly activate command, to repeat the icon to perform。

                        I come from China, is to learn

                        1 條回覆 最後回覆 回覆 引用 0
                        • sdmitchS 離線
                          sdmitch
                          最後由 編輯

                          @unsuns said:

                          Did you test it ?
                          Now when I select a pattern it closes the window, so I have to reopen to adjust settings and if I select another pattern it's the same.

                          Apparently not enough!

                          The .set_on_close had unintended consequences and has been removed. Although it did seem to fix the problem of X'ing out, it, for some bazaar reason, was triggered when the pattern was changed. My bad 🤢

                          Nothing is worthless, it can always be used as a bad example.

                          http://sdmitch.blogspot.com/

                          1 條回覆 最後回覆 回覆 引用 0
                          • U 離線
                            unsuns
                            最後由 編輯

                            The X-ing problem is back again !

                            1 條回覆 最後回覆 回覆 引用 0
                            • sdmitchS 離線
                              sdmitch
                              最後由 編輯

                              @unsuns said:

                              The X-ing problem is back again !

                              Yes I know and it will be until I can figure out why changing the pattern selection causes the window to close.

                              Why do you insist on X'ing out of the window? If it is in your way then minimize it.

                              Nothing is worthless, it can always be used as a bad example.

                              http://sdmitch.blogspot.com/

                              1 條回覆 最後回覆 回覆 引用 0
                              • sdmitchS 離線
                                sdmitch
                                最後由 編輯

                                @jolran said:

                                Sam I'm looking at your code here. Cant remember which version this is. So you may have changed this behavior.
                                But in a callback you have a dialog close ?

                                You have a select with an event onchange:

                                <select onChange='patternchanged(value)'>
                                

                                The function then sends the callback

                                function patternchanged(value){
                                >    window.location='skp;PatternChanged@'+value;
                                > }
                                

                                In the callback block you have a dlg.close. So everytime select change dialog closes..

                                @@dlg.add_action_callback("PatternChanged") {|d,p|
                                > 	@@opt=p; puts p
                                > 	if @@opt=="Reset" then 
                                > 						["Brick","Tile","Wood","Tweed","Hbone","BsktWv","HpScth","Hexgon","Octgon","Two2One" ,"IrPoly"].each{|o| 
                                >   Sketchup.write_default("FloorGenerator",o,nil)};@@opt="Tile";
                                >   end
                                >   @@dlg.close; @@dlg=nil; self.dialog
                                > }
                                

                                I also see you have the command self.dialog trying to reopend the dialog ?
                                But it is set to nil before. Don't know if that messes things up..
                                Maybe a timing issue.

                                Edit: sorry meant to post this in the devlopper forum where you posted specific question. Copied and pasted wrong...

                                Yes I finally figured that all out. I just had to add a variable that I set to true if the PatternChanged and the window was closed and recreated. I deleted the post to the Developer forum as soon as I figured it out so as not to embarrass my self further.

                                Nothing is worthless, it can always be used as a bad example.

                                http://sdmitch.blogspot.com/

                                1 條回覆 最後回覆 回覆 引用 0
                                • jolranJ 離線
                                  jolran
                                  最後由 編輯

                                  Sam I'm looking at your code here. Cant remember which version this is. So you may have changed this behavior.
                                  But in a callback you have a dialog close ?

                                  You have a select with an event onchange:

                                  <select onChange='patternchanged(value)'>
                                  

                                  The function then sends the callback

                                  function patternchanged(value){
                                     window.location='skp;PatternChanged@'+value;
                                  }
                                  

                                  In the callback block you have a dlg.close. So everytime select change dialog closes..

                                  @@dlg.add_action_callback("PatternChanged") {|d,p|
                                  	@@opt=p; puts p
                                  	if @@opt=="Reset" then 
                                  						["Brick","Tile","Wood","Tweed","Hbone","BsktWv","HpScth","Hexgon","Octgon","Two2One" ,"IrPoly"].each{|o| 
                                    Sketchup.write_default("FloorGenerator",o,nil)};@@opt="Tile";
                                    end
                                    @@dlg.close; @@dlg=nil; self.dialog
                                  }
                                  

                                  I also see you have the command self.dialog trying to reopend the dialog ?
                                  But it is set to nil before. Don't know if that messes things up..
                                  Maybe a timing issue ?

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • jolranJ 離線
                                    jolran
                                    最後由 編輯

                                    Ha ha ! Ah ok! 👍

                                    I thought I was getting high or something. One minute I thought I read about it in the developper section, then it was gone. So I removed my last sentence as well, just in case I was wrong 😆 😆

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • S 離線
                                      stagelight
                                      最後由 編輯

                                      Thank you for another great plugin !!
                                      This is what I've been working on lately, with your script.


                                      Bridge.jpg

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • sdmitchS 離線
                                        sdmitch
                                        最後由 編輯

                                        @stagelight said:

                                        Thank you for another great plugin !!
                                        This is what I've been working on lately, with your script.

                                        It's a rather funny floor but a very nice bridge.

                                        Nothing is worthless, it can always be used as a bad example.

                                        http://sdmitch.blogspot.com/

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • D 離線
                                          djrique
                                          最後由 編輯

                                          Thank you guy for that great plugin. I'm a brazilian and translated it for portuguese. Do you think that it's good?

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • sdmitchS 離線
                                            sdmitch
                                            最後由 編輯

                                            @djrique said:

                                            Thank you guy for that great plugin. I'm a brazilian and translated it for portuguese. Do you think that it's good?

                                            Good by me.

                                            Nothing is worthless, it can always be used as a bad example.

                                            http://sdmitch.blogspot.com/

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

                                            Advertisement