123456789_123456789_123456789_123456789_123456789_

Release Notes

The SketchUp API has been around in some fashion since the early days of SketchUp, and with every release we have extended its capabilities. Read below for what's been changed.

Though our adoption rate to the latest version is quite high, it can take time after a release before everyone upgrades. If you are building scripts that rely on functionality from the most recent version, be sure to check the Sketchup.version to make sure your users are able to run your script:

# You do something like this in the initialization routine of your extension.
version_required = 16
if (Sketchup.version.to_f < version_required)
  UI.messagebox("You must have Sketchup 20#{version_required} to run this "\
                "extension. Visit sketchup.com to upgrade.")
else
  # Your stuff...
end

Build Numbers

Here are the build numbers for recent SketchUp releases. Note that build numbers in languages besides English are larger for each release, so it is best to check for builds that are greater than or equal to the numbers here.

What's new in SketchUp 2024.0

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2023.1

Ruby API Additions and Improvements

What's new in SketchUp 2023.0.2

Ruby API Bug Fixes

What's new in SketchUp 2023.0.1

Ruby API Bug Fixes

What's new in SketchUp 2023.0

Overlays

Overlays are a new SketchUp API capability which allows developers to persist extension behaviors while you are using other tools. Effectively, extensions can now continue to analyze, visualize, and create information in the modeling window as you continue evolving a SketchUp model using other native tools and extensions. Previously, extension developers were limited to drawing information to the modeling window only when their extension had a tool active .

Update OpenSSL to 1.1.1o

The version of OpenSSL in Ruby was updated to 1.1.1o.

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2022.0.1

Ruby API Bug Fixes

What's new in SketchUp 2022.0

EntitiesBuilder

We added a new interface, ::Sketchup::EntitiesBuilder, with the purpose of being able to generate bulk geometry with similar speed to ::Geom::PolygonMesh + Sketchup::Entities#fill_from_mesh but with the simplicity and per-entity control that ::Sketchup::Entities offer. This is particularly useful for importers where you can expect to see major performance improvements by switching from Sketchup::Entities#add_face to Sketchup::EntitiesBuilder#add_face.

Universal binary support on Mac

We now support universal binaries on macOS that run natively on both Apple silicon and Intel-based Mac computers.

Update OpenSSL to 1.1.1l

The version of OpenSSL in Ruby was updated to 1.1.1l.

Made Ruby Console output more consistent

Earlier versions of SketchUp printed the return values to Ruby Console commands different depending on platform. This has been made consistent following the pattern of Ruby's own IRB tool. A side effect of this is that the console now uses .inspect instead of .puts when printing the returned value which makes it less ambiguous in many cases. For example nil vs "" that would otherwise print a blank line in both cases.

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2021.1.1

Ruby API Bug Fixes

What's new in SketchUp 2021.1

Upgrade Ruby to 2.7.2

For SketchUp 2021.1 we have upgraded the version of Ruby that we ship with SketchUp from 2.7.1 to 2.7.2.

Notable bug-fix in Ruby 2.7.2 is correcting a bug that prevented profiling tools such as ruby-prof from reporting correct results.

Update OpenSSL to 1.1.1k

The version of OpenSSL in Ruby was updated to 1.1.1k.

Ruby Console Improvements

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2021.0

Upgrade Ruby to 2.7.1

For SketchUp 2021.0 we have upgraded the version of Ruby that we ship with SketchUp from 2.5.5 to 2.7.1. Developers should verify that their extensions are working as expected in this new version of Ruby.

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2020.2

Ruby and C Exchange API

To allow better interoperability of the Ruby API and C API within the SketchUp application we introduced the ability to exchange entities and image reps between the APIs.

Entities because it's a key type and ImageRep because it can be an expensive object to copy.

For more details refer to the C API documentation.

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2020.1

Ruby API Additions and Improvements

What's new in SketchUp 2020.0

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2019.3

Ruby API Bug Fixes

What's new in SketchUp 2019.2

Ruby API Additions and Improvements

Ruby API Bug Fixes

What's new in SketchUp 2019.1

Ruby API Bug Fixes

What's new in SketchUp 2019

Upgrade to Ruby 2.5.1

We have upgraded from Ruby 2.2.4 to Ruby 2.5.1. These upgrades tend to introduce subtle changes to the Ruby language that sometimes are difficult for us to find in our internal testing. Our testing has not found any major compatibility issues between Ruby 2.2.4 and the new 2.5.1 and we expect the upgrade for most developers should be relatively straightforward. Please note that any compiled C extensions will need to be rebuilt. Ensure OpenSSL library calls are compatible.

Dashes

Stipples and dots and dotted stipples, oh my! SketchUp has added a Dashes feature that allows for unique line styles to be applied and controlled at the Layer level. We have exposed this new feature in the Ruby and C APIs. See the Improvements and Fixes sections of each API for a list of classes and methods we’ve added. See the documentation for each API for complete documentation on how to use these features.

InstancePath Support for Dimensions and Text

In SketchUp 2019 we have added ::Sketchup::InstancePath support to our existing ::Sketchup::DimensionLinear and ::Sketchup::Text classes. Now when creating a Linear Dimension, or an attached Text object, you can attach it to a nested entity by providing a valid InstancePath object, or an array version of an instance path. This will allow you to create a dimension in model space, but attach it to a valid nested entity. The linear dimension or text will then be attached to that entity, exactly how it is when linear dimensions and text are created via the UI.

Ruby API Breaking Changes

Ruby API Additions and Improvements

Ruby API Bug Fixes

SketchUp C API Documentation

LayOut Ruby API for SketchUp

What's new in SketchUp 2018 M0

LayOut Ruby API for SketchUp

This is a new Ruby based API for SketchUp that allows developers to read and write LayOut files using the regular SketchUp Ruby API. We’ve taken the existing LayOut C API and wrapped it with a Ruby layer and then included that inside SketchUp. This is proving to be a great working model for how to expose API functionality to our base C API and then expose that exact functionality to a Ruby layer without duplicating code.

Sketchup.send_to_layout

Along with the LayOut Ruby API for SketchUp we added the ability to open LayOut files with the LayOut application. This gives developers the ability to write a SketchUp extension purely in Ruby that parses the SketchUp model, writes a LayOut file and opens the LayOut file in LayOut in one smooth motion. This helps create a stronger connection between SketchUp and LayOut and can improve user workflows through the use of developer created extensions.

ImageRep

Hello Ruby API developers, meet ::Sketchup::ImageRep. This new class exposes a data structure internal to SketchUp called an ImageRep. ImageRep is an in-memory representation of an image (as opposed to a reference to an image inside the SketchUp model). This class exposes a number of image reading and manipulation tools to the Ruby API. Now you can get the color of a pixel at a specified uv coordinate from an ImageRep, get an array of all pixel data from an ImageRep, set pixel data in an ImageRep, save an ImageRep out to disk, and more. Of course we’ve also included utilities to convert an in-model texture to an ImageRep, and assign an ImageRep object directly to a material as the material’s texture. This new class opens up a lot of opportunities to read and manipulate images in the model. Check out the ImageRep class in Ruby API docs for more information.

Exposed Importer/Exporter Options to Ruby API

We have exposed all the options for our native importers and exporters to Ruby. See the Ruby API documentation on Sketchup::Model#import and Sketchup::Model#export.

New SketchUp Features in the API

A big round of applause for the SketchUp Core team for the improvements they have added to the SketchUp application. Well, we also wanted to make sure that these new features were accessible to our developer community. We have introduced new API features for Named Section Planes and Filled Section Cuts. Awesome!

Ruby Handling of Advanced Attributes

SketchUp core added a feature called Advanced Attributes. This adds some new attribute dictionaries and attributes to Component Instances and Definitions by default on every model. It should be noted that we have blocked the ability to delete the dictionaries via Ruby. This should not be possible, please let us know if you find a scenario where you are able to do so. You can however delete the key/value pairs. The UI will recreate those key value pairs if they do not exist.

Ruby Improvements and Fixes

Bug Fixes

What's new in SketchUp 2017 M0

Ruby 2.2

Yes, its that time again - time to update our Ruby Interpreter. We have upgraded to Ruby version 2.2.4. We're hopeful that extensions that use pure Ruby will be able to upgrade to Ruby 2.2 with little difficulty. Please note that any compiled C extensions will need to be rebuilt.

Embedded Web Framework

One of the developer features we are most excited about for SketchUp 2017 is a new Web Dialog framework. For SketchUp 2017 we are bundling the Chromium Web Browser with the SketchUp installer. What?! Yes, now SketchUp comes pre-packaged with a single web browser for both Mac and Windows clients. No more trauma from banging your head against the wall while trying to make your web pages compatible with Internet Explorer 8-11 and Safari.

In order to maintain backwards compatibility, we have implemented a new HtmlDialog class in the Ruby API and we have not altered the existing WebDialog class. Extensions that use WebDialogs should continue to work with no changes required.

New Ruby API Documentation

We have been working to improve our Ruby API documents and the publication process. We switched from an internally tweaked and maintained version of RDoc to YARD for our documentation generation. In the process we had to make many alterations to our documentation in the source code, we made a specialized YARD template to suit our needs. What we have now is a simple way to regenerate the documents in a matter of seconds, and we can push them to a git repo, where they are immediately available publicly. A process that used to take hours of manual html editing and special access to our Sketchup.com webserver, has been reduced to about a 10 minute process to generate and publish the documentation.

SketchUp C API Parity - continued

We have focused on adding features to the SketchUp C API in 2017 to provide greater benefit to our developers and as part of our continued effort to fully deprecate and remove the old C++ API in the future. We are continuing to add more until we gain enough coverage to consider the C API at feature parity with the deprecated C++ API.

Updated Compilers

We updated our compilers for Windows and macOS. On Windows we are now using Visual Studio 2015 SP1 (targeting Windows 7). On MacOs we are using XCode 7.2.1 (with deployment target 10.10).

New Ruby API Features

Bug Fixes/Small Improvements

Ruby API

What's new in SketchUp 2016 M0

A new LayOut API

We’re proud to announce our first step towards an extension ecosystem for LayOut. Using this new API developers can now open, create, modify, save, and export .layout files. Practically, this means that other applications can import or export the .layout file format using the C API. (This includes creating a .layout file from SketchUp). We have several sample scripts for developers to try out at release. Check out the API documentation in the Developer Center for more information.

Digitally Signing Extensions - Extensions Loading Policy

With SketchUp 2016 we introduced the ability for users to select which Extension Loading Policy they want to use. The options are "Identified Extensions Only", "Approve Unidentified Extensions", and "Unrestricted.

The developer side of this feature is known as a Digital Signature. All SketchUp extensions for 2016 or later will now require a Digital Signature to run in the highest security mode - "Identified Extensions Only". If the user has chosen "Approve Unidentified Extensions" then all signed extensions will load automatically and any unsigned extension will have to be approved by the user. All extensions signed and unsigned, will load in "Unrestricted" mode.

SketchUp 2016 M0 installs in "Unrestricted" mode by default.

To digitally sign your extension, simply upload your .rbz package to our new Digital Signature and Encryption page and we will sign it and return it to you. Visit the new Extension Digital Signature page.

You will need to sign your extension each time you make code changes and want to re-release it. You will need to be a registered Developer on the Extension Warehouse to be able to sign or encrypt extensions. Apply here!

Ruby Encryption 2.0

Goodbye .rbs and Hello .rbe! We have added a new encryption that you can use to help protect your extension Intellectual Property (IP). SketchUp 2016 can read both .rbe and .rbs filetypes. This should help make sure that we maintain backwards compatibility for authors who need some time to re-encrypt their extensions. To use our new encryption, simply upload an unencrypted version of your .rbz package to our new Digital Signature and Encryption page and we will encrypt it and return it to you. Visit the new Extension Digital Signature page page here for more information.

You will need to be a registered Developer on the Extension Warehouse to be able to sign or encrypt extensions. Apply here!

Developer Center

