Tuesday, February 14, 2012

“Plugin as one File with RBZs in SketchUp 8 M2”

At very recent the latest SketchUp 8 maintenance release M2, where added the easier way for installing the Ruby scripts for the users. In earlier users had copied the .rb files manually into their previous Plugin folders, otherwise need to create a custom installer for it. But now Plugins can be “packaged” in a ZIP file which has the RBZ extension. There is the advantage of no need to worry about a plugin’s file and where they need to go.

At first need to know about RBZ file and how would be create it. So, RBZ files are simple ZIP files and nothing else. To create the archive, can use the favorite ZIP tool in there and rename it for having an .RBZ extension. Any things like files or subfolders and more can put inside of this RBZ file. They’ll be unpacked into the user’s Plugins folder.

There is a button in SketchUp software which makes it easier to use it. It is found under Preferences -> Extensions -> Install Extension. Using the button, get a file browser window to select any .RBZ files from their harddisk and the SketchUp application will put them in the right spot plus load up. To see the shiny plugin, there is no need to restart The SketchUp.

A ZIP file with the following contents in it:

SketchUp 8/Plugins/helloworld.rb

SketchUp 8/Plugins/helloworld_files/smiley.png

SketchUp 8/Plugins/helloworld_files/hello.html

Create a ZIP file with above contains. Using the ZIP tool simply selects the helloworld_files and helloworld.rb folder. Then click the right button of the mouse on them and select “Create ZIP”. The new file is called helloworld.zip. Then rename to helloworld.rbz. Before this it would be even better to change the ruby script into a Sketchup Extension. That’s the time to see Extension added to the Extensions panel when the users do the install, and it is also very easy to turn it off.

No comments:

Post a Comment