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

    Ruby plugin to standalone application

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 401 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.
    • P Offline
      prototype
      last edited by

      Hello sketchup community,

      I developed a plugin for sketchup, in order to assemble some parts in a structure based on some parameters given by an CVS file.

      My program interface is based on a webdialog that allows the communication between ruby and html, javascript and php.

      My question here is:
      Is it possible to make my plugin run as a standalone application that uses sketchup engine for all the drawings?

      Due to the application's purpose, the process of opening Sketchup and run the plugin through there is not good for me..

      Thank you all in advance 😉

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

        Without SketchUp you would have no user interface (other than command line).

        You can look for graphics UI toolkits that have bindings for Ruby (QT, wxWidgets, Fox, Shoes).
        The SketchUp engine can not be embedded, you would have to envoke SketchUp with a (platform dependend) system call and it would open the normal SketchUp application. You can also not easily control it from outside.
        • You could use a separate SketchUp installation that has one ruby plugin installed that starts acting when SketchUp starts.
        • You could launch a ruby script file when SketchUp starts, using an undocumented command line parameter: -RubyStartUp
        • You could use SketchUp Bridge

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

          Not Ruby, but there is an C API for doing just that - read and write .SKP files. Made to be used by other applications who wish to implement SKP support.

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

          1 Reply Last reply Reply Quote 0
          • P Offline
            prototype
            last edited by

            Hello guys

            Thank you for your quick answers!
            Regarding them, I'm trying to use the -RubyStartup tip but I'm not figuring it out!..

            Where should I put it?

            I thought that I had to put it in the Sketchup shortcut target field
            "C:\Program Files\SketchUp\SketchUp 2013\SketchUp.exe"

            I'm using the last version of SketchUp, the free version.

            Thanks!

            1 Reply Last reply Reply Quote 0
            • P Offline
              prototype
              last edited by

              update

              I managed to launch the plugin automatically through a tip that I found of an '!autocon.rb' file.

              For now, this is enough for me 😄
              Thank you all!

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

                @prototype said:

                I thought that I had to put it in the Sketchup shortcut target field
                "C:\Program Files\SketchUp\SketchUp 2013\SketchUp.exe"

                Link Preview Image
                SketchUp Command Arguments

                Following a discussion on SketchUcation, Jim came up with a list of command arguments one could use when launching SketchUp: $ Sketchup.exe [opts] [file.skp] Possible choices for [opts]: -DisableRu…

                favicon

                Procrastinators Revolt! (www.thomthom.net)

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

                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