# \#rubyapi

**URL:** https://forums.sketchup.com/tag/rubyapi/1516.md

[Latest](https://forums.sketchup.com/latest.md) · [Categories](https://forums.sketchup.com/categories.md) · [Tags](https://forums.sketchup.com/tags.md)

---

## [How to read the new (in 2026) roughness invert parameter](https://forums.sketchup.com/t/how-to-read-the-new-in-2026-roughness-invert-parameter/342553)

<div class="topic-metadata">

**Author:** [@marton111](https://forums.sketchup.com/u/marton111)\
**Replies:** 6\
**Last updated:** [December 2, 2025, 8:03am UTC](https://forums.sketchup.com/t/how-to-read-the-new-in-2026-roughness-invert-parameter/342553 "2025-12-02T08:03:16Z")

</div>

Hello, There is a new material parameter in SU 2026, which can invert the roughness map. Is it possible to read the value of this flag from the Ruby API. I don’t see it in the docs. Thanks, Márton

---

## [How can i alter attributes via the Api?](https://forums.sketchup.com/t/how-can-i-alter-attributes-via-the-api/328363)

<div class="topic-metadata">

**Author:** [@Kop](https://forums.sketchup.com/u/Kop)\
**Replies:** 3\
**Last updated:** [May 22, 2025, 6:02pm UTC](https://forums.sketchup.com/t/how-can-i-alter-attributes-via-the-api/328363 "2025-05-22T18:02:38Z")

</div>

Hi there, i am new to SU and looking for a way to alter certain values for a dynamic component via the Ruby console. I created this dynamic model (a rack), which i can alter over the component options window. I tri…

---

## [Explode Tag Folder question](https://forums.sketchup.com/t/explode-tag-folder-question/318749)

<div class="topic-metadata">

**Author:** [@troyhome](https://forums.sketchup.com/u/troyhome)\
**Replies:** 4\
**Last updated:** [March 12, 2025, 5:28pm UTC](https://forums.sketchup.com/t/explode-tag-folder-question/318749 "2025-03-12T17:28:23Z")

</div>

I have a file with many nested tag folders. I want to ‘explode’ all of them so that no folders remain. Right now, I have to right-click each tag folder and select Explode Tag Folder one by one. Since I have around 80 fol…

---

## [ArgumentError: Cannot open instance path with locked sibling instances](https://forums.sketchup.com/t/argumenterror-cannot-open-instance-path-with-locked-sibling-instances/306271)

<div class="topic-metadata">

**Author:** [@killernova](https://forums.sketchup.com/u/killernova)\
**Replies:** 2\
**Last updated:** [December 30, 2024, 7:26pm UTC](https://forums.sketchup.com/t/argumenterror-cannot-open-instance-path-with-locked-sibling-instances/306271 "2024-12-30T19:26:47Z")

</div>

I want to open a component with Ruby API active\_path= method, but it raises an error said ‘Cannot open instance path with locked sibling instances’. I checked the instance path, none is locked. Logs: real active\_path …

---

## [Get local fonts](https://forums.sketchup.com/t/get-local-fonts/284756)

<div class="topic-metadata">

**Author:** [@thammarat.ra](https://forums.sketchup.com/u/thammarat.ra)\
**Replies:** 1\
**Last updated:** [August 10, 2024, 12:01pm UTC](https://forums.sketchup.com/t/get-local-fonts/284756 "2024-08-10T12:01:04Z")

</div>

I want to get a list of fonts, like 3D text. Can Ruby do it?

---

## [SketchUp experiences a period of significant lag after running complex calculations on macos](https://forums.sketchup.com/t/sketchup-experiences-a-period-of-significant-lag-after-running-complex-calculations-on-macos/282902)

<div class="topic-metadata">

**Author:** [@killernova](https://forums.sketchup.com/u/killernova)\
**Replies:** 2\
**Last updated:** [July 25, 2024, 2:12pm UTC](https://forums.sketchup.com/t/sketchup-experiences-a-period-of-significant-lag-after-running-complex-calculations-on-macos/282902 "2024-07-25T14:12:03Z")

</div>

I have a MacBook Pro with an M1 Pro chip and 16GB of memory. After performing complex calculations, the CPU usage immediately reaches 100% and stays there for a while. The more complex the calculation, the longer the lag…

---

## [Rfa to skp file conversion](https://forums.sketchup.com/t/rfa-to-skp-file-conversion/280367)

<div class="topic-metadata">

**Author:** [@tks](https://forums.sketchup.com/u/tks)\
**Replies:** 4\
**Last updated:** [July 4, 2024, 9:28am UTC](https://forums.sketchup.com/t/rfa-to-skp-file-conversion/280367 "2024-07-04T09:28:39Z")

</div>

Hello Community, I have some rfa (Revit family) files and I want to create similar geometry in SketchUp. I’ve few questions and any suggestions are highly appreciated. How can I convert a rfa (Revit family file) file …

---

## [Unable to draw a filled shape with view.draw](https://forums.sketchup.com/t/unable-to-draw-a-filled-shape-with-view-draw/276547)

<div class="topic-metadata">

**Author:** [@switchfuseunit](https://forums.sketchup.com/u/switchfuseunit)\
**Replies:** 5\
**Last updated:** [June 6, 2024, 1:55pm UTC](https://forums.sketchup.com/t/unable-to-draw-a-filled-shape-with-view-draw/276547 "2024-06-06T13:55:10Z")

</div>

I know I’m missing something pretty basic. Essentially, in my custom tool, I want to take the vertices of a selected face and fill it with a color/texture. points = face.vertices geom\_pts = \[\] …

---

## [Learning to Modularize](https://forums.sketchup.com/t/learning-to-modularize/272332)

<div class="topic-metadata">

**Author:** [@cameron2](https://forums.sketchup.com/u/cameron2)\
**Replies:** 7\
**Last updated:** [May 10, 2024, 3:48pm UTC](https://forums.sketchup.com/t/learning-to-modularize/272332 "2024-05-10T15:48:11Z")

</div>

I am learning to write code for SketchUp and over a series of days to successfully script a roller coaster importer from a program called No Limits 2. My code does a bit too much to understand and keep straight at the mo…

---

## [How to export dwg from layout](https://forums.sketchup.com/t/how-to-export-dwg-from-layout/271689)

<div class="topic-metadata">

**Author:** [@27925916](https://forums.sketchup.com/u/27925916)\
**Replies:** 1\
**Last updated:** [May 6, 2024, 4:03pm UTC](https://forums.sketchup.com/t/how-to-export-dwg-from-layout/271689 "2024-05-06T16:03:24Z")

</div>

I find there are api to export skp to dwg ,like Sketchup.active\_model.export("d:/temp.dwg") however, there are not API to export layout to dwg. I only find I find there are api to export skp to dwg ,like Sketchup.activ…

---

## [Career opportunity - Software Developer (V-Ray for SketchUp)](https://forums.sketchup.com/t/career-opportunity-software-developer-v-ray-for-sketchup/223396)

<div class="topic-metadata">

**Author:** [@noel](https://forums.sketchup.com/u/noel)\
**Replies:** 1\
**Last updated:** [April 19, 2023, 10:22pm UTC](https://forums.sketchup.com/t/career-opportunity-software-developer-v-ray-for-sketchup/223396 "2023-04-19T22:22:08Z")

</div>

Hi everyone, I’m team lead for the V-Ray for SketchUp extension and we have a new open position in the team! It’s an awesome project and great fun to work on. If you don’t know the product here is our latest release v…

---

## [How to sign my rbz file](https://forums.sketchup.com/t/how-to-sign-my-rbz-file/206634)

<div class="topic-metadata">

**Author:** [@27925916](https://forums.sketchup.com/u/27925916)\
**Replies:** 4\
**Last updated:** [December 11, 2023, 1:59pm UTC](https://forums.sketchup.com/t/how-to-sign-my-rbz-file/206634 "2023-12-11T13:59:38Z")

</div>

How to encrypt my rbz code file, the encrypted address provided by the official website can’t be found

---

## [Assign material to entity existing in a component instance (imported dwg)](https://forums.sketchup.com/t/assign-material-to-entity-existing-in-a-component-instance-imported-dwg/244270)

<div class="topic-metadata">

**Author:** [@tks](https://forums.sketchup.com/u/tks)\
**Replies:** 12\
**Last updated:** [October 18, 2023, 5:48pm UTC](https://forums.sketchup.com/t/assign-material-to-entity-existing-in-a-component-instance-imported-dwg/244270 "2023-10-18T17:48:47Z")

</div>

Hi Everyone, I got few queries. I’m having a Revit family (.rfa) that I need to use in sketchup (Version 2023). in other wors I need to create a skp file out of the rfa file with all the visible properties (Material/ tr…

---

## [How to debug ruby code against SketchUp](https://forums.sketchup.com/t/how-to-debug-ruby-code-against-sketchup/244590)

<div class="topic-metadata">

**Author:** [@tks](https://forums.sketchup.com/u/tks)\
**Replies:** 1\
**Last updated:** [October 12, 2023, 3:39pm UTC](https://forums.sketchup.com/t/how-to-debug-ruby-code-against-sketchup/244590 "2023-10-12T15:39:59Z")

</div>

Hi Everyone, I’m trying to explore some automation using ruby API. I create a ruby file (.rb) which is located in plugins folder (C:\\Users\\tks\\AppData\\Roaming\\SketchUp\\SketchUp 2023\\SketchUp\\Plugins) and then the plugin…

---

## [Import DWG files using SketchUp API](https://forums.sketchup.com/t/import-dwg-files-using-sketchup-api/243675)

<div class="topic-metadata">

**Author:** [@tks](https://forums.sketchup.com/u/tks)\
**Replies:** 5\
**Last updated:** [October 5, 2023, 10:14am UTC](https://forums.sketchup.com/t/import-dwg-files-using-sketchup-api/243675 "2023-10-05T10:14:56Z")

</div>

Hi Everyone, Is it possible to import a DWG file in SketchUp using ruby API or C API? If possible, kindly suggest how it can be done. I’m exploring the SketchUp API but couldn’t find anything helpful.

---

## [How to find empty spaces in a 2D drawing](https://forums.sketchup.com/t/how-to-find-empty-spaces-in-a-2d-drawing/232222)

<div class="topic-metadata">

**Author:** [@anuragjoshi](https://forums.sketchup.com/u/anuragjoshi)\
**Replies:** 2\
**Last updated:** [June 10, 2023, 5:38am UTC](https://forums.sketchup.com/t/how-to-find-empty-spaces-in-a-2d-drawing/232222 "2023-06-10T05:38:40Z")

</div>

Hi there, I am writing a plugin to generate 2D drawing of 3D model in SketchUp. I am able to generate the 2D elevation(scene) not I want to add dimensions to the 2D. I am stuck in finding the empty spaces in the 2D. He…

---

## [How to create intersection line from selected entities only](https://forums.sketchup.com/t/how-to-create-intersection-line-from-selected-entities-only/231024)

<div class="topic-metadata">

**Author:** [@Game](https://forums.sketchup.com/u/Game)\
**Replies:** 4\
**Last updated:** [May 29, 2023, 12:51am UTC](https://forums.sketchup.com/t/how-to-create-intersection-line-from-selected-entities-only/231024 "2023-05-29T00:51:59Z")

</div>

I am trying to find intersect line between 2 entities, similar to “Intersect With Selection” in SketchUp but currently using intersect\_with function can only do function like “Intersect With Model” for me. As picture…

---

## [Missing intersect edges after intersect\_with](https://forums.sketchup.com/t/missing-intersect-edges-after-intersect-with/225021)

<div class="topic-metadata">

**Author:** [@Game](https://forums.sketchup.com/u/Game)\
**Replies:** 11\
**Last updated:** [March 27, 2023, 12:58pm UTC](https://forums.sketchup.com/t/missing-intersect-edges-after-intersect-with/225021 "2023-03-27T12:58:30Z")

</div>

I’ve been trying to get intersect edges by using intersect\_with method but it seems like there are edges missing from this method. trans1 = Geom::Transformation.new trans2 = @first\_group.transformation g1\_temp = @first\_…

---

## [Place component with dynamic attribute change](https://forums.sketchup.com/t/place-component-with-dynamic-attribute-change/220463)

<div class="topic-metadata">

**Author:** [@sachin.sharma.16516](https://forums.sketchup.com/u/sachin.sharma.16516)\
**Replies:** 5\
**Last updated:** [February 19, 2023, 4:53pm UTC](https://forums.sketchup.com/t/place-component-with-dynamic-attribute-change/220463 "2023-02-19T16:53:41Z")

</div>

when placing component with dynamic attribute .component placed successfully and dynamic attribute value updated in Attribute inspector with resizing not working. def place\_component() path=File.expand\_path(‘…/…/’, di…

---

## [Request for Direct Access to Placed Entities in #place\_component Method](https://forums.sketchup.com/t/request-for-direct-access-to-placed-entities-in-place-component-method/217655)

<div class="topic-metadata">

**Author:** [@indie3d](https://forums.sketchup.com/u/indie3d)\
**Replies:** 7\
**Last updated:** [January 18, 2023, 11:48am UTC](https://forums.sketchup.com/t/request-for-direct-access-to-placed-entities-in-place-component-method/217655 "2023-01-18T11:48:52Z")

</div>

Hi, Why does the #place\_component method in the SketchUp API return the SketchUp::Model instead of the entities placed as an array? In my opinion, returning the placed entities directly would make it easier to perform …

---

## [How to hide page](https://forums.sketchup.com/t/how-to-hide-page/206442)

<div class="topic-metadata">

**Author:** [@27925916](https://forums.sketchup.com/u/27925916)\
**Replies:** 12\
**Last updated:** [August 27, 2022, 7:52am UTC](https://forums.sketchup.com/t/how-to-hide-page/206442 "2022-08-27T07:52:09Z")

</div>

how to hide page ,and hide the tab above?

---

## [How to create camera component and get info from it?](https://forums.sketchup.com/t/how-to-create-camera-component-and-get-info-from-it/205714)

<div class="topic-metadata">

**Author:** [@27925916](https://forums.sketchup.com/u/27925916)\
**Replies:** 5\
**Last updated:** [August 24, 2022, 11:32pm UTC](https://forums.sketchup.com/t/how-to-create-camera-component-and-get-info-from-it/205714 "2022-08-24T23:32:46Z")

</div>

the camera component above ,how to create it by code ruby,and how to get the camera related to this component?

---

## [How should I calculate the scale factor of the pattern\_fill\_scale?](https://forums.sketchup.com/t/how-should-i-calculate-the-scale-factor-of-the-pattern-fill-scale/199712)

<div class="topic-metadata">

**Author:** [@javalitterboy](https://forums.sketchup.com/u/javalitterboy)\
**Replies:** 8\
**Last updated:** [June 7, 2022, 9:10am UTC](https://forums.sketchup.com/t/how-should-i-calculate-the-scale-factor-of-the-pattern-fill-scale/199712 "2022-06-07T09:10:38Z")

</div>

@tt\_su I have a picture of 100px \* 100px. Make it into material (width:600mm height:600mm). When my drawing scale is 1:20, this picture should correspond to the drawing size (width:30mm height: 30mm), then how should …

---

## [Thread isn't working in Sketchup](https://forums.sketchup.com/t/thread-isnt-working-in-sketchup/199838)

<div class="topic-metadata">

**Author:** [@Renjith](https://forums.sketchup.com/u/Renjith)\
**Replies:** 4\
**Last updated:** [May 31, 2022, 9:45am UTC](https://forums.sketchup.com/t/thread-isnt-working-in-sketchup/199838 "2022-05-31T09:45:35Z")

</div>

Can we use thread concept in sketchup ruby api ? Once when I tried so, it wasn’t working as expected. Any suggestions ?

---

## [Layout AutoTextDefinition Start Page for \<PageNumber\>](https://forums.sketchup.com/t/layout-autotextdefinition-start-page-for-pagenumber/145991)

<div class="topic-metadata">

**Author:** [@3DModeled](https://forums.sketchup.com/u/3DModeled)\
**Replies:** 2\
**Last updated:** [May 24, 2022, 7:12pm UTC](https://forums.sketchup.com/t/layout-autotextdefinition-start-page-for-pagenumber/145991 "2022-05-24T19:12:56Z")

</div>

How do I get the setting value of the Start Page? In the AutoTextDefinition part of the api the following settings are available. page\_number\_style start\_index I do not see an option for Start Page.

---

## [Distance\_to\_line without treating the line as infinite](https://forums.sketchup.com/t/distance-to-line-without-treating-the-line-as-infinite/197651)

<div class="topic-metadata">

**Author:** [@maxpleaner](https://forums.sketchup.com/u/maxpleaner)\
**Replies:** 2\
**Last updated:** [May 5, 2022, 11:14am UTC](https://forums.sketchup.com/t/distance-to-line-without-treating-the-line-as-infinite/197651 "2022-05-05T11:14:14Z")

</div>

I am measuring the distance between points (the center of the circles) and lines (marked in blue) using Point3d#distance\_to\_line. Since this method treats lines as infinite, both cases give the same result (zero). How…

---

## [Undoing things (start\_operation and commit\_operation)](https://forums.sketchup.com/t/undoing-things-start-operation-and-commit-operation/194126)

<div class="topic-metadata">

**Author:** [@marcosyu](https://forums.sketchup.com/u/marcosyu)\
**Replies:** 4\
**Last updated:** [March 29, 2022, 1:56pm UTC](https://forums.sketchup.com/t/undoing-things-start-operation-and-commit-operation/194126 "2022-03-29T13:56:33Z")

</div>

So I have an action on my plugin that sets multiple attribute dictionary value via the set\_attribute command. This populates my undo list because every attribute that I add it adds Undo property is there a way to make th…

---

## [A bug about section plane](https://forums.sketchup.com/t/a-bug-about-section-plane/193944)

<div class="topic-metadata">

**Author:** [@javalitterboy](https://forums.sketchup.com/u/javalitterboy)\
**Replies:** 1\
**Last updated:** [March 25, 2022, 7:45am UTC](https://forums.sketchup.com/t/a-bug-about-section-plane/193944 "2022-03-25T07:45:48Z")

</div>

there should not be an activated section !!! test.skp (6.0 MB)

---

## [My code is not running, and I don't know what is wrong](https://forums.sketchup.com/t/my-code-is-not-running-and-i-dont-know-what-is-wrong/191147)

<div class="topic-metadata">

**Author:** [@JohnLee](https://forums.sketchup.com/u/JohnLee)\
**Replies:** 6\
**Last updated:** [March 2, 2022, 11:37am UTC](https://forums.sketchup.com/t/my-code-is-not-running-and-i-dont-know-what-is-wrong/191147 "2022-03-02T11:37:19Z")

</div>

hi~I’m John,. I try to make the face I select follow the specified path with ruby code, but it did not work. what should i do? mod = Sketchup.active\_model ent = mod.entities edges = model.selection.grep(Sketchup::Ed…

---

## [Is there a way to select the SU selection tool?](https://forums.sketchup.com/t/is-there-a-way-to-select-the-su-selection-tool/163164)

<div class="topic-metadata">

**Author:** [@adrianh](https://forums.sketchup.com/u/adrianh)\
**Replies:** 19\
**Last updated:** [February 21, 2022, 3:56pm UTC](https://forums.sketchup.com/t/is-there-a-way-to-select-the-su-selection-tool/163164 "2022-02-21T15:56:38Z")

</div>

I’d like to have a fallback that would jump to the selection tool in case of some fairly severe failure. Is that possible?

[Next page](https://forums.sketchup.com/tag/rubyapi/1516.md?match_all_tags=true&page=1&tags%5B%5D=rubyapi)
