sketchucation logo sketchucation
    • Login
    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!
    🚨 Skimp | 25% Off until March 30 Buy Now

    Right click axis show errors in ruby console by plugins

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    5 Posts 2 Posters 341 Views 2 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.
    • dukejazzD Offline
      dukejazz
      last edited by

      Just by right clicking on axis for it's context will show errors in a open ruby console, cause by some ruby loaded plugins.

      Is this just my sketchup setup only or do some one else's with alot plugins see this too?

      I had a page and haft of error ... I unloaded 6 plugins and still have one left to find.

      Error: #<LocalJumpError: unexpected return>
      (eval):107:in `load'

      Why dose this happen? (must be bad code or conflick)

      1 Reply Last reply Reply Quote 0
      • dukejazzD Offline
        dukejazz
        last edited by

        Example
        The loaded plugin zorro2.rb

        Error: #<LocalJumpError: unexpected return>
        D:\P\Google\Google SketchUp 8m3\Plugins\Zorro2.rb:650
        (eval):107:in `call'
        (eval):107

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          That's usually a result of people using return to exit a block instead of break.

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

          1 Reply Last reply Reply Quote 0
          • dukejazzD Offline
            dukejazz
            last edited by

            @650 return method 647-656

            UI.add_context_menu_handler {|menu|
            	sel=Sketchup.active_model.selection.first
            	menu.add_separator
            	return if not sel
            	if sel.class==Sketchup;;SectionPlane
            			menu.add_item("Slice Model at Section") {Zorro2Tool.new.slice_model_at_section(sel)}
            			#menu.add_item("Slice Context at Section") {}
            	end
            	
            }
            
            

            Ruby console pannel show
            %(#8040FF)[Error: #<LocalJumpError: unexpected return>
            D:/P/Google/Google SketchUp 8m3/Plugins/Zorro2.rb:650
            (eval):107:in `call'
            (eval):107]

            @650 break method 647-656

            UI.add_context_menu_handler {|menu|
            	sel=Sketchup.active_model.selection.first
            	menu.add_separator
            	break if not sel
            	if sel.class==Sketchup;;SectionPlane
            			menu.add_item("Slice Model at Section") {Zorro2Tool.new.slice_model_at_section(sel)}
            			#menu.add_item("Slice Context at Section") {}
            	end
            	
            }
            
            

            Ruby console pannel show
            %(#FF4040)[Error: #<LocalJumpError: break from proc-closure>
            D:/P/Google/Google SketchUp 8m3/Plugins/Zorro2.rb:650:in `call'
            (eval):107return]

            sel = nil
            Both block methods fail?
            Thomthom you know more than I.
            by thomthom on Mon Jun 18, 2012 2:15 am
            That's usually a result of people using return to exit a block (true)
            so by getting rid of return line (#return if not sel)
            and adding to the 651 line if statement (and is sel)

            
            UI.add_context_menu_handler {|menu|
            	sel=Sketchup.active_model.selection.first
            	menu.add_separator
            	#return if not sel
            	if sel.class==Sketchup;;SectionPlane and is sel
            			menu.add_item("Slice Model at Section") {Zorro2Tool.new.slice_model_at_section(sel)}
            			#menu.add_item("Slice Context at Section") {}
            	end
            	
            }
            
            

            This seem to fix the zorro2.rb code.
            Thank you, for your help, Thomthom on Mon Jun 18, 2012 2:15 am -jwc

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              Replace this:
              return if not sel if sel.class==Sketchup::SectionPlane

              With this:
              if sel && sel.class==Sketchup::SectionPlane

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

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better πŸ’—

              Register Login
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement