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.
The files examined for this site were saved by SketchUp 8 (8.0.3117),
2015 (15.3) and 2016 (16.1). That SketchUp 3 to 7, 2013 and
2014 write the same layout is an inference: SketchUp 3 is the oldest version that the
SketchUp SDK can still write, and Fab Lab Iceland’s 2008 notes on a SketchUp 6 file
describe the same header, version map and thumbnail. Each release changed the versions
of some classes, which may change their layouts, but the parts described here are the
same in every file seen.
A file dropped on any page of this site opens in the explorer, which shows the header, the thumbnail, every class in the version map, the option groups, and the names of the materials and layers, found by searching the object stream.
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…Model fields three 32-bit numbers12 bytes…Thumbnail a CDib object holding a PNGvaries…Unknown 1 and ten zero bytes14 bytes…Options named groups of typed valuesvaries…Objects materials, layers, components, geometryto 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 objects after the options are not decoded here.
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); - after the map, three 32-bit model fields followed by the
CDibclass record of the thumbnail.
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.
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 and two more model fields
- 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; it reports reading files from SketchUp 4 on and failing on SketchUp 3 files (Python, C#, TypeScript, Dart)
- skppy – reader and writer for both containers, with a Blender add-on; in beta (Python)
Reference
- 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