Installation files relative to the Plugins folder: The extracted files should be located as in the following image:
un-zip the archive to your Sketchup/Plugins folder, and re-start SketchUp.Better check if TB was previously visible.Use $suString.GetString to get proper "Ruby Console" name string.Made to use SketchUp's Extensions Dialog.Wrapped in additional module namespace RubyToolbar.Changed Toolbar name from "Ruby Console" to "Ruby Toolbar" ( TT ).Note that the v1.0.1 of the OpenStudio SketchUp Plug-in released through the SketchUp Extension Warehouse is a different release available here.Also note that the rbz downloaded from this release has changed. I threw the current images together from free images I found online. This SketchUp Plugin is to be used with the OpenStudioApplication v1.0.1 or higher. If anyone is feeling generous, I could really use a set of nice-looking button images in a consistent theme. Remembers most recently used folder and file between SketchUp sessions.It can open and close the Ruby console, clear the console, load a ruby script, reload the last script, and browse the Plugins folder. Tip: If you prefer to not have your plugin’s source code visible, then you can use SketchUp’s Scrambler to encrypt Ruby files.This Windows-only plugin creates a Toolbar for controlling the Ruby Console Mymenu = UI.menu("Plugins").add_submenu("My Plugin Collection") # Main code (start module name with capital letter) Organization: AuthorAffiliationOrOrganizationIfAny
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. Sketchup.register_extension my_plugin_loader, trueĬontents of /my_plugin/my_plugin.rb (in subfolder) =begin My_plugin_scription = "Description of plugin." My_plugin_loader.creator= "Me, myself and I" My_plugin_pyright= "Copyright 2011 by Me" My_plugin_loader = SketchupExtension.new "My_Plugin Loader",
# Load plugin as extension (so that user can disable it) Replace “my” with your initials to keep things clean.Ĭontents of /my_plugin_loader.rb (in main directory) require "sketchup.rb"
Below is some sample code to get you started. It is a good idea to a) use SketchUp’s extension system and b) wrap your plugin in a Ruby Module. Mac: /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/ Plugin Template Windows: C:\Program Files\Google\Google SketchUp 8\Plugins\ my_plugin.rbz (compressed file)Īs a reference: SketchUp’s default Plugin installation folder can be found here (replace version number with current major version):
The entire contents of the compressed file will get copied into SketchUp’s Plugins folder on installation. To enable use of the RBZ-installer functionality, all files that make up a plugin must be packaged in one single compressed file (note that the RBZ file is simply a re-named ZIP file). The following is a minimal sample file structure. You can add as many other files and folders as necessary for your plugin. Ruby Script: Mass Material Importer The Mass Material Importer Ruby script (massmaterialimporter.rb) is a great tool for creating new materials en masse.
Packaging a plugin this way allows a user to easily install it from SketchUp’s Preferences dialog. The RBZ file format was introduced in Maintenance Release 2 of Version 8. There is plenty of ruby programmers out there doing a great job creating SketchUp Plugins to improve the.
You can then afterwards package your code in a plugin using the instructions below. Looking for free online courses with certificates for IT training LearnVern offers web development courses, including PHP, Java, C++, Android, iOS. SketchUp plugins use the Ruby programming language. This allows you to experiment with Ruby scripting. Also note that SketchUp has a C++ SDK (in case you intend to work with it from other software).Īlthough you can use any text editor to create a plugin, it might be a good idea to install my Ruby Code Editor plugin into SketchUp first. It is a basic template to get you started.
The following concerns plugins written in Ruby (the programming language included with SketchUp’s free and Pro versions). You can also find great forums for discussion in the official Google Developer Forum or at SketchUcation. There are many tutorials, resources and forums available online that will help you get started. When you are done creating your new plugin, feel free to add it to the index on. The following is a cross-post from my other site.