The fields of each class in the object stream, in the order they are written. There is no public specification. These layouts are the ones published by the skppy format reference, checked against OpenSKP’s reader and against real SketchUp 8, 2015 and 2016 files, every byte of which they account for. Where a class’s schema in the file falls outside the ones listed, the layout is not published, and the explorer stops there and says so.
In the tables, v is the class’s schema in the
version map. A field with no condition
is always present. The names are skppy’s; those it leaves unnamed keep the neutral names it
gave them, such as state_word and obsolete_reference.
Types
| Type | Meaning |
|---|---|
| u8, u16, u32, u64, i32, f32, f64 | Little-endian numbers. A bool is one byte. |
| sparse u64 | A mask byte, then one byte for each set bit: bit n set means the next byte is byte n of the value. |
| CString | An MFC CString. |
| RGBA | Four bytes: red, green, blue, alpha. |
| GUID | 16 bytes. |
| point, vector | Three f64; a plane is four f64. |
| object<T> | A CArchive object tag: null, a reference to an earlier object, or a new object of class T, whose body follows. |
| inline T | The body of class T with no tag of its own. T’s schema is its entry in the version map. |
| list of T | A u32 count, then that many T. |
| object list | Object tags until a null tag. |
| key/value list | Pairs of a CString key and a typed value, until an empty key. |
| options | A COptionsManager (see Options). |
Common bases
CEntity
Every entity class starts with this. In these files the persistent ID is absent: schema 3 stores only the attribute container, and schema 2 (SketchUp 3) stores nothing at all.
| Field | Type | Condition |
|---|---|---|
| legacy_flags | u32 | v = 1 |
| attribute_container | object<CAttributeContainer> | v > 2 |
| persistent_id | u64 | v = 4 |
| persistent_id | sparse u64 | v > 4 |
CDrawingElement
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| material | object<CMaterial> | |
| hidden | bool | v ≠ 0 |
| casts_shadows | bool | v > 5 |
| receives_shadows | bool | v > 5 |
| soft | bool | v > 6 |
| smooth | bool | v > 7 |
| locked | bool | v > 8 |
| obsolete_reference_present | bool | v = 2 |
| obsolete_reference | object | v = 2 and the flag is set |
| layer | object<CLayer> | v > 3 |
CComponentBehavior
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| is_2d | bool | v ≥ 3 |
| cuts_opening | bool | |
| snap_to | u32 | v ≥ 2 |
| camera_flags | u8 | v > 3. Bit 0: always faces the camera. Bit 1: shadows face the sun. |
| no_scale_mask | u32 | v ≥ 5 |
Attributes
CAttribute (v = 0)
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| attribute_code | u32 |
CAttributeContainer (v = 0)
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| entries | object list |
CAttributeNamed
An attribute dictionary. Absent before SketchUp 4 (CAttributeNamed is not in the SketchUp 3 map).
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| prefix | u32 | |
| name | CString | |
| entries | key/value list | |
| suffix | u32 | v > 0 |
CFaceTextureCoords
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| attribute_flags | u32 | |
| front_transform | 9 × f64 | |
| front_origin | point | v > 0 |
| back_transform | 9 × f64 | v > 1 |
| back_origin | point | v > 1 |
| front_pins | list of 4 × f64 | v > 2 |
| back_pins | list of 4 × f64 | v > 2 |
| front_flags | u32 | v > 3 |
| back_flags | u32 | v > 3. In both flags, bit 0x01 enables the side and bit 0x02 selects the stored projection direction. |
Geometry
CVertex (v = 0)
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| position | point |
CEdge
| Field | Type | Condition |
|---|---|---|
| drawing_element | inline CDrawingElement | |
| start_vertex | object<CVertex> | |
| end_vertex | object<CVertex> | |
| curve | object<CCurve> | v ≥ 2 |
CEdgeUse
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| edge | object<CEdge> | |
| reversed | bool | |
| loop | object<CLoop> | |
| obsolete_reference_1 | object | v = 0 |
| obsolete_reference_2 | object | v = 0 |
CLoop
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| is_outer | bool | |
| is_convex | bool | |
| edge_uses | object list |
CFace
| Field | Type | Condition |
|---|---|---|
| drawing_element | inline CDrawingElement | |
| plane | plane | |
| loops | list of object<CLoop> | |
| back_material | object<CMaterial> | v > 2 |
CCurve
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| first_edge | object<CEdge> | v = 3 |
| last_edge | object<CEdge> | v = 3 |
| is_polygon | bool | v = 3 or 4 |
| edge_count | u32 | v = 3 or 4 |
CArcCurve
| Field | Type | Condition |
|---|---|---|
| curve | inline CCurve | |
| center | point | v ≥ 1 |
| normal | vector | v ≥ 1 |
| x_axis | vector | v ≥ 1 |
| start_angle | f64 | v ≥ 1 |
| end_angle | f64 | v ≥ 1 |
| y_axis | vector | v ≥ 1 |
CConstructionGeometry (v = 0), CConstructionPoint (v = 0), CConstructionLine
CConstructionGeometry is an inline CDrawingElement.
CConstructionPoint: drawing_element, position (point), reference_position (point), has_reference_position (bool).
| CConstructionLine field | Type | Condition |
|---|---|---|
| drawing_element | inline CDrawingElement | |
| origin | point | |
| direction | vector | |
| start_parameter | f64 | v = 1, not in SketchUp 3 |
| end_parameter | f64 | v = 1, not in SketchUp 3 |
| stipple_pattern | u32 | v = 1, not in SketchUp 3 |
CPolyline3d (v = 0), CSectionPlane
CPolyline3d: drawing_element, then points (a list of points).
| CSectionPlane field | Type | Condition |
|---|---|---|
| drawing_element | inline CDrawingElement | |
| plane | plane | v = 2 or 3 |
| name | CString | v ≥ 3 and the file’s version ≥ 18 |
| symbol | CString | v ≥ 3 and the file’s version ≥ 18 |
Components
CComponent (v = 11)
| Field | Type | Condition |
|---|---|---|
| drawing_element | inline CDrawingElement | |
| materials | inline CMaterialManager | |
| layers | inline CLayerManager | |
| definitions | inline CDefinitionList | |
| entities | list of objects | |
| relationships | list of objects | |
| active_section_plane | object<CSectionPlane> |
CComponentDefinition (v = 10, 11)
| Field | Type | Condition |
|---|---|---|
| component | inline CComponent | |
| guid | GUID | |
| name | CString | |
| description | CString | |
| loaded_from | CString | |
| timestamp | u32 | A Unix time. |
| modified | bool | |
| insertion_point | point | |
| behavior | inline CComponentBehavior | |
| definition_type | u32 | Its values distinguish ordinary, group and image definitions; the numbers are not published. |
| thumbnail | object<CThumbnail> |
CComponentInstance
| Field | Type | Condition |
|---|---|---|
| drawing_element | inline CDrawingElement | |
| definition | object<CComponentDefinition> | |
| transform | 13 × f64 | The 3 × 3 basis, the translation and a homogeneous scale. |
| name | CString | v > 3 |
| guid | GUID | v ≥ 5 |
CGroup, CImage (v = 1)
Both are a component_instance: an inline CComponentInstance, as a placed group or image.
CDefinitionList (v = 0), CRelationship (v = 0), CRelationshipMap (v = 0)
CDefinitionList: definitions, a list of object<CComponentDefinition>. CRelationship: entity (inline CEntity), source (object<CEntity>), target (object<CEntity>). CRelationshipMap: relationships, a list of objects.
Materials and layers
CMaterial (v = 12)
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| name | CString | |
| has_texture | bool | |
| texture | inline CTexture | has_texture |
| used_by_layer | bool | |
| color | RGBA | |
| display_name | CString | |
| material_type | u32 | 0 colour, 1 textured, 2 textured and colourised. |
| colorize_type | u32 | 0 shift, 1 tint. |
| transparency | f64 | Opacity is 1 − the value, and applies only when the next field is set. |
| use_transparency | bool |
CTexture
| Field | Type | Condition |
|---|---|---|
| has_inline_dib | bool | v < 5 |
| inline_dib | inline CDib | v < 5 and has_inline_dib |
| entity | inline CEntity | v ≥ 5 |
| dib | object<CDib> | v ≥ 5 |
| width | f64 | In inches, on the model. |
| height | f64 | In inches, on the model. |
| filename | CString | |
| average_color | RGBA |
CDib
| Field | Type | Condition |
|---|---|---|
| image_format | u32 | v > 1. 4 is a PNG, 1 a JPEG. |
| byte_count | u32 | v > 0 |
| image_bytes | bytes | v > 0 |
| format_1_suffix | u32 | v ≥ 3 and image_format = 1 |
CThumbnail, CMaterialManager, CLayer, CLayerManager, CLayerGroup, CCustomLineStyle, CLineStyleManager
CThumbnail: entity, a camera (inline old camera at v = 0, object<CCamera> at v = 1), then dib (object<CDib>). CMaterialManager: entity, materials (list of objects), current_material (object<CMaterial>, v ≥ 2).
| CLayer field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| name | CString | |
| hidden | bool | |
| display_material | inline CMaterial | |
| page_behavior | u32 | v > 1 |
| obsolete_reference | object | v > 2 |
CLayerManager: entity, layers (list of objects), active_layer (object<CLayer>, at v = 3 or when layers is non-empty), folders (list, v = 6), root_folder (inline CLayerGroup, v ≥ 7). CLayerGroup, CCustomLineStyle and CLineStyleManager first appear in SketchUp 2020 and 2019; see the SketchUp 2017 to 2020 classes.
Cameras, scenes and metadata
CCamera
| Field | Type | Condition |
|---|---|---|
| eye | point | |
| target | point | |
| up | vector | |
| near | f64 | |
| far | f64 | |
| perspective | bool | |
| field_of_view | f64 | |
| orthographic_height | f64 | |
| obsolete_vector | vector | |
| aspect_ratio | f64 | |
| fov_is_height | bool | |
| legacy_flag | bool | v ≥ 2 |
| name | CString | v > 2 |
| image_width | f64 | v > 3 |
| is_2d | bool | v > 4 |
| scale_2d | f64 | v > 4 |
| center_2d_x | f64 | v > 4 |
| center_2d_y | f64 | v > 4 |
The camera of SketchUp 3 files is not tagged. skppy describes it: the same fields as far as obsolete_vector, with target replaced by a direction, and the target rebuilt as eye plus direction. No SketchUp 3 file was available to check this.
CSketchUpPage (v = 1), CViewPage, CPageList (v = 1)
CSketchUpPage: entity, name, description. CPageList: entity, pages (list of objects), active_page (object<CViewPage>).
| CViewPage field | Type | Condition |
|---|---|---|
| page | inline CSketchUpPage | |
| flags | u32 | Which snapshots follow. skppy lists camera, rendering, shadows, axes, hidden entities, layer visibility and section planes but gives no bit values; the explorer reads them as 0x01 to 0x40 in that order, which fits the real files. |
| camera | old camera / object<CCamera> | flags 0x01; old camera below v = 7 |
| rendering_options | inline CRenderingOptions | flags 0x02 |
| style | object<CSkpStyle> | flags 0x02 and v > 9 |
| shadow_info | inline CShadowInfo | flags 0x04 |
| display_shadows | bool | flags 0x04 |
| axes | inline CSketchCS | flags 0x08 |
| display_axes | bool | flags 0x08 |
| hidden_entities | list of objects | flags 0x10 |
| hidden_layers | list of objects | flags 0x20 |
| active_section_planes | list of objects | flags 0x40 |
| show_in_slideshow | bool | |
| display_watermarks | bool | 6 ≤ v ≤ 10 |
| transition_time | f64 | v ≥ 8 |
| delay_time | f64 | v ≥ 9 |
| background_image | object<CBackgroundImage> | v > 9 |
| display_background_image | bool | v ≥ 12 |
| image_rep_present | bool | v ≥ 12 |
| image_rep | inline ImageFileRep | v ≥ 12 and image_rep_present |
CBackgroundImage (v = 10), CSketchCS (v = 0), CShadowInfo (v = 7)
CBackgroundImage: entity, image_reference (inline ImageReference), visible (bool), opacity (f64), grip_points (list of points), principal_point_delta (vector), radial_distortion_k1 (f64), image_source (u32).
CSketchCS: drawing_element, origin (point), x_axis, y_axis, z_axis (vectors).
| CShadowInfo field | Type |
|---|---|
| entity | inline CEntity |
| time | u32, a Unix time |
| daylight_savings | bool |
| country | CString |
| city | CString |
| longitude | f64 |
| latitude | f64 |
| timezone_offset | f64 |
| north_direction | vector |
| display_shadows | bool |
| display_north | bool |
| display_on_all_faces | bool |
| display_on_ground_plane | bool |
| light | i32 |
| dark | i32 |
| use_sun_for_all_shading | bool |
CWatermark (v = 1), CWatermarkManager (v = 2)
CWatermark: entity, leading_flag (bool), name, state_word (u32), position (u32), five one-byte state_flags, scale (f64), opacity (f64), path, dib (object<CDib>). CWatermarkManager: entity, watermarks (list of objects). The state words’ meanings are not published.
Annotation
CDimension, CDimensionLinear, CDimensionRadial (v = 2)
CDimension: drawing_element, text, then at v ≥ 1 font (object<CSkFont>), is_3d_text (bool) and arrow_type (u32).
| CDimensionLinear field | Type | Condition |
|---|---|---|
| dimension | inline CDimension | |
| start_ref | inline CPointRef | |
| end_ref | inline CPointRef | |
| normal | vector | |
| x_axis | vector | |
| dimension_type | u32 | Values not published. |
| y_position | f64 | |
| x_position | f64 | |
| text_position | u32 | v > 5 |
CDimensionRadial: dimension, target (object<CEdge>), parameter (f64), radius_ratio (f64), is_diameter (bool), and arc (inline CArc3d) when the target is null. CPointRef: kind (u32), format_version (u32), position (point), leaf (object), secondary_leaf (object, format_version > 0), instance_path (list of objects), secondary_instance_path (list of objects, format_version > 3).
CText (v = 9), CSkFont, CFontManager (v = 0)
| CText field | Type |
|---|---|
| drawing_element | inline CDrawingElement |
| font | object<CSkFont> |
| screen_x | f64 |
| screen_y | f64 |
| point_ref | inline CPointRef |
| leader_vector | vector |
| view_direction | vector |
| leader_type | u32 |
| line_weight | u32 |
| point_ref_front | bool |
| hide_out_of_plane | bool |
| arrow_type | u32 |
| display_leader | bool |
| text | CString |
| convert_to_screen_on_explode | bool |
| hidden_leader_direction | u32 |
CSkFont: entity, face_name, bold, italic (bools), point_size (u32), then at v > 0 use_world_size (bool) and world_size (f64). CFontManager: entity, fonts (list of objects).
CTextStyle (v = 4, 5), CDimensionStyle (v = 4), CSkpStyle, CSkpStyleManager (v = 2)
CTextStyle: entity, font (object<CSkFont>), arrow_type, line_weight (u32s), hide_out_of_plane (bool), leader_type (u32), display_leader (bool), color (RGBA), then at v > 4 screen_color (RGBA) and screen_font (object<CSkFont>).
| CDimensionStyle field | Type |
|---|---|
| entity | inline CEntity |
| style_version | u32 |
| font | object<CSkFont> |
| text_3d | bool |
| always_readable | bool |
| extension_offset | u32 |
| extension_overshoot | u32 |
| line_weight | u32 |
| arrow_type | u32 |
| arrow_size | u32 |
| highlight_non_associative | bool |
| highlight_color | RGBA |
| show_radial_diameter_prefix | bool |
| hide_out_of_plane | bool |
| hide_out_of_plane_value | f64 |
| hide_small | bool |
| hide_small_value | f64 |
| color | RGBA |
| text_color | RGBA |
| text_position | u32 |
CSkpStyle (v = 1, 2): entity, guid, initial_file_name, style_version (u32), display_name, file_name, then its options: a u32 count and, for each, a u32 key, a u32 presence flag and, when the flag is 1, a u32 type with its value. Type 1 is one byte (a flag), 4 and 5 four bytes (a number or a colour), 7 an f64. These option codes were worked out from real files, and the keys (1000 and up, as in style.xml in later files) are not published. CSkpStyleManager: entity, styles (list of objects), then, when there are styles, active_style, selected_style (objects) and selected_style_dirty (bool).
CRenderingOptions
Fields in order; the schema grows from 22 (SketchUp 3) to 36 (SketchUp 8 to 2016).
| Field | Type | Condition |
|---|---|---|
| entity | inline CEntity | |
| render_mode | u32 | |
| model_transparency, material_transparency | bool | |
| jitter_edges | bool | |
| line_style_edges | bool | v > 37 |
| edge_display_mode | u32 | |
| background_color, foreground_color, highlight_color, construction_color | RGBA | |
| obsolete_display_flag, display_instance_axes, display_color_by_layer, texture | bool | |
| edge_color_mode | u32 | |
| extend_lines | bool | |
| line_extension | u32 | |
| draw_silhouettes | bool | |
| silhouette_width | u32 | |
| draw_depth_que, depth_que_width, draw_line_ends, line_end_width | bool, u32 | v ≥ 26 |
| draw_profiles_only | bool | v ≥ 28 |
| draw_hidden_geometry | bool | |
| draw_hidden_objects | bool | v ≥ 39 |
| face_color_mode | u32 | |
| face_front_color, face_back_color | RGBA | |
| inactive_fade, instance_fade | f64 | |
| inactive_hidden, instance_hidden | bool | |
| display_fog, fog_color, fog_use_background_color, fog_start_dist, fog_end_dist | bool, RGBA, bool, f64, f64 | v ≥ 29 |
| fog_hint_mode | u32 | v ≥ 30 |
| edge_type | u32 | v > 30 |
| display_sketch_axes, display_text, display_dims, hide_construction_geometry | bool | v > 30 |
| sky_color | RGBA | |
| horizon_color | RGBA | v ≥ 24 |
| ground_color | RGBA | |
| draw_horizon, draw_ground, draw_underground | bool | |
| ground_transparency | u32 | |
| section_active_color, section_inactive_color, section_default_cut_color | RGBA | |
| section_cut_width | u32 | |
| section_display_mode | u32 | Bit 0x01 planes shown, 0x02 cuts shown. |
| section_default_fill_color, section_cut_filled | RGBA, bool | v > 36 |
| transparency_sort | u32 | |
| draw_soft_edges | bool | |
| soft_edge_limit | f64 | |
| draw_smooth_edges | bool | |
| mipmap_option | bool | v = 23, 24 or 33 |
| locked_color | RGBA | v ≥ 27 |
| display_watermarks | bool | v ≥ 32 |
| xray_opacity | f64 | v ≥ 35 |
| draw_back_edges, photomatch_draw_background, photomatch_background_opacity, photomatch_draw_overlay, photomatch_overlay_opacity | bool, bool, f64, bool, f64 | v ≥ 36 |
Embedded records
These have no class of their own in the version map.
CArc3d:center(point),normal,x_axis(vectors),start_angle,end_angle(f64).ImageReference:path,state(u32),dib(object<CDib>),width,height,file_size,timestamp(u32s).ImageFileRep:has_data(bool), then, when set,byte_count(u32) and the image bytes.CSchemaZipFile(seen, not in the skppy reference):path,name(CStrings), a u32 size and a complete ZIP file of schema files.
What is not known
Not published, and not worked out here: the meanings of prologue_word_1 and _2, the 16 state_words, final_state and the last word of SketchUp 2018 files; the values of definition_type, dimension_type, render_mode, edge_display_mode, edge_color_mode, face_color_mode and transparency_sort; and the numeric keys of a style’s options. CConstructionGeometry is listed for completeness: no field beyond the base is known. CSchemaFile and CSchemaFilterFile appear in the version map from SketchUp 2015 but were never met as objects in the files seen; their layouts are not published.
Versions not checked
Layouts for SketchUp 3 to 7, 2013 and 2014 follow skppy’s schema gates; no real file from those versions was available to the site. SketchUp 8, 2015, 2016 and the later files of the 2017 to 2020 variant were decoded in full against these tables.