
On This Page…
Description

This experimental tool can use various AI (artificial intelligence) services like OpenAI, Google, Anthropic (and others) for a variety of purposes in SketchUp: It can generate SketchUp Ruby code that – when executed – can draw geometry (e.g. with the prompt “Draw a box”). It can also manipulate drawn objects (e.g. with a command like “Color all objects in the selection randomly using five blue tones”). You can also use it to interact with the AI services using chat-like, text-only prompts like “Tell me a joke” or “How does the follow-me tool work in SketchUp”. With current models, you can even chat about what is visible in your SketchUp model or include a file upload in your request.
PLEASE NOTE: This is an experimental extension, which is able to fully automate SketchUp using its Ruby scripting engine (if code execution is enabled). This can even affect your entire file system because SketchUp has unrestricted, user level access to that. Use with caution and at your own risk! When in doubt, do not enable code execution in the extension’s settings (it is disabled by default).
Any AI generated content may contain errors, fabrications, or may not be usable at all. Use any generated content at your own discretion. Therefore, use this tool with caution and experiment with prompts if you run into errors. Sometimes it helps to simply re-word the prompt.
This extension is not affiliated with or endorsed by OpenAI or any of the other services mentioned.
Usage
You can launch the main dialog for this extension with the Extensions > AI Explorer (Experimental) > AI Explorer Dialog menu item.
Before You Start
Before you can use this tool, you must sign up for OpenAI API access and generate an API Key here. This requires you to set up an account with OpenAI and may lead to costs (after they typically give you a free trial period). You then need to enter the API key that OpenAI provides in this extension’s settings and you are good to go. All of the other settings are pre-configured for OpenAI’s services and can stay as they are for now.

You can find the Options panel by clicking on the Options button in the AI Explorer dialog. However, you will also be prompted to enter the API Key if you haven’t done so.
ADVANCED:
See this extension’s Reference Manual if you want to use a different AI service (e.g. Google’s Gemini or Anthropic’s Claude).
AI Explorer Dialog
This extension features a chat-like interface where you can enter a prompt (e.g. “Draw a line”) and then the full user prompt (as it was submitted to the AI service) as well as the response are shown (and retained in the chat history as long as the dialog remains open). This makes it easy to add subsequent queries. You can use the Options button to bring up the settings panel and make changes on the fly (e.g. if you want to switch code execution on or off between requests). Make sure you read the Reference Manual to understand in detail what can be entered in this panel.


TIP:
The input field in this dialog should work well with your operating system’s built-in speech-to-text functionality. For example, in Windows, use the + H key combination to bring up a microphone input.
This dialog’s main user interface items are explained below – keyed to the image:

- This is where you can enter your prompt.
- The Go button (or the return key) sends the prompt to the AI service.
- This selection dropdown lets you change use cases quickly on the fly. Changing this dropdown only affects the relevant settings options (e.g. whether code gets executed) and leaves others (e.g. the AI model name) unchanged.
- The button clears the dialog and lets you begin a completely new conversation.
- The button lets you attach either a PDF or a Ruby RB file. You can reference that file then in your prompt.
- The Options button lets you change this extension’s settings. See the Reference Manual for an extensive description of those.
For more detailed instructions, visit the AI Explorer (Experimental) Reference Manual
Did you find this extension useful? Contribute to its development with any amount (via Paypal).
Use Cases
You can use the main dialog drop-down selector to switch these anytime. Alternatively, you can use the Option panel’s settings to adjust settings manually. Behind the scenes, these use cases only affect the following settings: System message, execute code, submit model view with request.
Case 1: Chat and Q&A

Use this to ask the AI anything that does not necessarily generate code (e.g. “Tell me a joke”). You can this way use the AI service’s regular chatbot behavior, e.g. to explain how something works in SketchUp (e.g. “How can I draw a sphere?”).
Keep in mind, though, that AI models have a knowledge cutoff date and are not by themselves always useful as a “search replacement”. Therefore, newer features are often not covered well. At this point, search is also not implemented specifically in this extension.
Case 2: Chat About the Model (Including Screenshot)

This will send the current model view to the AI service with your prompt. Use it to ask questions about what is visible in the model, like the example shown here. Other examples that I have tested successfully are:
- “Count the number of cars in the model.” (Note, however, that model view quality may affect this since low quality (the default) has a lower resolution.)
- “Is this model 3D printable?” (You may want to include at least one dimension in the view so that the scale is understandable.)
- “Critique this architectural design.” (This can be used for crit-prep.)
Case 3: Generate Ruby Code for Editing (i.e. as a Coding “Copilot”)

Use this to generate Ruby code that you can then copy and paste into your favorite code editor (e.g. my Ruby Code Editor) where you can further edit and execute it. You can use this to create and look up code snippets.
As of version 3.1 you can upload a Ruby file with your prompt. This way, you can ask for code improvement suggestions.
Case 4: Manipulate SketchUp (i.e. Create or Modify Geometry)

