The file starts with five plain values: two strings that name the file and the SketchUp that saved it, a GUID, a third string and the time of the save. The version map follows straight after them. All numbers are little-endian.
00000000 FF FE FF 0E 53 00 6B 00 65 00 74 00 63 00 68 00
00000010 55 00 70 00 20 00 4D 00 6F 00 64 00 65 00 6C 00
00000020 FF FE FF 0A 7B 00 38 00 2E 00 30 00 2E 00 33 00
00000030 31 00 31 00 37 00 7D 00 A8 35 DD B6 D6 6B 09 4A
00000040 AD 8B 8A 4C C9 D8 C8 0E FF FE FF 00 F6 09 64 4D
00000050 FF FF 00 00 0B 00 43 56 65 72 73 69 6F 6E 4D 61
00000060 70
Fields
The length of the version string varies, so the offsets after it are those of the example. Read each string’s length to find the next field.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 32 | CString | Signature | The text SketchUp Model. |
| 32 (0x20) | 4 + 2 × length | CString | Version | The version of SketchUp that saved the file, in braces: {8.0.3117}. 24 bytes here. |
| 56 (0x38) | 16 | GUID | Model GUID | A random GUID, probably the model’s identity. |
| 72 (0x48) | 4 or more | CString | Path | Usually empty. Meaning not known. |
| 76 (0x4C) | 4 | u32 | Saved | The time of the save as a Unix time. |
| 80 (0x50) | Version map | The first object of the archive. |
Strings
Every string in the file is an MFC CString as a Unicode
CArchive writes it:
| Bytes | Meaning |
|---|---|
FF | A byte FF. |
FE FF | The word FFFE. Together with the FF before it, this marks a Unicode string. |
| length | The length in UTF-16 code units: one byte if below 255; otherwise FF and a 16-bit length if below FFFE; otherwise FF FF FF and a 32-bit length. |
| text | The text, length × 2 bytes of UTF-16LE. There is no terminating zero. |
So the empty string is FF FE FF 00, and a string of ten characters takes
4 + 20 bytes. The files seen only use the one-byte length. That longer strings escape to
a word and a dword follows MFC’s CArchive, and OpenSKP’s reader describes the
same three forms.
To read a string: check for FF FE FF; read a byte; if it is below FF it
is the length; otherwise read a 16-bit word, and if that is below FFFF it is the length;
otherwise read a 32-bit length. Then read twice that many bytes as UTF-16LE.
Signature
The text SketchUp Model as a CString: FF FE FF, the length 14
(0E) and 28 bytes of UTF-16LE. These 32 bytes are the same in every SKP file
of every version, and are what identifies the file as a SketchUp model.
Version
The version of SketchUp that saved the file, as a CString in braces: the major
version, the minor version and the build, separated by dots, such as
{8.0.3117}, {15.3.329} or {16.1.1449}. From
SketchUp 2013 the major number is the last two digits of the release’s year. The
string is 24 bytes long for {8.0.3117}, and its length changes the offsets
of everything after it: with the nine characters of {6.4.112} the version
map starts at 0x4E, not 0x50.
Fab Lab Iceland’s 2008 notes on a SketchUp 6 file (6.4.112) place the
name CVersionMap at offset 85, counted from 1. That is byte 84 (0x54)
counted from 0, which is exactly where it falls with a nine-character version and the
fields on this page, so the SketchUp 6 header has the same fields.
Model GUID
Sixteen bytes in Microsoft’s byte order: a 32-bit number, two 16-bit numbers, then
eight bytes as they are. So A8 35 DD B6 D6 6B 09 4A AD 8B 8A 4C C9 D8 C8 0E
is {B6DD35A8-6BD6-4A09-AD8B-8A4CC9D8C80E}.
In every file seen the GUID is different and is a random (version 4) GUID: the third group starts with 4 and the fourth with 8, 9, A or B. That it identifies the model is an inference.
Path
A CString that is empty (FF FE FF 00) in all but one of the files seen.
That one holds a Windows path to a .skp file. What it means is not known;
it may be where the model was saved or where it came from.
Saved
A 32-bit Unix time: seconds since 1 January 1970, UTC. In the example
F6 09 64 4D is 1,298,401,782, which is 22 February 2011, 19:09:42 UTC. The
times match the save dates of the files seen.