Extensions in Layout SU 2022-2023

I haven’t looked at the Ruby API for Layout for a while simply because I didn’t think it was ready for prime time. I guess I’m a little unclear on the status of the API for Layout.

My question is can it be used in an open Layout document now, in other words can we create extensions in Layout now, can we use the API within an open Layout document? If so this is exciting news.

1 Like

At the moment the C API is only for reading and writing LayOut file. LayOut doesn’t have an API interface within the running application at this point.

Has this changed?

At the moment, still (https://ruby.sketchup.com/file.LayOut.html:)
“developers may utilize the LayOut Ruby API from within their SketchUp application via the console, or in their SketchUp Ruby extension”, but not in Layout natively.

So you can read and manipulate Layout file within your Extension - or from Ruby Console - in SketchUp but you can not save the changes, if the Layout document is opened in Layout. (You will get an error: Error: #<ArgumentError: Could not write to file>)

And, still: LayOut doesn’t have an API interface within the running application at this point.

As far as I now, this will not change in SU-Layout 2023.

2 Likes