Class: SketchupExtension
- Inherits:
-
Object
- Object
- SketchupExtension
Overview
By default Extension Warehouse encrypts extensions and convert .rb files to .rbe files. Omit the file extension to let SketchUp look for both.
A SketchUp extension is a piece of software that extends the capabilities of SketchUp. It could be a new drawing tool, a content library or a way to automate a tedious and time consuming task.
The SketchupExtension handles the extension metadata, such as name, author and version, as well as a path to the main Ruby file with the actual functionality you want to add.
Instance Method Summary # collapse
-
#check ⇒ Boolean
Loads the extension, meaning the underlying ruby script is immediately interpreted.
-
#copyright ⇒ String
The #copyright method returns the copyright string which appears beneath an extension inside the Extensions Manager dialog.
-
#copyright=(copyright) ⇒ String
The #copyright= method sets the copyright string which appears beneath an extension inside the Extensions Manager dialog.
-
#creator ⇒ String
The #creator method returns the creator string which appears beneath an extension inside the Extensions Manager dialog.
-
#creator=(creator) ⇒ String
The #creator= method sets the creator string which appears beneath an extension inside the Extensions Manager dialog.
-
#description ⇒ String
The #description method returns the long description which appears beneath an extension inside the Extensions Manager dialog.
-
#description=(description) ⇒ String
The #description= method sets the long description which appears beneath an extension inside the Extensions Manager dialog.
-
#extension_path ⇒ String
The #extension_path method returns the file system path to the extension's outer rb file.
-
#id ⇒ String
The #id method returns the Extension Warehouse ID string.
-
#initialize(title, path) ⇒ SketchupExtension
constructor
The new method is used to create a new SketchupExtension object.
-
#load_error ⇒ Exception?
Return the Ruby load error for an extension that failed to load.
-
#load_on_start? ⇒ Boolean
Returns whether the extension is set to load when SketchUp starts up.
-
#loaded? ⇒ Boolean
Returns whether the extension is currently loaded, meaning the actual ruby script that implements the extension has been evaluated.
-
#name ⇒ String
The #name method returns the name which appears for an extension inside the Extensions Manager dialog.
-
#name=(name) ⇒ String
The #name= method sets the name which appears for an extension inside the Extensions Manager dialog.
-
#registered? ⇒ Boolean
Returns whether the extension has been registered via Sketchup.register_extension.
-
#uncheck ⇒ Boolean
Unloads the extension.
-
#version ⇒ String
The #version method returns the version which appears beneath an extension inside the Extensions Manager dialog.
-
#version=(version) ⇒ String
The #version= method sets the version which appears beneath an extension inside the Extensions Manager dialog.
-
#version_id ⇒ String
The #version_id method returns the Extension Warehouse Version ID string.
Constructor Details
↑ #initialize(title, path) ⇒ SketchupExtension
It is recommended to omit the file extension provided in the path argument. SketchUp will resolve the file extension to .rbe, .rbs or .rb.
The new method is used to create a new SketchupExtension object. Note that once the extension object is created, it will not appear in the Extension Manager dialog until your register it with the Sketchup.register_extension method.
Instance Method Details
↑ #check ⇒ Boolean
Loads the extension, meaning the underlying ruby script is immediately interpreted. This is the equivalent of checking the extension's checkbox in the Extension Manager.
↑ #copyright ⇒ String
The #copyright method returns the copyright string which appears beneath an extension inside the Extensions Manager dialog.
↑ #copyright=(copyright) ⇒ String
The #copyright= method sets the copyright string which appears beneath an extension inside the Extensions Manager dialog.
↑ #creator ⇒ String
The #creator method returns the creator string which appears beneath an extension inside the Extensions Manager dialog.
↑ #creator=(creator) ⇒ String
The #creator= method sets the creator string which appears beneath an extension inside the Extensions Manager dialog.
↑ #description ⇒ String
The #description method returns the long description which appears beneath an extension inside the Extensions Manager dialog.
↑ #description=(description) ⇒ String
The #description= method sets the long description which appears beneath an extension inside the Extensions Manager dialog.
↑ #extension_path ⇒ String
The #extension_path method returns the file system path to the extension's outer rb file.
↑ #load_error ⇒ Exception?
Return the Ruby load error for an extension that failed to load.
↑ #load_on_start? ⇒ Boolean
Returns whether the extension is set to load when SketchUp starts up.
↑ #loaded? ⇒ Boolean
Returns whether the extension is currently loaded, meaning the actual ruby script that implements the extension has been evaluated.
↑ #name ⇒ String
The #name method returns the name which appears for an extension inside the Extensions Manager dialog.
↑ #name=(name) ⇒ String
The #name= method sets the name which appears for an extension inside the Extensions Manager dialog.
↑ #registered? ⇒ Boolean
Returns whether the extension has been registered via Sketchup.register_extension.
↑ #uncheck ⇒ Boolean
Unloads the extension. This is the equivalent of unchecking the extension's checkbox in the Extension Manager > Extensions list.
Note that technically the extension is not “unloaded” in the sense that it stops running during the current SketchUp session, but the next time the user restarts SketchUp, the extension will not be active.
↑ #version ⇒ String
The #version method returns the version which appears beneath an extension inside the Extensions Manager dialog.
↑ #version=(version) ⇒ String
The #version= method sets the version which appears beneath an extension inside the Extensions Manager dialog.
↑ #version_id ⇒ String
The #version_id method returns the Extension Warehouse Version ID string.