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

    Require 'sketchup.rb'

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 978 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.
    • R Offline
      remus
      last edited by

      is it strictly neccesary to include this in my plugins? Ive been going without so far and everything seems to work ok, so what advantage is there to using it in every plugin?

      http://remusrendering.wordpress.com/

      1 Reply Last reply Reply Quote 0
      • R Offline
        RickW
        last edited by

        On the odd chance that your script is loaded before any other script that does require 'sketchup.rb', and your script uses any methods defined by 'sketchup.rb', your script will fail to load. This is most commonly seen if you use file_loaded?(file) or file_loaded(file) at the end of your script.

        A sure-fire example would be if a user new to plugins happened to download a script that did not require 'sketchup.rb' but did use one of the 'sketchup.rb' methods. Having no other .rb files in their plugins folder, they would get a load error straight away, complain to you, and you'd end up putting it in anyway.

        Not that this particular scenario has ever happened (well, not more than a few times, anyway - I know I've read about that scenario, I think on the original SU Ruby forum).

        RickW
        [www.smustard.com](http://www.smustard.com)

        1 Reply Last reply Reply Quote 0
        • R Offline
          remus
          last edited by

          That makes sense, i'll start adding it in 😄

          http://remusrendering.wordpress.com/

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            You can open the Sketchup.rb to see what is included in it.

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            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