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

    Engineering Toolbox Stopped Working **SOLUTION**

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    27 Posts 6 Posters 3.2k Views 6 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.
    • BlastfurnaceB Offline
      Blastfurnace
      last edited by

      Yes it is something in the drawing causing the issue but why after it causes the issue does the plugin refuse to work in ANY SU drawing? no amount of shutting down or opening blank drawings will make it work after it fails in that drawing.
      And Ruby sits there quiet as can be.

      gotta be something blocking the javascript command from getting out. I dunno. Maybe I'm crazy.
      
      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by

        if you pull the dialog wider to expose the right colum it has an item...

        @unknownuser said:

        Occasionally Problems in Windows
        Due to the way Internet Explorer (used by Sketchup in the Web Dialoges) handles its cache there may be occasionally scripting problems in Windows.
        Just reload the window - use F5 - to refresh the cache.

        have you tried that?
        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply Reply Quote 0
        • D Offline
          driven
          last edited by

          another option is to try and find where it's failing...

          the copyright on the script allows us to modify it, so we can add some detection...

          # Copyright 2008, Engineering ToolBox
          
          # This software is provided as a part of the Engineering Toolbox Google Sketchup
          # application.
          
          # Permission to use, copy, modify, and distribute this software for
          # any purpose and without fee is hereby granted, provided that the above
          # copyright notice appear in all copies.
          
          # THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
          # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
          # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
          #-----------------------------------------------------------------------------
          
          require 'sketchup.rb'
          
          #-----------------------------------------------------------------------------
          module EngineeringtoolboxToolsDialog
            def EngineeringtoolboxToolsDialog.create_dialog
              dlg = UI;;WebDialog.new("Engineering ToolBox", true, "", 1000, 800, 150, 150, true);
              dlg.allow_actions_from_host "engineeringtoolbox.com"
              dlg.set_url "http://sketchup.engineeringtoolbox.com/"
              dlg.show
          
              dlg.add_action_callback("insert") {|d,p|
              p p  # this is all I'm adding... open 'Ruby Panel' then EngToolbox...
          	  eval(p)
              }
            end
          end
          
          
          
          if( not file_loaded?("engineeringtoolbox.rb") )
              add_separator_to_menu("Plugins")
              UI.menu("Plugin").add_item("Engineering ToolBox") { EngineeringtoolboxToolsDialog.create_dialog }
          
          end
          
          #-----------------------------------------------------------------------------
          file_loaded("engineeringtoolbox.rb")
          

          either add the line or swap in the ruby file replace existing one with this...

          then open 'Ruby Console' before testing, and the insert commands should be listed...

          john

          learn from the mistakes of others, you may not live long enough to make them all yourself...

          1 Reply Last reply Reply Quote 0
          • BlastfurnaceB Offline
            Blastfurnace
            last edited by

            Thanks for your effort sir. You have gone above and beyond.
            I have removed SU2014 its installation was an experiment.
            I have removed the plugin and installed it with your modifications.
            I open Ruby Console and then try the plug in.
            Ruby Console shows nothing and plug in still refuses to "Insert"

            I have meetings all morning. So I am going to let the IT guys continue at it from the aspect of javascript command being blocked..

            Very Frustrated but thanks again for everything.

            M

            1 Reply Last reply Reply Quote 0
            • D Offline
              driven
              last edited by

              Mark, did you get this sorted out?
              others are having similar issues and a known solution would be handy...
              john

              learn from the mistakes of others, you may not live long enough to make them all yourself...

              1 Reply Last reply Reply Quote 0
              • BlastfurnaceB Offline
                Blastfurnace
                last edited by

                When I try to "insert" and it refuses to insert I hit F5 right then, and then click "insert" again and it seems to work. It was weird. It seemed like it would do OK until I tried to insert a flange from the site. After a Flange was attempted it would quit working. At least that is how it seemed to me.

                My advice would be try the F5 then click "Insert" again.

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

                  Although it appears to be a problem with odd browser behavior (caching, reload?), potential issues in the Ruby code are undetectable and therefore undebuggable because a SketchUp action_callback does not throw errors.
                  Therefore the execution of Ruby code should be wrapped in something like:

                  
                  begin
                    # execution of ruby code
                  rescue Exception => e
                    puts e.message
                    puts e.backtrace
                  end
                  
                  

                  Also it adds every elementary operation to the undo stack. When clicking once "insert!", it would be more user friendly to only add one command to the undo stack. This can be achieved by wrapping everything in an operation (either on client side in the action_callback, or in the executed Ruby code):

                  
                  begin
                    model.start_operation("operation name")
                    # execution of ruby code
                    model.commit_operation
                  rescue Exception => e
                    model.abort_operation
                    puts e.message
                    puts e.backtrace
                  end
                  
                  

                  One can also catch potential JavaScript errors in the webdialog and make them visible/debuggable in the Ruby Console.

                  Edit: Debuggable version attached. It seems to be a JavaScript error caused by the Prototype library or the usage of it.
                  [pre:2zs9no9b]Object required [http://sketchup.engineeringtoolbox.com/static/lib/scripts/prototype_1_6_0_2.js:3517](http://sketchup.engineeringtoolbox.com/static/lib/scripts/prototype_1_6_0_2.js:3517): in JavaScript function[/pre:2zs9no9b]


                  engineeringtoolbox.rb

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

                    This error is related to the use of the Prototype library's Form.Element.Methods.getValue (= $F) which takes an element id string and returns the element's value (under the condition the element exists). The engineering toolbox generates element id strings from parameters (correctly to my view), but the corresponding elements seem not to exist. To find out more, one would need a stack trace and check the element ids at runtime.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      TomEdit
                      last edited by

                      This Windows related problem is now solved.

                      No reinstallation of the extension is required - but some visited pages in the extension may need reloading (right click the extension window and "reload").

                      1 Reply Last reply Reply Quote 0
                      • BlastfurnaceB Offline
                        Blastfurnace
                        last edited by

                        SOLUTION

                        You guys can hammer out what change could be made to fix this issue but I got a reply from the folks at engineering toolbox.

                        When you click insert and nothing happens you can fix it by refreshing the page.

                        Right click in the page and select "refresh".

                        After that the insert will work.

                        Maybe this can be added to the plugin somehow?

                        But anyhow this gets us back to work.

                        Thank you everyone for your time!!

                        Mark Henry

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

                        Advertisement