Between the new Extension Digital Signature Page, the new LayOut C API and a whole lot of future ideas and potential, we have decided to create a new central location to organize our developer resources, API documentation, etc. Visit (and bookmark!): https://extensions.sketchup.com/en/developer_center

Observer Upgrades

We have been working on finding ways to make observers more stable and reliable for all developers. Most of these changes happen under the hood and are not entirely visible to developers. To help with that, we added a few Ruby Warnings that appear in the Ruby Console, and two debugging methods that will determine whether those warnings are shown: Sketchup.debug_mode= and Sketchup.debug_mode?.

SketchUp C API Parity - continued

We have focused on adding features to the SketchUp C API in 2016 to provide greater benefit to our developers and as part of our continued effort to fully deprecate and remove the old C++ API in the future. Below is a complete list of functions that we have added for 2016. We are continuing to add more until we gain enough coverage to consider the C API at feature parity with the deprecated C++ API.

New Ruby API

Bug Fixes/Small Improvements

What's new in SketchUp 2015 M2

We fixed a crash on Mac that could occur when a timer was stopped via UI.stop_timer from within the timer procedure.

What's new in SketchUp 2015

Renaming the Plugins Menu

We renamed the "Plugins" menu to "Extensions" to be more inline with our current naming conventions. This should not break existing plugins. Adding a menu item to the "Plugins" menu will still work, it will be added to the "Extensions" menu.

New! - Extension Licensing API

One of the new features that we have added to API is the ability to create licensed extensions. The Extension Warehouse has been upgraded to manage and distribute these licenses.

New! - Classifier API

New API Features

64 Bit related changes to our Ruby API

Webdialog JS error Dialogs for Developers

In previous versions of SketchUp on Windows, users would see javascript error popup boxes anytime there was malformed js code on a webpage. We muted those popups in a previous release. Due to popular demand, we have brought them back, this time for developers only! Developers can enable js error popups by creating this key in their Windows registry: HKEY_CURRENT_USER/Software/SketchUp/SketchUp 2015/WebDialogs/ShowErrorDialogs and adding a DWORD value set to 1.

Bug Fixes and Improvements

What's new in SketchUp 2014 M1

What's new in SketchUp 2014

We have made many additions and improvements to the SketchUp Ruby API. These changes include some big and potentially code-breaking changes in this round of SketchUp. We strongly recommend all developers test their scripts for compatibility with 2014.

Upgrade to Ruby 2.0 and Stdlib is now included

New! - Dimensions API

Please see the new API docs for how to implement these classes and methods:

New! - SectionPlane additions

Please see the new API docs for how to implement these classes and methods.

Added support for creating and activating ::Sketchup::SectionPlane entities:

Additional New API Methods and Features

Below is an outline of new API functionality. Please see the new API docs for how to implement these classes and methods.

Ruby Console Upgrades

Observer Bug Fixes

Moved the Set class to ::Sketchup::Set

In order to avoid clashing with the Standard Ruby Library we moved the Set class to ::Sketchup::Set. All references to the SketchUp Set class should be refactored.

General Bug Fixes

What's new in SketchUp 2013 M1

Bug Fixes

Fixed a toolbar bug that caused some extensions to not display and become incorrectly docked behind other toolbars. Developers are now advised to call UI::Toolbar#restore after creating a toolbar, although those that do not will also work correctly on SU2013 M1.

Fixed a bug in UI::WebDialog#get_element_value which caused it to malfunction with some html elements on Mac.

What's new in SketchUp 2013

Expanded the SketchupExtension class

New methods:

Documented the LanguageHandler class

LanguageHandler was an existing internal class which we are now exposing in the API. It has been updated such that it looks first for translated resources within the Resources folder in the extension directory structure (as explained in the Extension Warehouse Developer Center). All translated resources should be located within the appropriate language folder.

Added special HTML link to launch an extension's page on Extension Warehouse

See detailed explanation of the "skp:launchEW" link in ::UI::WebDialog class documentation.

Change in Sketchup.send_action

"addBuilding:" has been removed.

What's new in SketchUp 8 M2

The second maintenance release for SketchUp 8 was available December 1, 2011. It included a handful of Ruby API additions around managing extensions.

