Create LayOut File
This sample creates one LayOut page for each SketchUp scene.
Create LayOut File

This sample extension creates one LayOut page for each scene in your current SketchUp model.

(Note: This extension requires SketchUp 2016 or 2017 M2)

Instructions

After installing the extension, the “Create LayOut File from Scenes” command will be located under SketchUp’s Extension menu.

To use the script, set up your scenes in SketchUp, save your model and run the “Create LayOut File from Scenes” command. Then pick your paper size and orientation.

The LayOut document will be created in the same folder as your current SketchUp model, with the same name as the model and paper size appended. For example, MyModel.skp exported to an A4 sheet of paper will yield a LayOut document titled “MyModel - A4.layout”.

If your model has 20 scenes, your new LayOut file will have 20 pages, each conveniently labeled with the appropriate scene name. SketchUp viewports are placed on a ‘Models’ layer; page titles are placed on a ‘Text’ layer.

Once in LayOut, keep the pages you want and delete the rest. You can tweak settings to make each view look the way you want, and quickly set scales for orthographic viewports. Print, export or annotate to your heart’s content. If you’re new to LayOut, you may want to check out the LayOut section of the Help Center.

Notes

1) This sample extension shows developers that LayOut’s C API can be used in conjunction with SketchUp’s Ruby API to create a LayOut document.

2) This extension will run in SketchUp Pro only, since LayOut is required to view the .layout file.

Reviews

Help! Once created the scene, set the layout, I click ok, but I can't find the layout! I can't find find the file .my model

Dan Rathbun's picture

2017-02-23 version 2.0.0 posted. Works with SketchUp Pro 2016 and 2017 M2.

Galin G's picture

Thanks! Good job! work fine with 2017 x64

Galin G's picture

Working fine on SU2016 x64. It will be awesome to be updated to SU2017

Doesn't work in SU 2017 (supposed to work in SU 2016+, right?) When I open SU 2016 and try to dowload it (install option not available), I get this error message:

Something went wrong during the authentication process.
Please contact system administrator. Reference ID: 69d946f6-146d-4e0a-b661-afde8c0efed8

Any idea what's up with this?

Seems like a useful extension. Would be nice to get it working.

SketchUp Team's picture

This extension example uses binaries that needs to be updated with SketchUp 2017.

Alfredo R's picture

Will you have an updated version for 2017 anytime soon?

Dan Rathbun's picture

Create LayOut File from Scenes

Forum thread for talk, bugs & feature requests:
http://forums.sketchup.com/t/create-layout-file-from-scenes-talk-bugs-fe...

Dan H's picture

Hi Dan, I use Create LayOut File from Scenes all the time in Sketchup Pro 16, it's great and so useful. Will you be porting it to 2017.

All the best,

Dan

Dan Rathbun's picture

Hi, Dan. I do not work for Trimble, so I will not be doing the porting myself.

Lynne V's picture

The plug in does what it says: my scenes opened up quickly in layout but NOT on my preferreed template....just on blank pages. How do I get them to open on my favorite template ? It's set up with the same size paper and orientation, why not with my tiltle block and logo?

ilya S.'s picture

How to make a scene added with a specific user template?

Francisco B's picture

I have SketchUp 2016 and I am on a macbook pro with 16gygs of RAM and the fastest processor.
Scenes to Layout seems to be taking forever and nothing is happening . I have 16 scenes and the beach ball has been rollin for over 30 minutes now....

SketchUp and Layout for Mac is horrible. I've been using sketchup for close to 10 year always on Windows. One company I worked for was using macs so i used it for a year and it was a painful experience. It is extremely slow compared to win version. I tried to optimize it but nothing. Its fine when you have few rectangles drawn but once you get to more complex geometry it get constantly stuck for 30 sec - 1min. Never ever had that happen on Windows. My mac was i7 16gb or ram and my windows was surface i5 with 2GB or ram and poor dedicated graphics card and the Surface still ran Sketchup better not only that it rendered faster in vRay as well.