Use this to draw or manipulate something based on your prompt and what you have selected in SketchUp. This lets you control SketchUp with natural language (e.g. “Draw a box”). Note that this works better with simple and specific commands than with complex concepts (that would include multiple modeling steps, such as “Draw a house”). Rather, break up complex modeling tasks into simple steps. Also, be very careful with requests that delete something.
To give you some examples, following is a list of prompts that I have used successfully:
- “Draw a box” (these often get drawn downward from the origin because the positive pushpull operation uses a face’s white face)
- “Color the items in the selection randomly in five different blue tones” (selecting something and then asking the AI to modify those seems to work very well)
- “Scale each item in the selection randomly in the z direction” (similar behavior)
- “Replace the selected line with a construction line” (works, but only on a single line)
- “Select all vertical faces in the model” (you can even have the AI select things based on a property like this)
- “Clear the selection. Then select all the components whose name includes ‘sphere'” (works best if you clear the selection first)
- “Create a new material that is aquamarine” (color materials work well but textured materials don’t as they need access to image files)
- “Add a new layer called ‘Walls'” (because the API uses “layer” instead of “tag” you will need to use the word layer here)
- “Add a new lyaer called ‘Walls'” (it understands typos correctly!)
- “Add a new scene tab with a single line of code” (adding “with a single line of code” often prevents the AI from trying to address all the options with the response, cutting down on tokens)
- “Draw a grid of 100 12 inch boxes, spaced at 24 inches” (correctly draws a 10 x 10 grid of boxes)
- “List the center points of all the objects in the selection” (this will print the coordinates to the Ruby Console using the puts command. Make sure you have the console open before you run this command)
- “List all the unique vertices in the selection” (similar)
- “Randomly erase 50% of the selected objects” (this works, but as mentioned before: use with caution)
- “Open the SketchUp website” (opens the website in a browser, same for the 3D Warehouse)
- “Zoom extents” (you can even control the view)
- “Zeichne 10 x 10 50cm Quadrate auf den Boden mit 50cm Abstand” (you can use languages other than English and various unit systems)
- “Add a menu item that draws a parametric pyramid. Ask for the base and the height” (you can even ask for this to install as an extension)
- “Color the selected faces in 10 shades between blue and yellow showing their height (considering the selection’s minimum and maximum values)” (you can use this for analysis)
A Word About Cost
This section is specific to OpenAI. Check with other providers for their respective costs.
There is no cost to getting and using this extension. However, in order to be able to use OpenAI’s services, you need to sign up with the OpenAI Platform here. This is also free and you typically get a token credit so that you can try everything out for a while. After that period ends, you will need to add funds to your OpenAI account, however.
IMPORTANT:
A ChatGPT Plus subscription does not include API (Platform) access. You will need to make sure you have funds under the API Platform as well. You can check that here.
In my experience, simply adding $5 to the OpenAI Platform account is plenty for a lot of use, especially if you work with the cheaper models. I have had days where I barely used a cent’s worth. When you compare this with a $20 monthly ChatGPT Plus subscription, you will see that this is also a more cost efficient way to use their services. This is because you can test out many different models, have more control over how you use those (i.e. with the system message), and – best of all – pay by use (instead of a flat fee).
See below for some current costs:
| Model | Input Cost | Output Cost |
|---|---|---|
| gpt-5 | $1.25 / 1M tokens | $10.00 / 1M tokens |
| gpt-4.1 | $2.00 / 1M tokens | $8.00 / 1M tokens |
| gpt-4.1-mini | $0.40 / 1M tokens | $1.60 / 1M tokens |
| gpt-4.1 image (3000 x 2000, low-res) | $0.00017 | N/A |
| gpt-4.1 image (3000 x 2000, high-res) | $0.00221 | N/A |
Please Note: I am providing this cost information as a courtesy. Of course, actual costs and your relationship with OpenAI is between you (the user) and them.
Screenshots and Videos