Improved the SketchupExtension class

Five new methods:

Added ExtensionsManager class

Lets you inspect which Extensions are registered.

Added new hooks in the Sketchup object

What's new in SketchUp 8 M1

The first maintenance release for SketchUp 8 was available January 12, 2011. It included several Ruby API fixes and additions.

Improved the ::UI::Toolbar class

Two new methods:

Fixed these failing method calls on Mac:

Fixed this failing method calls on the PC:

Expanded the ::UI::Command Class

New methods:

Expanded the Material/Materials Classes

New methods:

Gave Ruby Access to the "Shadow Bug Fix"

If you find yourself in a situation where the 8.0 M1 shadow bug fix is getting unexpected results, you can turn it off.

Improved Alpha Transparency Control

Fixed Several Bugs

We accidentally introduced some bugs with recent SketchUp releases. So we fixed them in 8.0 M1:

Sketchup::View#pick_helper stopped respecting arguments passed to it. This was breaking the Bezier.rb and BZ Tools plugins. Now fixed.

Sketchup::ConstructionLine#stipple= method now works as documented.

Sketchup::Model#raytest method was occasionally returning incorrect values. We fixed that and added an optional boolean argument to specify whether or not to stop at hidden entities: model.raytest(ray) - ignores entities that are hidden model.raytest(ray, true) ignores entities that are hidden model.raytest(ray, false) stops at entities that are hidden (via hide or on hidden layers)

Sketchup::Color#to_a was returning a Bignum when a Fixnum was expected. A Fixnum is now returned.

What's new in SketchUp 8

Updated Ruby Version to 1.8.6 on PC

The version of the Ruby interpreter that ships with SketchUp has been upgraded to 1.8.6 on PC (still 1.8.5 on Mac). Please note that 1.8.6 includes thousands of bug fixes and stability improvements, but that it also is more strict about syntax. Scripts that work in SketchUp 7.x and earlier may have syntax failures in SketchUp 8.

WebDialog User Agent Updated

It used to be that WebDialogs would send a useragent string unique to SketchUp. We now send a useragent that is a concatenation with the embedded browser's original useragent and an extra string to identity SketchUp. This allows the Google Earth plugin (and similar plugins) to correctly detect the kind of browser so it works properly inside SketchUp.

Observer Bug Fixes

Sketchup::EntitiesObserver#onElementModified now accepts 2 parameters: entities and entity, making it much more useful.

Fixed common crash with Sketchup::EntitiesObserver#onContentsModified Also, Sketchup::EntitiesObserver#onContentsModified renamed to Sketchup::EntitiesObserver#onElementModified for consistency.

The callback Sketchup::MaterialsObserver#onMaterialRemoveAll now deprecated, we recommend using Sketchup::MaterialsObserver#onMaterialRemove instead.

Write Image Size Clamped

Sketchup::View#write_image is now clamped to export a maximum image size of 16000x16000 to prevent freezes.

Timers Work in Smaller Increments

UI.start_timer now accepts values less than 1 second.

New Boolean Methods

::Sketchup::Group and ::Sketchup::ComponentInstance have several new methods for boolean operations:

Sketchup::Face#classify_point updated

Note that the return values for Sketchup::Face#classify_point have changed for SketchUp 8. See the documentation for the list of constants that you should check against. If you have scripts that rely on hard-coded numeric values, you should update them to use constants, instead.

Crashes fixed

Fixed crash in Sketchup::Pages#add and in Sketchup::Model#number_faces.

What's new in SketchUp 7.1

New methods

What's new in SketchUp 7.0 M1

New methods

What's new in SketchUp 7

Improved Script Performance

Ability to perform faster inside start_operation transactions.

go_faster = true
model.start_operation("My Processing", go_faster)
# Do processing here that was slow in SU6
# ...
model.commit_operation

Results from some real world tests, (comparing SU6 to SU7 on the same machine) once the go_faster boolean was added:

Intersect overlaps with 500 overlapping squares 28.4 seconds vs. 26.3 (~92% as long)

Make faces with 500 faceless cubes 21.7 seconds vs. 14.5 (~66% as long)

