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

    SU7 box.rb doesn't work as in SU6

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    11 Posts 3 Posters 430 Views 3 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.
    • A Offline
      anar
      last edited by

      Hi,
      I've just jumped from SU6 to SU7.1.
      I just figured out that the box.rb script (Draw/Box) doesn't work as expected (like in SU6).
      It should ask for the box dimensions but doesn't.
      It also turns the scene into X-Ray mode which is not expected.

      Is it the same for you ?
      Does anyone know why it doesn't act anymore like in SU6 ?
      The two box.rb scripts (SU6 and SU7) are looking similar...

      Strange...

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        What does the Ruby Console say when you try to run it ?
        Is it parametric, is parametric.rb loading etc ?

        TIG

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

          Hi TIG,
          having a look at the ruby console window is the first thing I've done but it says nothing at all...
          Have you tried it by yourself and does it do the same for you ?

          Thanks for your reply.
          Very much appreciated !

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            Works fine for me...
            I thought it might be a language_handler thing for you ? Perhaps not...
            Try renaming it box.txt and restart SUp - it won't load.
            Now in the Ruby Console type load"box.txt" to load it.
            Any errors ?
            Now run it from the last item in the Draw Menu 'Box' - any errors ?
            Any box ?
            😕

            TIG

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

              As for the language_handler I don't think so because I only use English both for SU and all the plugins that I add.

              I've tried what you suggest :

              • rename with .txt extension
              • launch SU7 : it doesn't like it because in examples.rb it can't find box.rb anymore
              • tried to load the txt as you suggested (added "Examples/" to the path)
              • Ruby console says : true
              • Clicked on Draw/Box and everything is OK

              Now can you explain that ?
              Why wasn't it working right the first time with the Box.rb instead of .txt ?
              And what should I do next ?
              Can I rename it back to .rb or must I allways load the .txt by hand instead ?

              It's weird, isn't it ?

              Anyway I would have never though of doing that !
              Thank you TIG !!!

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                Something is loading out of order so that it fails ?

                If you must have a 'box' tool rename a copy xbox.rb and put it into Plugins/

                Disable Examples.

                You should get Box under Draw still?

                I think it's $exStrings that's setting too late ?
                Type $exStrings in the console to see what's in it...

                Alternatively just use this 'DE-$exStrings'd' version...box.rb

                TIG

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  Remove xbox.rb - add my box.rb - should work ?

                  TIG

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

                    TIG,
                    done what you suggested :

                    • copied "Examples/box.rb" into "Plugins/xbox.rb"
                    • disabled Examples in SU (Preferences/Extensions) which can only take place after SU restart
                    • closed and restarted SU
                    • click on "Draw/Box" but it does the same as in my first post : draws a box without asking for dimensions and turns SU in X-Ray mode
                    • typed "$exStrings" in Ruby console and here is the result (I don't know what to understand) :

                    $exStrings
                    #<LanguageHandler:0x5be77f8 @strings={"Select first end"=>"Select first end", "Point at Center"=>"Point at Center", "Box"=>"Box", "Create Box"=>"Create Box", "Material"=>"Material", "Adds examples of tools created in Ruby to the SketchUp interface. The example tools are Draw->Box, Plugins->Cost and Camera->Animations."=>"Adds examples of tools created in Ruby to the SketchUp interface. The example tools are Draw->Box, Plugins->Cost and Camera->Animations.", "Select By Material"=>"Select By Material", "Select By Layer"=>"Select By Layer", "Select second end"=>"Select second end", "Box Dimensions"=>"Box Dimensions", "Cost"=>"Cost", "Total Cost Estimate"=>"Total Cost Estimate", "Stop Spinning"=>"Stop Spinning", "Spin View"=>"Spin View", "Animations"=>"Animations", "Default"=>"Default", "Assign Estimate to Material"=>"Assign Estimate to Material", "Cost Estimate"=>"Cost Estimate", "Ruby Script Examples"=>"Ruby Script Examples", "Layer"=>"Layer", "Width"=>"Width", "Compute Estimate"=>"Compute Estimate", "Assign Estimate to Faces"=>"Assign Estimate to Faces", "Hide Rest"=>"Hide Rest", "Depth"=>"Depth", "Height"=>"Height", "Cost By Material"=>"Cost By Material", "Create Cylinder"=>"Create Cylinder", "Could not find Material named"=>"Could not find Material named", "Cost per sq. foot"=>"Cost per sq. foot", "FPS"=>"FPS"}>

                    • used the alternative "box.rb" that you provided : I've put it in "Plugins/Examples" and enabled Examples again. Click on "Draw/Box" and it works find !

                    I did have a look at your box.rb to check the differences with the original one.
                    I can see the line you updated but as I've never done any Ruby it's hard for me to understand...

                    My very best regards for your kind help !

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

                      Sorry TIG.
                      I updated my post while you where answering...
                      Look at the last point of my previous post to see what I've done.

                      Works fine now !
                      Thank you very much !

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

                        Well I've been a little too fast to anounce that it works fine...

                        I've closed SU and started it again.
                        And again I have the problem !

                        I've tried to put your alternative box.rb directly in "Plugins" instead of "Plugins/Examples" but it still doesn't work !

                        The only way I can have it to work is by loading it myself by either :

                        • load it using the Ruby console
                        • load it via "as_pluginloader.rb"
                        • load it via "Windows/Preferences/Extensions/Ruby script examples"

                        Box.rb is usefull for creating a box in only one click instead of having to draw a rectangle and extrude it.
                        It's going to miss me if I don't have it !
                        And it's a pain in the a## if I must load it each time I start SU !

                        Honestly I don't understand what's wrong with my SU as you told me it was OK for you...
                        Am I the only one with this wierd problem ?

                        1 Reply Last reply Reply Quote 0
                        • F Offline
                          frankc3250
                          last edited by

                          I too have a mac and I am having the exact same problem and get the same results after upgrading from 6 to 7.1 I did all the work arounds list in this post and got the same results as Anar

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

                          Advertisement