Extension Terms and Conditions
BY INSTALLING, ACCESSING OR USING THIS SOFTWARE, YOU (THE USER) AGREES TO BE BOUND BY THE TERMS AND CONDITIONS AS PROVIDED BELOW.
LICENSE:
This is free software, provided under the GPL license (https://www.gnu.org/licenses/gpl-3.0.html).
(c) Alexander Schreyer, alexschreyer.net
DISCLAIMER:
THIS SOFTWARE IS PROVIDED ‘AS IS’ AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR OR ANY COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF OR IN CONNECTION WITH THIS SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS SOFTWARE.
WHERE APPLICABLE, THIRD-PARTY MATERIALS AND THIRD-PARTY PLATFORMS ARE PROVIDED ‘AS IS’ AND THE USER OF THIS SOFTWARE ASSUMES ALL RISK AND LIABILITY REGARDING ANY USE OF (OR RESULTS OBTAINED THROUGH) THIRD-PARTY MATERIALS OR THIRD-PARTY PLATFORMS.
Downloads and Installation
You can now find this extension in Trimble’s Extension Warehouse. For an easy install (and update notifications), browse to it from inside SketchUp (2013 or newer) and install it directly.
Alternative Downloads
Linked below are the installation files (RBZ format) for the current and some previous versions of this extension. You can also find this extension on GitHub.
IMPORTANT: After updating, you may need to reset the extension’s settings (under the extension’s menu items).
- as_openaiexplorer_3-2.rbz- 3.2
- as_openaiexplorer_3-1.rbz- 3.1
- as_openaiexplorer_3-0-1.rbz- 3.0.1
- as_openaiexplorer_3-0.rbz- 3.0
- as_openaiexplorer_2-7.rbz- 2.7
- as_openaiexplorer_2-6.rbz- 2.6
- as_openaiexplorer-2_5.rbz- 2.5
- as_openaiexplorer_2-4.rbz- 2.4
- as_openaiexplorer_2-3.rbz- 2.3
- as_openaiexplorer_2-2.rbz- 2.2
- as_openaiexplorer_2-1.rbz- 2.1
- as_openaiexplorer_2-0.rbz- 2.0
- as_openaiexplorer_1-0-3.rbz- 1.0.3
- as_openaiexplorer_1-0-2.rbz- 1.0.2
- as_openaiexplorer_1-0-1.rbz- 1.0.1
- as_openaiexplorer_1-0.rbz- 1.0
TIP: Installing Extensions as RBZ files in SketchUp
To install these files, follow the SketchUp folks’ instructions.
Revision History
- Version 3.2 (12/15/2025):
– Added reasoning_effort parameter for thinking models
– Added menu option to edit default system messages
– Prevented multiple dialog instances
– Adjusted default settings
– Cleaned up menu items
– Added setting to show/hide raw data output in console, off by default - Version 3.1 (10/1/2025):
– Changed UI to use Bootstrap 5 instead of raw CSS, included all files locally
– Added dark mode switch
– Added code rendering and highlighting
– Changed settings dialog to be integrated into main dialog
– Changed onboarding routine for API key
– Added file upload support for PDF and RB files (only works with OpenAI for now)
– Implemented better error handling for non-OpenAI services
– Fixed max_completion_tokens parameter to improve compatibility - Version 3.0.1 (4/26/2025):
– Added Help link to main dialog
– Cleared up purpose of raw output in console
– Added a better TOU dialog design
– Changed default model to gpt-4.1-mini - Version 3.0 (3/13/2025):
– Renamed to AI Explorer (Experimental)
– Added option to use other OpenAI-compatible services (using the OpenAI API standards), e.g. Google or Anthropic via their API endpoints.
– Minor cleanups - Version 2.7 (11/4/2024):
– Added feature to capture and show Ruby output (e.g. for lists)
– Adjusted TOU and added TOU link to dialog
– Adjusted defaults (extension starts in chat mode)
– Minor fixes - Version 2.6 (11/2/2024):
– Added use case selector to main dialog (to speed things up)
– Fix for initial API Key link error
– Now executes code under toplevel binding in case the code includes methods
– Fix for text rendering in output - Version 2.5 (10/1/2024):
– Changed default model to gpt-4o-mini
– Fix for HTML rendering of output (b,i,h2+,code)
– Added menu item for usage/cost check
– Made thumbnail appearance stretchable
– Fixed ‘no code available’ error
– Code cleanup - Version 2.4 (7/1/2024):
– Now renders bold text and code visually in responses
– Better response handling
– Dialog now always opens centered
– Dialog now includes thumbnail if it was submitted with the prompt. - Version 2.3 (5/18/2024):
– Updated some defaults
– Updated button design
– Added AI “memory”. User can now select how many messages get sent to OpenAI.
– Added screenshot image upload for vision-capable models (e.g. gpt-4o)
– Added resolution control for uploaded images - Version 2.2 (12/9/2023):
– Implemented correct system message handling as per OpenAI API
– Added system message to prevent file access when code is to be executed
– Updated default system message
– Added menu item to reset extension settings (for troubleshooting) - Version 2.1 (9/23/2023):
– Better error handling
– Fixed gpt-4 markdown extraction issue
– Added a timer
– Set a 30 seconds read timeout for hung requests - Version 2.0 (7/23/2023):
– Created dialog-based input for more chat-like experience
– Moved error reporting into dialog to reduce pop-ups - Version 1.0.3 (7/19/2023):
– Added license/disclaimer file
– Added better license display on first use
– Added link to OpenAI TOU to menu
– Reverted the prompt prefix to a text box (user can now enter anything)
– Disabled code execution as the default (can be turned on in settings)
– Changed from OpenAI completion model to chat model (OpenAI changes) - Version 1.0.2 (3/28/2023):
– Fixed error handling bug
– Added a double-check for delete requests - Version 1.0.1 (3/24/2023):
– Added cleanup for the returned code/text
– Added error handling for API and a one-time warning for the extension - Version 1.0 (3/18/2023):
– Initial release
References
- OpenAI chat completion reference
- OpenAI chat completion API reference
- My initial post about this
- Adding AI Vision to SketchUp with OpenAI’s gpt-4o Model
Show Off Your Work
Did you create something amazing with this extension? I would love to see it! You can either upload an image in the comment section below (public) or privately send it to me.