Windowizer 3.0 with Four 20'x20' windows, 12x12 16.1 seconds vs. 7.0 seconds (~43% as as long)

Windowizer 4.0 with Ten 5'x5' windows, 6x6 22.6 seconds vs 8.7 seconds (~38% as long)

Improved Web Dialogs

Addition of min/max widths.

webdialog.min_width=100
webdialog.max_width=300
webdialog.min_height=500
webdialog.max_height=600

Fixed Mac support for WebDialogs execute_script

webdialog.execute_script('alert("Bug is Fixed!")');

New full_security mode for webdialogs (disables plugins and remote links)

webdialog.set_full_security

Ability to hide home/next/back navigation icons on the Mac

webdialog.navigation_buttons_enabled=true

Cleaner, hash-based syntax for initializing

my_dialog = UI::WebDialog.new(my_settings_hash)

Control Scale Tool Handles

Your script can now control which scale tool handles appear when the user selects a given component.

# Disable the green and red-axes handles
# by setting bits 1 and 2 to 1.
behavior = my_component_definition.behavior
behavior.no_scale_mask = (1 << 1) + (1 << 2)

Load Definitions from the Web, or Save to Disk

Ability to download a definition from URL

model.definitions.load_from_url(url, download_handler)

Ability to Save components to disk from the API

my_definition.save_as(path)

Know More About User Interactions

New methods for detecting "Component Edit" mode

users_current_edit = model.active_path
edit_mode_transform = model.edit_transform

Easily determine if they're running in licensed Pro

is_licensed_pro = Sketchup.is_pro?

New "model level" callbacks in ModelObserver

def onActivePathChanged(model) { # Detect edit mode }
def onPlaceComponent(instance) { # Detect placements }
def onExplode(model) { # Detect group/component explode }
def onBeforeComponentSaveAs(instance) { # Add data on save as }
def onAfterComponentSaveAs(instance) { # Then clean up }

Detect if they've turned off your extension via the AppObserver

def onUnloadExtension(extension_name)

Assorted Improvements Requested by Developers

Delete your scenes via the API

my_page.erase

Keep SketchUp in Synch

UI.refresh_inspectors # force complete UI update
my_definition.refresh_thumbnail # force thumb update
my_definition.invalidate_bounds # force bb update

Measure your groups regardless of their transform

untransformed_bb = my_group.local_bounds

Use middle mouse button in your custom tools

def onMButtonDown(flags, x, y, view) # now works!
def onMButtonUp(flags, x, y, view) # now works!

Send Ruby console output to the standard out If you start up SketchUp from the command line, you can pipe to standard error and see Ruby puts statements appear for you.

Sketchup.exe > myRubyLog.txt

Finally, we fixed a number of crashing bugs, mostly related to iterating across entities in the model.

What's new in SketchUp 6

The most substantial addition to the SketchUp 6 Ruby API are the Ruby Observer Mechanism, the Tools class, the WebDialog class, the Styles class, and the Style class.

Ruby Observer Mechanism

The Ruby Observer Mechanism is designed to allow Ruby scripts to be notified when objects change in the SketchUp application or model. For example, you can create an observer class that "listens" to when SketchUp quits and then performs some action.

Create a Ruby class of a specific observer type, such as AppObserver, override the desired methods, such as onQuit, and add an instance of the observer to the applicable objects in your Ruby script (using the add_observer method for that object). Refer to individual observer interfaces for further information.

Tools Class

The Tools class contains methods to manipulate a collection of SketchUp tools. This class is primarily used to switch between tools through the use of key or mouse actions.

WebDialog Class

The Ruby WebDialog class to create and interact with, DHTML dialog boxes, called webdialogs in this documentation, from Ruby code. For example, you can create webdialogs that are invoked from your Ruby code to display a web site, or to accept user input and use the results in your Ruby code. Styles and Style Classes The Styles class contains methods for manipulating a collection of styles in a model. The Style class contains methods for modifying information about a specific style.

Before SketchUp 6

The core 62 classes of the API were established here. Very few users are on anything before SketchUp 6, so this documentation site focuses only on SketchUp 6 and up.