Introduction
These are the models saved by SketchUp from
version 3 to SketchUp 2016, under @Last Software, Google and Trimble. The file is an
MFC archive: SketchUp for Windows was built on Microsoft’s MFC library, and the model
is written with MFC’s CArchive, which stores strings, numbers and objects
in a compact binary form.
There is no public specification. Each release changed the schemas of some classes,
which is what the version map at the start of every file is for: it lists the classes
and the layout version of each. The layouts on these pages come from the published
reverse-engineering work of skppy and OpenSKP and were checked on real SketchUp 7
(7.0.10247), 8, 2015 and 2016 files, which decode completely. SketchUp 3 to
6, 2013 and 2014 follow skppy’s schema gates; no real file from those releases was
available here. skppy’s public test suite,
skppy-tests, has SketchUp’s own SDK
save a fixture for every target from SketchUp 3 to 2021 and runs skppy’s parser on each,
which is public evidence for those layouts. The layout of the first few fields of the root differs in these
earlier files, as the root model
section shows.
A file dropped on any page of this site opens in the explorer, which reads the whole object stream: the thumbnail, the version map, the options, the materials and layers, component definitions, scenes, every entity as a tree of objects, and the textures.
Structure
All numbers are little-endian. The file is one CArchive stream from start to end, but the parts before the version map are plain values rather than objects.
0Signature the CString “SketchUp Model”32 bytes32Version the CString “{8.0.3117}”: the SketchUp that saved the filevaries…Model GUID16 bytes…Path a CString, usually empty4 bytes or more…Saved a Unix time4 bytes…Version map every class the model may use, with the version of its layoutvaries…Object stream the model as CArchive objectsto the end…Root fields the prologue words and licence family (which of them, by schema)varies…Thumbnail a CDib object holding a PNGvaries…Behaviour and description the root component behaviour and the descriptionvaries…Options named groups of typed valuesvaries…Objects materials, layers, components, geometry, scenes, stylesto the end
Every string is an MFC CString, and every object is written with MFC’s class tags. Both are described on the Header and Object stream pages. The version map is what makes the file work across releases: it tells the reader which version of each class’s layout follows, so a newer SketchUp can read an older file. The layouts of the objects are on the Classes page.
Telling it apart
The explorer’s parser for this format checks, in order:
- the 32 bytes of “SketchUp Model” at the start, which every SKP file has;
- a version string in braces, such as
{16.1.1449}; - no
VFFstraight after the version, which would mean the ZIP container of SketchUp 2021 and later; - after the GUID, path and save time, the class record of the version map,
FF FF 00 00 0B 00andCVersionMap; - in the version map, a version below 5 for
CEntity(3 in every file seen); - the root model’s fields as far as the thumbnail: the schema of
CSketchUpModelin the map decides how many there are (see The root model).
A file that fails a check is turned down, and the explorer tries the parsers for the
other SKP formats. A file with CEntity at version 5 or more is a SketchUp
2017 to 2020 model. A version of 21 or more with this layout is accepted but reported,
since SketchUp 2021 and later write the ZIP container.
Not described
The gaps are those on the SKP overview. For this format, no real files of SketchUp 3 to 6, 2013 or 2014 were available, so their layouts rest on skppy’s schemas and its SDK-made test files, and background-image objects at schema versions 1 and 9 (SketchUp 6 and 7) are not described.
Variants
- SketchUp 3 to 2016 – the classic MFC CArchive file: a version map, a PNG thumbnail and the object stream
- SketchUp 2017 to 2020 – the classic file with persistent IDs on every entity
- SketchUp 2021 and later – the “versionless” format: a short header, then a ZIP archive
Links
Software
- SketchUp – Trimble’s 3D modelling program, which wrote these files and opens them (Windows, macOS)
Developers
- SketchUp SDK – Trimble’s library for reading and writing SKP files, which can still save as far back as SketchUp 3 (C)
- OpenSKP – reverse-engineered reader and writer, including SketchUp 3 files (Python, C#, TypeScript, Dart)
- skppy – reader and writer for both containers, with a Blender add-on; in beta (Python)
Reference
- skppy format reference – the published layout of every class, with the schema gates this page follows
- Sketchup file format – Fab Lab Iceland’s 2008 notes on the SketchUp 6 header, version map and thumbnail
- TN002: Persistent Object Data Format – Microsoft’s description of the MFC archive tags
- SUModelVersion – the SketchUp C API’s list of file versions, from SketchUp 3