Straight after the header comes the first
object of the MFC archive, a CVersionMap. It lists every class the model may
contain and the version of that class’s layout in this file, and ends with the name
End-Of-Version-Map. The map is how SketchUp knows how each object after it
is laid out, which is what lets a newer SketchUp read an older file. All numbers are
little-endian.
00000050 FF FF 00 00 0B 00 43 56 65 72 73 69 6F 6E 4D 61
00000060 70 FF FE FF …
Layout
| Part | Bytes | Meaning |
|---|---|---|
| Class record | 17 | FF FF 00 00 0B 00 and CVersionMap: a new class, schema 0. |
| Entries | varies | One a class: a CString class name and a u32 version. |
| End | 44 | The CString End-Of-Version-Map and a u32 0. |
Class record
The map is an object, so it starts the way MFC starts the first object of a class: with a new class record (see class tags).
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | u16 | Tag | FFFF, MFC’s new class tag: a class description follows. |
| 2 | 2 | u16 | Schema | The class’s schema number, its layout version as MFC sees it: 0. |
| 4 | 2 | u16 | Name length | The length of the class name in bytes: 11. |
| 6 | 11 | ASCII | Class name | CVersionMap. |
These 17 bytes are the same in every file seen. In SketchUp 8 files they start at 0x50 when the version string has ten characters.
Entries
Each entry names a class and gives its version:
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 + 2 × length | CString | Class | The class name, such as CFace. |
| then | 4 | u32 | Version | The version of that class’s layout in this file. |
The entries are in alphabetical order in every file seen. One entry, for the class
CArcCurve at version 1:
FF FE FF 09 43 00 41 00 72 00 63 00 43 00 75 00 72 00 76 00 65 00 01 00 00 00
Fab Lab Iceland’s 2008 notes on a SketchUp 6 file describe each entry as a string and “an 8-byte code”. In the files examined for this site the value after the string is 4 bytes, a version. Whether SketchUp 6 differed has not been confirmed.
Class names
The class names are CStrings in the same form as every other string in the file: the
marker FF FE FF, a length in characters (one byte for names this short) and
the name in UTF-16LE (see Strings).
The name in the class record before them, by contrast, is MFC’s own class name in
ASCII.
End of the map
The last entry has the name End-Of-Version-Map (18 characters,
12 hex) and the version 0:
FF FE FF 12 45 00 6E 00 64 00 2D 00 4F 00 66 00 2D 00 56 00
65 00 72 00 73 00 69 00 6F 00 6E 00 2D 00 4D 00 61 00 70 00 00 00 00 00
The model’s first fields follow straight after it.
Reading the map
- Read the class record and check for
FFFF, schema 0 and the nameCVersionMap. - Read a CString, then a u32. Store the pair.
- If the string was
End-Of-Version-Map, stop: the map is complete. Otherwise go back to step 2. - Look up the version of each class before reading an object of it. For this format,
CEntityis below 5.
Classes and their versions
The SketchUp 8 file holds 55 classes, the 2015 and 2016 files 58: SketchUp 2015 added
CSchemaFile, CSchemaFilterFile and CSchemaZipFile.
These are the versions recorded from the files examined, 47 classes in all; the others
were not noted. A dash means the class is not in the map.
| Class | SketchUp 8 | 2015 | 2016 |
|---|---|---|---|
CArcCurve | 1 | 3 | 3 |
CAttribute | 0 | 0 | 0 |
CAttributeContainer | 0 | 0 | 0 |
CAttributeNamed | 1 | 1 | 1 |
CBackgroundImage | 10 | 10 | 10 |
CCamera | 5 | 5 | 5 |
CComponent | 11 | 11 | 11 |
CComponentBehavior | 5 | 5 | 5 |
CComponentDefinition | 10 | 10 | 10 |
CComponentInstance | 4 | 5 | 5 |
CCurve | 4 | 4 | 4 |
CDib | 3 | 3 | 3 |
CDimensionLinear | 6 | 6 | 6 |
CDimensionStyle | 4 | 4 | 4 |
CDrawingElement | 9 | 9 | 9 |
CEdge | 2 | 2 | 2 |
CEdgeUse | 1 | 1 | 1 |
CEntity | 3 | 3 | 3 |
CFace | 3 | 3 | 3 |
CFaceTextureCoords | 4 | 4 | 4 |
CGroup | 1 | 1 | 1 |
CImage | 1 | 1 | 1 |
CLayer | 2 | 2 | 2 |
CLayerManager | 4 | 4 | 4 |
CLoop | 1 | 1 | 1 |
CMaterial | 12 | 12 | 12 |
CMaterialManager | 4 | 4 | 4 |
CPageList | 1 | 1 | 1 |
CRenderingOptions | 36 | 36 | 36 |
CSchemaFile | – | 1 | 1 |
CSchemaFilterFile | – | 0 | 0 |
CSchemaZipFile | – | 1 | 1 |
CSectionPlane | 2 | 2 | 2 |
CShadowInfo | 7 | 7 | 7 |
CSkFont | 1 | 1 | 1 |
CSketchUpModel | 22 | 24 | 25 |
CSketchUpPage | 1 | 1 | 1 |
CSkpStyle | 1 | 1 | 1 |
CSkpStyleManager | 2 | 2 | 2 |
CText | 9 | 9 | 9 |
CTextStyle | 5 | 5 | 5 |
CTexture | 6 | 6 | 6 |
CThumbnail | 1 | 1 | 1 |
CVertex | 0 | 0 | 0 |
CViewPage | 12 | 12 | 12 |
CWatermark | 1 | 1 | 1 |
CWatermarkManager | 2 | 2 | 2 |
Between SketchUp 8 and 2016, CSketchUpModel, CArcCurve and
CComponentInstance changed version, and those layouts may have changed with
them. The parts this reference describes are the same in all three releases, so they
are treated as one format until a file shows otherwise. CEntity, the base of
every entity, stays at 3; at version 5 the file is a
SketchUp 2017 to 2020 model.