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

    [Plugin] TIG-LayersFromList

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

      @Rich

      Read the instructions. 😲
      You separate the Layer's name from the R,G,B with a TAB !
      I used "\t" to indicate the TAB - otherwise you'd not see it in the text !
      Since you can have ANY character, other than a "\t" TAB or a "\n" NEWLINE, in a Layer's name, we need to come up with a way of indicating where the Layer's name ends and the R,G,B starts.
      As it's read line-by-line we can't use "\n", so the clear option is the TAB.
      So use the TAB key, don't type "\t" 😒
      In Notepad++ you can use find "\t" and replace with "\t" - with regexp checked...

      TIG

      1 條回覆 最後回覆 回覆 引用 0
      • Rich O BrienR 離線
        Rich O Brien Moderator
        最後由 編輯

        I read the instruction...clear as mud

        Download the free D'oh Book for SketchUp 📖

        1 條回覆 最後回覆 回覆 引用 0
        • Rich O BrienR 離線
          Rich O Brien Moderator
          最後由 編輯

          also i set my text editor to do space and not tabs so now i've to set it so it does tabs to make this work

          a really nice tool but not digging the implementation.

          Download the free D'oh Book for SketchUp 📖

          1 條回覆 最後回覆 回覆 引用 0
          • TIGT 離線
            TIG Moderator
            最後由 編輯

            @rich o brien said:

            also i set my text editor to do space and not tabs so now i've to set it so it does tabs to make this work

            a really nice tool but not digging the implementation.
            Why set it to replace TABs with spaces, that just makes adjusting indents in/out more complicated than you need.
            Provided that you always use the actual text "\t" as the separator AND never use "\t" inside a Layer's name I can adjust the code to trap for idiocy 😆
            Watch for an update 😕

            I'll also look at adding Alpha transparency to the Layer Color, so with material-by-layer a glass layer can be transparent... but I don't think it is accessible through the API, although you can do it manually by editing the Layer's Color in the Layer Browser...

            TIG

            1 條回覆 最後回覆 回覆 引用 0
            • Rich O BrienR 離線
              Rich O Brien Moderator
              最後由 編輯

              Because a certain colleague complains about tabs. So I switched.

              A dialog with a color picker would be nice

              Download the free D'oh Book for SketchUp 📖

              1 條回覆 最後回覆 回覆 引用 0
              • TIGT 離線
                TIG Moderator
                最後由 編輯

                @rich o brien said:

                Because a certain colleague complains about tabs. So I switched.

                A dialog with a color picker would be nice
                That's built-in already.
                Existing layer or new-layer, in the Layer Manager, click the colored block to the right of the entry, and set the RGBA as desired...

                TIG

                1 條回覆 最後回覆 回覆 引用 0
                • Rich O BrienR 離線
                  Rich O Brien Moderator
                  最後由 編輯

                  Yes, but if i could have a better solution than the default it would be nice

                  and accepting hex values would be a plus

                  Download the free D'oh Book for SketchUp 📖

                  1 條回覆 最後回覆 回覆 引用 0
                  • TIGT 離線
                    TIG Moderator
                    最後由 編輯

                    Here is v1.1 http://sketchucation.com/pluginstore?pln=TIG_LayersFromList It now uses a ':' [colon] as the default separator between the LayerName and the R,G,B values
                    LayerName:123,123,123
                    If the layer's name also includes a ':' it is trapped for and is not changed within the name...

                    You can now edit the .RB file and choose another separator, provided it's not a ',', which is reserved for the R,G,B separation...

                    I have looked at the possibility of assigning an optional Alpha transparency to the layer's color - unfortunately the Ruby API gives no access to a Layer-Color's alpha settings - you can however, edit the Layer's color in the Layer Browser and assign it there...

                    TIG

                    1 條回覆 最後回覆 回覆 引用 0
                    • Miner_JeffM 離線
                      Miner_Jeff
                      最後由 編輯

                      Hello,

                      Not sure if anyone else is experiencing this or not.
                      I have not tested V1.1 with Windows 8 yet only Win 7.
                      Version 1.0 worked with Win 7. Layers were created as described in the instructions using a [TAB] delimiter. (Sketchup pro 2015, Win 7)
                      V1.0 with Sketchup Pro, Win 8 would not work. Layers names would show as Rich describes
                      "Layer01 255,0,128" and random color.

                      V1.1 with Sketchup Pro, Win 7 gives layers named "Layer01:255,0,128" with random color
                      V1.1 with Sketchup Pro, Win 8 - not tested yet.

                      Cheers,

                      Miner_Jeff

                      1 條回覆 最後回覆 回覆 引用 0
                      • TIGT 離線
                        TIG Moderator
                        最後由 編輯

                        Works fine for me... 😕
                        Can you PM me the txt file you are using...
                        I'm thinking it might be an encoding issue...
                        If you used Notepad it'll probably be ANSI.
                        With Notepad++ you can change the format to suit >= v2014's Ruby2...

                        Also can you try using this 'empty' file - copy+paste the LayerName:123,123,123 lines from the original - this is encoded as UTF8-without-BOM, and works for me fine...
                        If that file works then I can try and force the encoding better on the 'read' ?


                        MyLayers.txt

                        TIG

                        1 條回覆 最後回覆 回覆 引用 0
                        • TIGT 離線
                          TIG Moderator
                          最後由 編輯

                          @Miner_Jeff

                          Thanks for the PM.
                          I can use the 'colon' [or 'TAB'] txt file just fine...
                          The layers/colors come in as expected.

                          Have you tried my own txt file.
                          I expect it won't matter...

                          BUT your files already work fine for me 😕

                          TIG

                          1 條回覆 最後回覆 回覆 引用 0
                          • Miner_JeffM 離線
                            Miner_Jeff
                            最後由 編輯

                            Hi TIG,

                            After some testing, it appears that I have a weird issue with Notepad++ [under investigation!]

                            Using plain Notepad to make the Layers.txt file, the plugin results are as expected.

                            Nice work again!

                            Many thanks, 😄

                            Miner_Jeff


                            Q: How do you sink a 1000 m mine shaft?
                            A: Blast one round at a time.

                            1 條回覆 最後回覆 回覆 引用 0
                            • KrisidiousK 離線
                              Krisidious
                              最後由 編輯

                              Can this export from one file and create the text file that will be used on another file?

                              By: Kristoff Rand
                              Home DesignerUnique House Plans

                              1 條回覆 最後回覆 回覆 引用 0
                              • TIGT 離線
                                TIG Moderator
                                最後由 編輯

                                No, but I'll write its sibling LayersToList 😉

                                TIG

                                1 條回覆 最後回覆 回覆 引用 0
                                • KrisidiousK 離線
                                  Krisidious
                                  最後由 編輯

                                  lol... It's great just the way it is TIG... Thank you.

                                  Currently I open a sketchup model and find I want the layers from another. So I open a second instance and then copy/paste geometry from old to new and thus transfer layers. Only takes a few clicks.

                                  By: Kristoff Rand
                                  Home DesignerUnique House Plans

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • KrisidiousK 離線
                                    Krisidious
                                    最後由 編輯

                                    @miner_jeff said:

                                    Hi TIG,

                                    After some testing, it appears that I have a weird issue with Notepad++ [under investigation!]

                                    Using plain Notepad to make the Layers.txt file, the plugin results are as expected.

                                    Check your encoding on Notepad++ please.


                                    bom.jpg

                                    By: Kristoff Rand
                                    Home DesignerUnique House Plans

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • TIGT 離線
                                      TIG Moderator
                                      最後由 編輯

                                      @Kris
                                      I wrote **TIG-LayersToList** anyway - http://sketchucation.com/forums/viewtopic.php?p=568648#p568648
                                      You can use it to make Layer-sets for reuse in other Models in conjunction with this tool - TIG-LayersFromList http://sketchucation.com/pluginstore?pln=TIG_LayersFromList ...

                                      TIG

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • jujuJ 離線
                                        juju
                                        最後由 編輯

                                        wow, should be a real great thing if the two were to be combined

                                        Save the Earth, it's the only planet with chocolate.

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • TIGT 離線
                                          TIG Moderator
                                          最後由 編輯

                                          Here is v1.2 http://sketchucation.com/pluginstore?pln=TIG_LayersFromList
                                          It fixes an issue reported by some Win8 users, where the layers' color were not getting set correctly.

                                          TIG

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • Miner_JeffM 離線
                                            Miner_Jeff
                                            最後由 編輯

                                            Hi Folks,

                                            If you need to create a sequence of layers with text and numbers with specific colours I have shared a means to create the text file easily for use with this wonderful ruby of TIG's.
                                            It can be used to verify the colour of RGB values too by colouring the cell to RGB values specified.

                                            I used MS excel and VBA. It can be found here http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=63894

                                            Cheers,

                                            Miner_jeff

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

                                            Advertisement