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. In this format it is also what marks the file as SketchUp 2017 or later:
CEntity is at version 5. All numbers are little-endian.
00000054 FF FF 00 00 0B 00 43 56 65 72 73 69 6F 6E 4D 61 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. They start at 0x50 after a
ten-character version such as {17.1.174}, and at 0x54 after a
twelve-character one.
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 3:
FF FE FF 09 43 00 41 00 72 00 63 00 43 00 75 00 72 00 76 00 65 00 03 00 00 00
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 5 or more.
Classes and their versions
The 2017 and 2018 files examined hold 58 classes each. These are the versions recorded from them, 47 classes in all; the others were not noted.
| Class | SketchUp 2017 | 2018 |
|---|---|---|
CArcCurve | 3 | 3 |
CAttribute | 0 | 0 |
CAttributeContainer | 0 | 0 |
CAttributeNamed | 1 | 1 |
CBackgroundImage | 10 | 10 |
CCamera | 5 | 5 |
CComponent | 11 | 11 |
CComponentBehavior | 5 | 5 |
CComponentDefinition | 10 | 11 |
CComponentInstance | 5 | 6 |
CCurve | 4 | 4 |
CDib | 3 | 3 |
CDimensionLinear | 6 | 6 |
CDimensionStyle | 4 | 4 |
CDrawingElement | 9 | 9 |
CEdge | 2 | 2 |
CEdgeUse | 1 | 1 |
CEntity | 5 | 5 |
CFace | 3 | 3 |
CFaceTextureCoords | 4 | 4 |
CGroup | 1 | 1 |
CImage | 1 | 1 |
CLayer | 2 | 2 |
CLayerManager | 4 | 4 |
CLoop | 1 | 1 |
CMaterial | 12 | 12 |
CMaterialManager | 4 | 4 |
CPageList | 1 | 1 |
CRenderingOptions | 36 | 37 |
CSchemaFile | 1 | 1 |
CSchemaFilterFile | 0 | 0 |
CSchemaZipFile | 1 | 1 |
CSectionPlane | 2 | 3 |
CShadowInfo | 7 | 7 |
CSkFont | 1 | 1 |
CSketchUpModel | 26 | 28 |
CSketchUpPage | 1 | 1 |
CSkpStyle | 1 | 1 |
CSkpStyleManager | 2 | 2 |
CText | 9 | 9 |
CTextStyle | 5 | 5 |
CTexture | 6 | 6 |
CThumbnail | 1 | 1 |
CVertex | 0 | 0 |
CViewPage | 12 | 12 |
CWatermark | 1 | 1 |
CWatermarkManager | 2 | 2 |
Two classes mark the start of this format: CEntity, the base of every
entity, is at version 5 (it was 3 in SketchUp 2016), and CSketchUpModel at
26 (it was 25). SketchUp 2018 then raised CSketchUpModel,
CComponentDefinition, CComponentInstance,
CRenderingOptions and CSectionPlane, which may have changed
their layouts. The parts this reference describes are the same in 2017 and 2018, so they
are treated as one format until a file shows otherwise. No file from 2019 or 2020 was
examined.