Colby P's picture

I'm using it in 2016 pro and it does not work for me either. It created a layout file, and I can open it, and that file has a page for every scene, but there is nothing on those pages but yellow signs with an exclamation mark in the lower right. I have tried refreshing (update model reference) and that didn't work. Anyone know what could be wrong?

I am also having no luck with the built-in feature for exporting to layout. It will not export the current scene, and seems to choose one at random and then keeps sending the same one no matter what I try. I had hoped when the plugin would not work I could at least move all my scenes in a more time-consuming way, but now I don't see any option at all for moving the scenes to layout.

CMD's picture
CMD

Colby

My first suggestion is to figure out what is going on with the default "Send to Layout" feature in SketchUp. That would be my priority as it is probably the reason the extension is not working. I would suggest going to http://forums.sketchup.com and posting the issue there so the community can help you. They are extremely responsive.

CMD

Archikton ..'s picture

Nice tool but list of paper sizes too limited.A possible fix could be an option that allows custom paper sizes.

D.Bur's picture

Hi Archikton,

You can easily add your custom paper sizes (I wonder why the SketchUp team did'nt...)
Browse your disk to find your "su_create_layout_file" folder.

Typically on a PC it looks like:
C:\Users\YOUR_NAME\AppData\Roaming\SketchUp\SketchUp 2016\SketchUp\Plugins\su_create_layout_file

In the following, I've added A0 and A1 paper sizes to the menu. Copy-paste the lines below in a text editor, and save the file as "main.rb" (make a backup of the original first, one never knows...)
Restart SketchUp and you'll find A0 and A1 in the paper size menu ;-)

# start copy here

# Copyright 2015, Trimble Navigation Ltd.

require 'sketchup.rb'

module Trimble::CreateLayOutFile

def self.run
model = Sketchup.active_model
if model.nil?
UI.messagebox(LH["There must be an active model to run this extension."])
return
end

model_path = model.path
if model_path.empty?
UI.messagebox(LH["The model must be saved prior to running."])
return
end

a0 = "A0 (841 mm x 1189 mm)"
a1 = "A1 (594 mm x 841 mm)"
a2 = "A2 (420 mm x 594 mm)"
a3 = "A3 (297 mm x 420 mm)"
a4 = "A4 (210 mm x 297 mm)"
archA = LH["Arch A"]
archA_full = archA + " (9 in x 12 in)"
archB = LH["Arch B"]
archB_full = archB + " (12 in x 18 in)"
archC = LH["Arch C"]
archC_full = archC + " (18 in x 24 in)"
letter = LH["Letter"]
letter_full = letter + " (8.5 in x 11 in)"
tabloid = LH["Tabloid"]
tabloid_full = tabloid + " (11 in x 17 in)"
landscape = LH["Landscape"]
portrait = LH["Portrait"]

prompts = [LH["Paper Size"], LH["Orientation"]]
defaults = [a2, landscape]
list = ["#{a0}|#{a1}|#{a2}|#{a3}|#{a4}|#{archA_full}|#{archB_full}|#{archC_full}|#{letter_full}|#{tabloid_full}",
"#{landscape}|#{portrait}"]
input = UI.inputbox(prompts, defaults, list, LH["Choose Paper Options"])

# Create the output path for the layout file, we will name it the same as
# the .skp, but append the output paper size.
dir_path = File.dirname model_path
file_name = File.basename(model_path, ".skp") + " - "

paper_size = [8.5, 11]
if (false == input)
return
else
if (a2 == input[0])
paper_size = [420 / 25.4, 594 / 25.4]
file_name = file_name + "A2"
elsif (a0 == input[0])
paper_size = [841 / 25.4, 1189 / 25.4]
file_name = file_name + "A0"
elsif (a1 == input[0])
paper_size = [594 / 25.4, 841 / 25.4]
file_name = file_name + "A1"
elsif (a3 == input[0])
paper_size = [297 / 25.4, 420 / 25.4]
file_name = file_name + "A3"
elsif (a4 == input[0])
paper_size = [210 / 25.4, 297 / 25.4]
file_name = file_name + "A4"
elsif (archA_full == input[0])
paper_size = [9, 12]
file_name = file_name + archA
elsif (archB_full == input[0])
paper_size = [12, 18]
file_name = file_name + archB
elsif (archC_full == input[0])
paper_size = [18, 24]
file_name = file_name + archC
elsif (letter_full == input[0])
paper_size = [8.5, 11]
file_name = file_name + letter
else
paper_size = [11, 17]
file_name = file_name + tabloid
end
end

file_name = file_name + ".layout"
layout_path = File.join(dir_path, file_name)

# Check if we should be in portrait or landscape mode.
if (landscape == input[1])
temp = paper_size[0]
paper_size[0] = paper_size[1]
paper_size[1] = temp
end

# Require the appropriate .so/.bundle file depending on platform
lib_version = "1.0" # Must rev this if we update the .so files.
if (Sketchup.platform == :platform_win)
pointer_size = ['a'].pack('P').size * 8
path = File.join(PATH, "lib", lib_version, "win#{pointer_size}")
lib = File.join(path, "CreateLayOutFile.so")
require lib
else
path = File.join(PATH, "lib", lib_version, "mac")
lib = File.join(path, "CreateLayOutFile.bundle")
require lib
end

begin
create_layout_doc(model_path, layout_path, paper_size)
rescue PageSizeError
UI.messagebox(LH["Error: Invalid Paper Size!"])
rescue LoadModelError
UI.messagebox(LH["Error: Loading SketchUp Model!"])
rescue AddModelError
UI.messagebox(LH["Error: Adding SketchUp Model to the LayOut Document!"])
rescue SaveDocError
UI.messagebox(LH["Error: Saving LayOut Document!"])
else
message = LH["Success! The LayOut file was saved as %s"\
" in the same folder as the SketchUp file."]
UI.messagebox(message % ["\n\"#{file_name}\"\n"])
end

end

unless file_loaded?("Create LayOut")
menu = UI.menu("Plugins")

# Create LayOut Document
cmd = UI::Command.new(LH["Create LayOut File from Scenes"]) {
self.run
}
cmd.set_validation_proc { MF_ENABLED }
cmd.tooltip = LH["Create a LayOut document for the active model."]
menu.add_item(cmd)

file_loaded("Create LayOut")
end

end # CreateLayOut

# end copy here

Archikton ..'s picture

Sorry for the long gap between your response and this one. Wasn't able to get those additional paper sizes. I tried my best to follow the instructions you gave but was extremely frustrating for me.Hopefully someone will update it at some point. I do it the manual way lol.

Iván J. T.'s picture

"SketchUp Pro 2014" (32bit version on a 64bit computer ) user here. While this extension seems awesome, it is not working at all for me. After setting my scenes and saving my model, I proceed to click: Pluggins > Create LayOut File From Scenes > Paper Size: Tabloid, Orientation: Landscape > OK. ...but nothing happens.

I go to the file that contains my model but there is no LayOut document there. I've used the seach tool on my computer and can't find anything created either. My computer is a 64bit AsusROG 2015 laptop, running Windows 8.1

Is anyone else having this problem? :/

CMD's picture
CMD

Ivan

If you look at the SketchUp Compatibility section on this page, you will see that this extension example was developed for SketchUp 2016 only.

CMD

3958 users
Size:
128.35 KB
Version:
Create LayOut File (2.0.0); February 22, 2017
Number of Views: 
23361
SketchUp Compatibility: 
OS Compatibility: 
Popularity: 
Extensions: 24
The SketchUp team uses our APIs to build all sorts of specialized tools. Some of these extensions ship with SketchUp as full-blown features, and some are just examples of how to use our APIs.