# SketchUp THERM/DXF Exporter

## What is this plugin?

The SketchUp THERM/DXF Exporter is a comprehensive tool for thermal modelling that bridges SketchUp's 3D modelling capabilities with LBNL's THERM thermal analysis software. It enables architects, engineers, and building scientists to create accurate 2D thermal models with proper material properties and boundary conditions.

<figure><img src="https://2129322768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfKJnzF2TwHA3APPbiCpF%2Fuploads%2FaLaa4nPMCxSkOP5kKZt5%2Fimage.png?alt=media&#x26;token=9d6ca672-04ea-4734-8374-a24325ea8bfc" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This plugin is provided as-is for thermal modeling purposes. Use at your own risk. Always verify exported models in THERM before using for analysis or compliance. Email <support@betterbuilding.io> for support or use the [Support Ticket](https://docs.betterbuilding.io/support-and-training/support-tickets) system.&#x20;
{% endhint %}

### Key Features

* **Dual Export Formats**: Export to THERM XML (.thmx) or DXF
* **51 Predefined Materials**: Complete thermal materials library with accurate conductivity and emissivity values
* **6 Built-in Boundary Conditions**: Standard interior and exterior conditions
* **Full BC Management**: Create, edit, duplicate, delete, and organise boundary conditions
* **Visual Feedback**: Colour-coded materials and BCs with labels and legends
* **Entity Info Integration**: View material and BC properties directly in SketchUp's Entity Info panel
* **Validation Tools**: Pre-export validation and comprehensive diagnostics
* **Persistent Data**: Automatic saving and loading of BC assignments

### System Requirements

* SketchUp 2021 - 2024
* Windows&#x20;
* THERM 7.8 (optional, for opening exported files)

### Access (Free)

Register for access to the plugin and to receive SketchUp THERM/DXF Exporter updates.

{% hint style="success" %}
Download the plugin [**here**](https://preview.mailerlite.io/forms/489849/168734026830447684/share)
{% endhint %}

<details>

<summary>Installation</summary>

#### Installation Steps

1. Download `THERM_DXF_Export_1.0.rb`
2. Open SketchUp
3. Go to plugin folder = C:\Users\xxxxxxx\AppData\Roaming\SketchUp\SketchUp 202x\SketchUp\Plugins
4. Add plugin

#### First Launch

After installation, restart SketchUp and the plugin will:

* Create a working directory: `Documents/SketchUp_THERM_Files/`
* Create subdirectories for materials and boundary conditions
* Load with default settings
* Add menu items under `Plugins → THERM/DXF Exporter`
* Saved file = C:\Users\xxxxxxx/Documents/SketchUp\_THERM\_Files

#### Verification

Check the Ruby Console (`Window → Ruby Console`) for:&#x20;

```
======================================================================
✓ THERM/DXF Exporter v1.0.0 loaded successfully!
======================================================================
  Materials: 46 (with visible colors)
  BCs: 7 (0 custom, 0 disabled)
  Edge Assignments: 0 loaded
  Default BC: Adiabatic (auto-assigned to unassigned edges)

✓ ENHANCED BC MANAGEMENT:
  Full control over boundary conditions database
  Create, edit, duplicate, and delete any BC
  Disable/restore built-in BCs

✓ ENHANCED COLOR VISIBILITY:
  All light materials now visible in THERM!

FEATURES:
  • Entity Info Display - Shows material/BC info in Entity Info panel
  • BC Management - Full database control
  • Validation & cleanup tools

EXPORT FORMATS:
  • THMX - Full THERM model with materials & BCs
  • DXF  - Geometry only (use Ctrl+T / Cmd+T)

Access via: Plugins → THERM/DXF Exporter
Files save to: C:\Users\xxxxxxxx/Documents/SketchUp_THERM_Files
```

</details>

<details>

<summary>Quick Start Guide</summary>

#### Basic Workflow (5 Steps)

**Step 1: Create Material Collection**

1. Go to `Plugins → THERM/DXF Exporter → Materials → Create Material Collection`
2. This creates 51 thermal materials in your model
3. Materials are organised by category (Metals, Insulation, Wood, etc.)
4. Restart SketchUp

**Step 2: Apply Materials to Faces**

1. Select 'Top' and 'Parallel Projection' Camera view
2. Draw faces
3. Select faces in your model
4. Use SketchUp's Paint Bucket tool
5. Choose THERM materials from the Materials browser
6. Paint each face with appropriate thermal material

**Step 3: Assign Boundary Conditions to Edges**

1. Select edges that represent thermal boundaries
2. Right-click → `Assign THERM Boundary Condition`
3. Choose appropriate BC (Interior, Exterior, etc.)
4. Optionally set U-Factor tag
5. Choose whether to auto-assign to unassigned edges

**Step 4: Validate Model**

1. Go to `Plugins → THERM/DXF Exporter → Validate Model`
2. Review any errors or warnings
3. Fix issues as needed

**Step 5: Export**

1. Go to `Plugins → THERM/DXF Exporter → Export → Export to THERM (THMX)`
2. Name your file
3. Choose cross-section type
4. Select post-export action
5. Click OK

</details>

<details>

<summary>Export Functions</summary>

#### Export to THERM (THMX)

**Purpose**: Creates a complete THERM 7.8 XML file with geometry, materials, and boundary conditions.

**Menu Path**: `Export → Export to THERM (THMX)`

**Export Options**:

* **File Name**: Base name for the exported file (no extension needed)
* **Cross-Section Type**: Other, Sill, Head, Jamb, or Frame
* **After Export**:
  * Open Folder: Opens export directory
  * Launch THERM: Starts THERM application
  * Do Nothing: Completes silently
* **Auto-assign Adiabatic**: Automatically assigns adiabatic BC to any unassigned edges

**What Gets Exported**:

* All face geometry (converted to polygons)
* Material properties (conductivity, emissivity)
* Boundary conditions with heat transfer coefficients
* U-Factor tags
* Temperature conditions
* Cross-section metadata

**File Location**: `Documents/SketchUp_THERM_Files/[filename].thmx`

**THERM Import Settings**: Files are ready to open directly in THERM 7.8 (no import settings needed)

#### Export to DXF

**Purpose**: Creates a geometry-only DXF file compatible with AutoCAD and THERM.

**Menu Path**: `Export → Export to DXF`

**Keyboard Shortcut**:

* Windows: `Ctrl + T`

**What Gets Exported**:

* Face geometry only (polylines)
* No materials or boundary conditions
* 2D geometry in SketchUp's internal units (inches)

**THERM Import Settings**:

```
Option 1 (Recommended):
Scaling: 2540%
Units: mm
Option 2:
Scaling: 100%
Units: inches
```

**Use Cases**:

* Geometry verification
* Import into other CAD software
* Quick geometry sharing
* Manual material/BC assignment in THERM

#### Launch THERM

**Menu Path**: `Export → Launch THERM`

**Purpose**: Opens the THERM application without exporting.

**Requirements**: THERM path must be configured in settings.

#### Open Export Folder

**Menu Path**: `Export → Open Export Folder`

**Purpose**: Opens Windows Explorer / Finder to the export directory.

**Default Location**: `Documents/SketchUp_THERM_Files/`

</details>

<details>

<summary>Material Management</summary>

#### Material Library

The plugin includes 51 pre-defined thermal materials organised into 9 categories:

**Metals (7 materials)**

* **Aluminium**: k=160 W/mK
* **Steel**: k=45 W/mK
* **Stainless Steel**: k=17 W/mK
* **Copper**: k=380 W/mK
* **Brass**: k=120 W/mK
* **Bronze**: k=65 W/mK
* **Zinc**: k=112 W/mK

**Insulation (8 materials)**

* **Insulation-Fibreglass**: k=0.04 W/mK
* **Insulation-Mineral Wool**: k=0.038 W/mK
* **Insulation-XPS**: k=0.029 W/mK
* **Insulation-EPS**: k=0.033 W/mK
* **Insulation-Polyurethane**: k=0.023 W/mK
* **Insulation-Polyisocyanurate**: k=0.022 W/mK
* **Insulation-Cellulose**: k=0.039 W/mK
* **Insulation-Spray Foam**: k=0.026 W/mK

**Wood (6 materials)**

* **Wood-Softwood**: k=0.12 W/mK
* **Wood-Hardwood**: k=0.16 W/mK
* **Wood-Plywood**: k=0.13 W/mK
* **Wood-OSB**: k=0.13 W/mK
* **Wood-Particleboard**: k=0.17 W/mK
* **Wood-MDF**: k=0.14 W/mK

**Masonry (10 materials)**

* **Concrete-Normal**: k=1.4 W/mK
* **Concrete-Lightweight**: k=0.8 W/mK
* **Concrete Block-Hollow**: k=0.6 W/mK
* **Concrete Block-Solid**: k=1.0 W/mK
* **Brick-Common**: k=0.7 W/mK
* **Brick-Face**: k=1.0 W/mK
* **Stone-Granite**: k=2.8 W/mK
* **Stone-Limestone**: k=1.5 W/mK
* **Stone-Sandstone**: k=1.7 W/mK
* **Mortar**: k=0.8 W/mK

**Glass (3 materials)**

* **Glass-Clear**: k=1.0 W/mK, ε=0.84
* **Glass-Low-E**: k=1.0 W/mK, εfront=0.1, εback=0.84
* **Glass-Tinted**: k=1.0 W/mK, ε=0.84

**Plastics (4 materials)**

* **PVC**: k=0.17 W/mK
* **EPDM Rubber**: k=0.25 W/mK
* **Polyethylene**: k=0.42 W/mK
* **Acrylic**: k=0.2 W/mK

**Boards (3 materials)**

* **Gypsum Board**: k=0.16 W/mK
* **Plaster**: k=0.5 W/mK
* **Cement Board**: k=0.25 W/mK

**Membranes (2 materials)**

* **Air Barrier Membrane**: k=0.2 W/mK
* **Vapour Barrier**: k=0.16 W/mK

**Air (2 materials)**

* **Air-Cavity**: k=0.026 W/mK
* **Air-Still**: k=0.024 W/mK

**Default (1 material)**

* **Default Material**: k=0.5 W/mK

#### Material Operations

**Create Material Collection**

**Menu Path**: `Materials → Create Material Collection`

**What it Does**:

1. Creates all 51 THERM materials in the active model
2. Assigns accurate thermal properties to each
3. Sets visible colours for easy identification
4. Stores materials in SketchUp's materials browser
5. Organises materials by category

**After Creation**:

* Access materials via `Window → Materials → In Model`
* Materials persist with the model file
* Can be applied using Paint Bucket tool

**Show Existing Materials**

**Menu Path**: `Materials → Show Existing Materials`

**Purpose**: Lists all THERM materials currently in the model.

**Output Example**:

```
Materials in Model:
============================================================

THERM MATERIALS (15):
------------------------------------------------------------
  • Aluminium (k=160.0 W/mK)
  • Gypsum Board (k=0.16 W/mK)
  • Insulation-Fibreglass (k=0.04 W/mK)
  ...
```

**View Material Library**

**Menu Path**: `Materials → View Material Library`

**Purpose**: Shows complete list of all 51 available materials organised by category.

**Use Case**: Reference guide for selecting appropriate materials.

**Delete THERM Materials**

**Menu Path**: `Materials → Delete THERM Materials`

**Purpose**: Removes all THERM materials from the current model.

**Warning**: This only removes materials from the model, not from assigned faces. Faces will retain their colours but lose thermal properties.

**Use Case**: Clean up model or start fresh with material assignments.

</details>

<details>

<summary>Boundary Conditions</summary>

#### Built-in Boundary Conditions

The plugin includes 6 standard boundary conditions:

**Interior Conditions**

**Interior, upwards**

* Heat Transfer Coefficient: 10.0 W/m²K
* Temperature: 20°C
* Use: Ceiling surfaces (heat flow upward)
* Colour: Red

**Interior, downwards**

* Heat Transfer Coefficient: 5.882 W/m²K
* Temperature: 20°C
* Use: Floor surfaces (heat flow downward)
* Colour: Light Red

**Interior, horizontal**

* Heat Transfer Coefficient: 7.692 W/m²K
* Temperature: 20°C
* Use: Vertical wall surfaces
* Colour: Pink

**Exterior Conditions**

**Exterior, air**

* Heat Transfer Coefficient: 250.0 W/m²K
* Temperature: 0°C
* Use: Exposed exterior surfaces (high wind)
* Colour: Green

**Exterior, ventilated**

* Heat Transfer Coefficient: 7.692 W/m²K
* Temperature: 0°C
* Use: Ventilated cavity or sheltered exterior
* Colour: Light Green

**Exterior, ground**

* Heat Transfer Coefficient: 99999.0 W/m²K
* Temperature: 0°C
* Use: Ground contact (constant temperature)
* Colour: Medium Green

#### U-Factor Tags

Available tags for U-factor calculations:

* (blank)
* Interior
* Exterior
* Frame
* Glazing
* Edge
* Spacer
* Wall
* Sill
* Head
* Jamb

#### BC Assignment & Management

**Assign BC to Edges**

**Menu Path**:

* `Boundary Conditions → Assign & View → Assign BC to Edges`
* Right-click on selected edges → `Assign THERM Boundary Condition`

**Steps**:

1. Select one or more edges in model
2. Choose menu option
3. Select boundary condition from dropdown
4. Optionally select U-Factor tag
5. Choose whether to auto-assign to unassigned edges
6. Click OK

**Visual Feedback**:

* Edges are coloured according to BC
* Colour persists in model
* Can be viewed in Entity Info panel

**Auto-assign Feature**:

* When enabled, applies the selected BC to ALL edges that don't already have a BC assigned
* Useful for quickly setting up models
* Can be undone with Ctrl+Z / Cmd+Z

**Show BC Assignments**

**Menu Path**: `Boundary Conditions → Assign & View → Show BC Assignments`

**Output Example**:

```
Boundary Condition Assignments:
============================================================

Interior, horizontal: 12 edges
  h=7.692 W/m²K, T=20.0°C
  Category: Interior

Exterior, air: 4 edges
  h=250.0 W/m²K, T=0.0°C
  Category: Exterior

U-Factor Tags:
------------------------------------------------------------
  Interior: 8 edges
  Exterior: 4 edges

Total: 16 edges with BCs
```

**List All BCs by Category**

**Menu Path**: `Boundary Conditions → Assign & View → List All BCs by Category`

**Purpose**: Shows complete library of available boundary conditions organised by category.

**Diagnose BC Issues**

**Menu Path**: `Boundary Conditions → Assign & View → Diagnose BC Issues`

**Purpose**: Comprehensive diagnostic tool for troubleshooting BC problems.

**Checks Performed**:

* Available BCs in database
* Current BC assignments in memory
* Invalid assignments (BCs that don't exist)
* Model geometry statistics
* File persistence (saved vs. memory)
* Recommendations for fixes

**Output Example**:

```
======================================================================

AVAILABLE BCs IN DATABASE (6):
----------------------------------------------------------------------
  ✓ Interior, upwards
  ✓ Interior, downwards
  ✓ Interior, horizontal
  ✓ Exterior, air
  ✓ Exterior, ventilated
  ✓ Exterior, ground

BC ASSIGNMENTS (16):
----------------------------------------------------------------------
  Interior, horizontal: 12 edges
  Exterior, air: 4 edges

INVALID ASSIGNMENTS:
----------------------------------------------------------------------
  ✓ All assignments valid

MODEL GEOMETRY:
----------------------------------------------------------------------
  Faces: 5
  Unique Edges: 20
  Edges with BCs: 16
  Edges without BCs: 4

FILE PERSISTENCE:
----------------------------------------------------------------------
  Assignment File: ✓ Exists
    Saved assignments: 16
    Memory assignments: 16
    ✓ Match: true
  BC Database File: ✓ Exists
    Custom BCs: 2
    Disabled built-in BCs: 0

RECOMMENDATIONS:
----------------------------------------------------------------------
  • 4 edges still need BC assignment
```

**Clear All Edge Assignments**

**Menu Path**: `Boundary Conditions → Assign & View → Clear All Edge Assignments`

**Purpose**: Removes ALL BC assignments from all edges.

**Warning**: This action cannot be undone automatically (must reload from saved file).

**Clear Invalid BC Assignments**

**Menu Path**: `Boundary Conditions → Assign & View → Clear Invalid BC Assignments`

**Purpose**: Removes BC assignments that reference deleted or non-existent BCs.

**Use Case**: Clean up after deleting custom BCs or importing models with missing BCs.

#### Custom BC Management

**Create Custom BC**

**Menu Path**: `Boundary Conditions → Manage BCs → Create Custom BC...`

**Parameters**:

* **BC Name**: Unique identifier for the BC
* **Category**: Interior, Exterior, Ground, Frame, Glazing, Adiabatic, or Custom
* **Heat Transfer Coefficient (h)**: In W/m²K
* **Temperature**: In °C
* **U-Factor Tag**: Optional tag for U-factor calculations
* **Description**: Text description of the BC
* **Include Convection**: Yes/No
* **Include Radiation**: Yes/No

**Example - Creating a Custom Interior BC**:

```
BC Name: Interior, low airflow
Category: Interior
h: 5.0 W/m²K
Temperature: 22°C
U-Factor Tag: Interior
Description: Interior surface with reduced air movement
Include Convection: Yes
Include Radiation: No
```

**Edit BC**

**Menu Path**: `Boundary Conditions → Manage BCs → Edit BC...`

**Behaviour**:

* **Custom BCs**: Edits directly
* **Built-in BCs**: Creates a custom copy (preserves original)

**Use Cases**:

* Adjust temperature conditions
* Fine-tune heat transfer coefficients
* Update descriptions
* Change U-Factor tags

**Edge Reassignment**: If you rename a BC, all edges assigned to the old name are automatically updated to the new name.

**Duplicate BC**

**Menu Path**: `Boundary Conditions → Manage BCs → Duplicate BC...`

**Purpose**: Creates a copy of an existing BC as a starting point for customisation.

**Process**:

1. Select source BC
2. Enter new BC name
3. New BC created with same properties but different colour
4. Edit the duplicate as needed

**Use Case**: Create variations of standard BCs (e.g., "Exterior, air" → "Exterior, air, low wind")

**Delete BC**

**Menu Path**: `Boundary Conditions → Manage BCs → Delete BC...`

**Behaviour**:

* **Custom BCs**: Permanently deleted
* **Built-in BCs**: Disabled (hidden but preserved)

**Warning Check**: If BC is currently assigned to edges, plugin warns you and recommends clearing assignments first.

**Undo**:

* Custom BCs: Cannot be recovered (must recreate)
* Built-in BCs: Can be restored using "Restore Disabled Built-in BCs"

**Delete All Custom BCs**

**Menu Path**: `Boundary Conditions → Manage BCs → Delete All Custom BCs`

**Purpose**: Bulk deletion of all user-created custom BCs.

**Safety**: Built-in BCs are not affected.

**Confirmation**: Requires OK/Cancel confirmation.

**Restore Disabled Built-in BCs**

**Menu Path**: `Boundary Conditions → Manage BCs → Restore Disabled Built-in BCs`

**Purpose**: Re-enables any built-in BCs that were previously deleted/disabled.

**Use Case**: Recover from accidental deletion of built-in BCs.

**Reset Database to Defaults**

**Menu Path**: `Boundary Conditions → Manage BCs → Reset Database to Defaults...`

**Purpose**: Complete reset of BC database to factory defaults.

**What it Does**:

1. Deletes ALL custom BCs
2. Restores ALL disabled built-in BCs
3. Keeps existing edge assignments (may become invalid)

**Warning**: This action cannot be undone!

**Use Case**: Start fresh after extensive customisation.

**Show BC Management Summary**

**Menu Path**: `Boundary Conditions → Manage BCs → Show BC Management Summary`

**Output Example**:

```
Boundary Condition Management Summary
============================================================

BUILT-IN BCs:
  Total: 6
  Active: 6
  Disabled: 0

CUSTOM BCs:
  Created: 3

AVAILABLE BCs: 9

ASSIGNMENTS:
  Edges with BCs: 20

DISABLED BUILT-IN BCs:
------------------------------------------------------------
  (None)
```

#### BC Import/Export

**Export BC Database**

**Menu Path**: `Boundary Conditions → Import/Export → Export BC Database...`

**Purpose**: Export all BCs (built-in + custom) to a JSON file for backup or sharing.

**Output File**: User-selected location, JSON format

**Use Cases**:

* Backup before major changes
* Share custom BCs with team
* Transfer BCs between computers
* Version control for BC library

**Import BC Database**

**Menu Path**: `Boundary Conditions → Import/Export → Import BC Database...`

**Purpose**: Import BCs from a previously exported JSON file.

**Behaviour**:

* Imports only BCs that don't already exist
* Skips duplicate BC names
* Reports count of imported and skipped BCs

**Use Case**: Add custom BCs from colleagues or previous projects.

**Save Edge Assignments**

**Menu Path**: `Boundary Conditions → Import/Export → Save Edge Assignments`

**Purpose**: Manually save current edge BC assignments to file.

**Note**: Assignments are auto-saved after each change, but this allows manual save.

**File Location**: `Documents/SketchUp_THERM_Files/BoundaryConditions/edge_assignments.json`

**Load Edge Assignments**

**Menu Path**: `Boundary Conditions → Import/Export → Load Edge Assignments`

**Purpose**: Manually load edge assignments from file.

**Behaviour**:

* Only loads if file matches current model GUID
* Updates edge colours to match assigned BCs
* Overwrites current assignments in memory

**Use Case**: Restore previous BC assignments after changes.

</details>

<details>

<summary>Visualisation Tools</summary>

#### Tagging and Labelling

**Tag Faces with Material Info**

**Menu Path**: `Visualisation → Tag Faces with Material Info`

**What it Does**:

1. Adds THERM material properties to face attributes
2. Creates a comprehensive legend as 3D text
3. Stores metadata in SketchUp's attribute system

**Legend Contents**:

* Material name
* Conductivity (W/mK)
* Emissivity front
* Emissivity back
* Category
* Face count

**Legend Location**: Positioned to the right of model bounds

**Removal**: Use "Clear Material Tags" to remove attribute data

**Organise into Material Layers**

**Menu Path**: `Visualisation → Organise into Material Layers`

**Purpose**: Automatically creates SketchUp layers based on material categories and assigns faces to appropriate layers.

**Layers Created**:

* THERM-Metals
* THERM-Insulation
* THERM-Wood
* THERM-Masonry
* THERM-Glass
* THERM-Plastics
* THERM-Boards
* THERM-Membranes
* THERM-Air
* THERM-Default
* THERM-Uncategorised

**Benefits**:

* Better model organisation
* Quick visibility control
* Layer-based selection
* Professional presentation

**Removal**: Use "Remove THERM Layers" to delete layers and move faces back to Layer0

**Show Complete Labels (Materials + BCs)**

**Menu Path**: `Visualisation → Show Complete Labels (Materials + BCs)`

**What it Creates**:

1. **Materials Legend**: Positioned right of model
   * Lists all materials used
   * Shows conductivity values
   * Displays face counts
2. **BC Legend**: Positioned below materials legend
   * Lists all BCs assigned
   * Shows h values and temperatures
   * Displays edge counts
3. **Face Labels**: 3D text on each face
   * Shows material name
   * Positioned at face centre
   * Offset slightly from surface
4. **Edge Labels**: 3D text on assigned edges
   * Shows BC name
   * **Export Debug**:
   * Positioned at edge midpoint
   * Labelled as "BC: \[name]"

**Group Name**: "THERM\_Material\_Labels"

**Removal**: Use "Hide Labels/Legend"

**Show Legend Only**

**Menu Path**: `Visualisation → Show Legend Only`

**Purpose**: Creates legends without individual face/edge labels (cleaner visualisation).

**Contents**:

* Materials legend with full details
* BC legend with full details
* No face labels
* No edge labels

**Use Case**: Documentation, presentations, export to PDF/image

**Hide Labels/Legend**

**Menu Path**: `Visualisation → Hide Labels/Legend`

**Purpose**: Removes all visible labels and legends created by the visualisation tools.

**What it Removes**:

* Material legends
* BC legends
* Face labels
* Edge labels
* Associated groups

**Note**: Does not remove face attribute tags - use "Clear Material Tags" for that.

**Show Visualisation Summary**

**Menu Path**: `Visualisation → Show Visualisation Summary`

**Output Example**:

```
THERM Visualisation Summary
============================================================

GEOMETRY:
  Total Faces: 25
  Tagged Faces: 25

LAYERS:
  THERM Layers: 5
    • THERM-Insulation
    • THERM-Wood
    • THERM-Boards
    • THERM-Membranes
    • THERM-Glass

LABELS:
  Status: Visible

ENTITY INFO:
  Status: Enabled

MATERIAL DISTRIBUTION:
  Insulation-Fibreglass: 10 face(s)
  Wood-Plywood: 8 face(s)
  Gypsum Board: 7 face(s)
```

**Clear Material Tags**

**Menu Path**: `Visualisation → Clear Material Tags`

**Purpose**: Removes THERM material attribute data from faces without affecting visual appearance.

**What it Removes**:

* Face attributes (THERM\_Display dictionary)
* Material metadata
* Property information

**What it Keeps**:

* Face materials (visual appearance)
* Geometry
* Layers
* BC assignments

**Remove THERM Layers**

**Menu Path**: `Visualisation → Remove THERM Layers`

**Purpose**: Deletes all THERM-prefixed layers and moves faces back to Layer0.

**Process**:

1. Identifies all layers starting with "THERM-"
2. Moves all faces on those layers to Layer0
3. Deletes the empty THERM layers

**Confirmation**: Requires OK/Cancel confirmation

</details>

<details>

<summary>Entity Info Display</summary>

#### Overview

The Entity Info Display feature integrates THERM material and BC information directly into SketchUp's native Entity Info panel.

#### Enable Entity Info Display

**Menu Path**: `Entity Info Display → Enable Entity Info Display`

**What it Does**:

1. Activates a selection observer
2. Monitors selected entities
3. Updates Entity Info panel in real-time
4. Shows THERM properties alongside SketchUp properties

**How to Use**:

1. Enable the feature via menu
2. Select a face or edge
3. Open Entity Info panel: `Window → Entity Info`
4. View THERM properties

#### Entity Info for Faces

**When a face is selected, shows**:

* **THERM Material**: Material name
* **Conductivity**: Value in W/mK
* **Emissivity (Front)**: Front surface emissivity
* **Emissivity (Back)**: Back surface emissivity
* **Category**: Material category

**Example**:

```
Entity Info Panel:
--------------------
Face
Area: 2.4 m²
Layer: Layer0
Material: Insulation-Fibreglass

THERM Material: Insulation-Fibreglass
Conductivity: 0.040 W/mK
Emissivity (Front): 0.900
Emissivity (Back): 0.900
Category: Insulation
```

#### Entity Info for Edges

**When an edge is selected, shows**:

* **THERM Boundary Condition**: BC name
* **Heat Transfer Coeff**: h value in W/m²K
* **Temperature**: Temperature in °C
* **Category**: BC category
* **U-Factor Tag**: If assigned

**Example**:

```
Entity Info Panel:
--------------------
Edge
Length: 100 mm
Layer: Layer0

THERM Boundary Condition: Interior, horizontal
Heat Transfer Coeff: 7.69 W/m²K
Temperature: 20.0 °C
Category: Interior
U-Factor Tag: Interior
```

#### Multiple Selection

**When multiple entities are selected**:

* If all have same material/BC: Shows that material/BC info
* If mixed materials/BCs: Shows count of different materials/BCs

#### Disable Entity Info Display

**Menu Path**: `Entity Info Display → Disable Entity Info Display`

**Purpose**: Deactivates the selection observer to improve performance if needed.

#### Clear All Entity Info

**Menu Path**: `Entity Info Display → Clear All Entity Info`

**Purpose**: Removes all THERM\_Info attributes from all faces and edges in the model.

**Use Case**: Clean up before exporting model for other purposes.

</details>

<details>

<summary>Validation &#x26; Diagnostics</summary>

#### Validate Model

**Menu Path**: `Validate Model`

**Purpose**: Pre-export validation to identify potential issues before exporting to THERM.

**Validation Checks**:

**Material Assignment**

* Faces without materials
* Warning if any faces lack materials

**BC Assignment**

* Edges without BCs
* Warning for unassigned edges
* Check for Interior and Exterior BCs
* Warning if neither is assigned

**Geometry**

* Checks if geometry is 2D (all Z coordinates equal)
* Error if 3D geometry detected
* Dimension checks (too small or too large)
* Warning if dimensions < 1mm or > 100m

**BC Database**

* Verifies all assigned BCs exist in database
* Counts BC types used

**Output Example**:

```
Model Validation Report
============================================================

GEOMETRY:
  Faces: 5
  Size: 100.00mm x 2400.00mm

BOUNDARY CONDITIONS:
  Assigned: 16 edges
  Unassigned: 4 edges

  BC Types:
    - Interior, horizontal: 12 edges
    - Exterior, air: 4 edges

============================================================

WARNINGS:
  ⚠ 4 edge(s) have no BC
  ⚠ No faces have materials assigned

✓ Model can be exported (with warnings)
```

**Validation Levels**:

* **✓ Ready**: No errors or warnings
* **✓ Can Export**: Has warnings but no critical errors
* **✗ Fix Errors**: Has critical errors that must be fixed

**Pre-Export Behaviour**:

* If validation fails, export asks for confirmation
* Shows all errors and warnings
* Allows proceed or cancel

#### Debug Output

**Location**: Ruby Console (`Window → Ruby Console`)

**Assignment Debug**:

```
=== Assigning BC ===
BC: Interior, horizontal
U-Factor: Interior
Selected edges: 4
  Assigned to edge ID 12345: Interior, horizontal
  Assigned to edge ID 12346: Interior, horizontal
  Assigned to edge ID 12347: Interior, horizontal
  Assigned to edge ID 12348: Interior, horizontal
Total BC assignments in memory: 16
```

**Export Debug**:

```
=== Creating THERM XML ===
Faces to export: 5
Edge BC map size: 16
Available BCs: Interior, horizontal, Exterior, air
BCs to export: Interior, horizontal, Exterior, air
  Exported BC: Interior, horizontal (h=7.692, T=20.0)
  Exported BC: Exterior, air (h=250.0, T=0.0)
  Exported boundary 1: Edge 12345 -> Interior, horizontal (Polygon 1)
  Exported boundary 2: Edge 12346 -> Interior, horizontal (Polygon 1)
  ...
=== Export Complete ===
Total boundaries exported: 16
========================
```

**Use Debug Output**:

* Monitor during assignment
* Verify BC application
* Troubleshoot export issues
* Confirm boundary count

</details>

<details>

<summary>Settings &#x26; Preferences</summary>

#### Set THERM Path

**Menu Path**: `Settings → Set THERM Path...`

**Purpose**: Configure the location of THERM7.exe for automatic launching.

**Default Locations Checked**:

* `C:/Program Files/LBNL/THERM 7.8/THERM7.exe`
* `C:/Program Files (x86)/LBNL/THERM 7.8/THERM7.exe`
* `C:/Program Files (x86)/lbnl/THERM7.8/THERM7.exe`

**Manual Setup**:

1. Click menu option
2. Browse to THERM7.exe location
3. Select file
4. Path is saved in SketchUp preferences

#### Set Geometry Offset

**Menu Path**: `Settings → Set Geometry Offset...`

**Purpose**: Add X and Y offset to exported coordinates (useful for positioning in THERM).

**Parameters**:

* **X Offset**: Horizontal shift in millimetres
* **Y Offset**: Vertical shift in millimetres

**Default**: 0, 0 (no offset)

**Use Cases**:

* Position geometry away from origin
* Align with existing THERM models
* Create standard positioning

**Example**:

```
X Offset: 50 mm
Y Offset: 100 mm

Original point: (10, 20)
Exported point: (60, 120)
```

#### Show Preferences

**Menu Path**: `Settings → Show Preferences`

**Output Example**:

```
THERM/DXF Exporter Preferences
============================================================

VERSION: 5.2.0

THERM Path: C:/Program Files/LBNL/THERM 7.8/THERM7.exe

Geometry Offset:
  X: 0 mm
  Y: 0 mm

Export Dir: C:/Users/[Username]/Documents/SketchUp_THERM_Files
Materials: 51
BCs: 6 (0 custom, 0 disabled)

Entity Info Display: Enabled

EXPORT FORMATS:
  • THMX (THERM 7.8 XML)
  • DXF (AutoCAD/THERM compatible)
```

#### Working Directories

**Main Directory**:

```
Documents/SketchUp_THERM_Files/
```

**Subdirectories**:

* `Materials/` - Material library JSON files
* `BoundaryConditions/` - BC database and assignment files

**Files Created**:

* `edge_assignments.json` - Edge BC assignments
* `boundary_conditions.json` - Custom and disabled BCs
* `therm_materials_library.json` - Material library
* `[filename].thmx` - Exported THERM files
* `[filename].dxf` - Exported DXF files

</details>

<details>

<summary>Troubleshooting</summary>

#### Common Issues

**Issue: BCs Not Exporting to THERM**

**Symptoms**:

* THERM file opens but shows no boundary conditions
* All edges appear as adiabatic in THERM

**Solutions**:

1. **Check BC Assignments**:
   * Run `Diagnose BC Issues`
   * Verify edges have BCs assigned
   * Check Ruby Console for export output
2. **Verify BC Database**:
   * Run `List All BCs by Category`
   * Ensure BCs exist in database
   * Check for invalid assignments
3. **Re-assign BCs**:
   * Select edges
   * Use `Assign BC to Edges`
   * Verify colour change
4. **Check Save Status**:
   * Manually run `Save Edge Assignments`
   * Verify file created in BC directory
   * Reload SketchUp and test again

**Issue: Materials Not Appearing in THERM**

**Symptoms**:

* THERM file shows "Default Material" for all faces
* Material properties incorrect

**Solutions**:

1. **Verify Material Application**:
   * Use `Show Existing Materials`
   * Confirm materials exist in model
   * Check faces have materials applied
2. **Recreate Materials**:
   * Run `Create Material Collection` again
   * Reapply materials to faces
   * Export again
3. **Check Material Names**:
   * Material names must exactly match THERM database
   * No typos or extra spaces
   * Use materials from plugin, not custom materials

**Issue: Geometry Not 2D**

**Symptoms**:

* Validation error: "Geometry is not 2D"
* Export fails or creates incorrect THERM model

**Solutions**:

1. **Check Z-coordinates**:
   * All vertices must have same Z value
   * Usually Z=0
2. **Flatten Geometry**:
   * Select all geometry
   * Use Ruby Console:

```
ruby     Sketchup.active_model.entities.grep(Sketchup::Face).each do |f|
       f.vertices.each { |v| v.position.z = 0 }
     end
```

3. **Work in 2D**:
   * Draw in XY plane only
   * Lock inference to red/green axes
   * Avoid inferencing to blue axis

**Issue: Edge Assignments Not Persisting**

**Symptoms**:

* BC assignments disappear after closing SketchUp
* Edge colours reset

**Solutions**:

1. **Manual Save**:
   * After assigning BCs, use `Save Edge Assignments`
   * Verify file created
2. **Check Model GUID**:
   * Assignments are model-specific
   * Saving model with different name creates new GUID
   * Use `Save As` carefully
3. **File Location**:
   * Verify write permissions to Documents folder
   * Check antivirus not blocking file writes

**Issue: THERM Won't Launch**

**Symptoms**:

* "THERM not found" error
* Launch THERM option doesn't work

**Solutions**:

1. **Set THERM Path**:
   * Go to `Settings → Set THERM Path`
   * Browse to THERM7.exe
   * Click OK
2. **Verify Installation**:
   * Ensure THERM 7.8 is installed
   * Check installation directory
   * Try manual launch outside SketchUp
3. **Use Alternative**:
   * Export file
   * Use `Open Export Folder`
   * Double-click .thmx file manually

**Issue: Colours Too Light in SketchUp**

**Symptoms**:

* Some materials barely visible (especially insulation, air)

**Solution**:

* Version 5.2.0 includes enhanced colours
* All light materials updated for visibility
* If using older version, recreate material collection

**Issue: Ruby Console Errors**

**Common Errors**:

**Error**: `undefined method 'entityID'` **Solution**: Selected object is not an edge or face, select correct geometry

**Error**: `No such file or directory` **Solution**: Working directory issue, verify `Documents/SketchUp_THERM_Files/` exists

**Error**: `JSON parse error` **Solution**: Corrupted JSON file, delete and recreate (BC database or assignments)

#### Getting Help

**Debug Information to Collect**:

* Ruby Console output (copy all errors)
* SketchUp version
* Plugin version (shown in About)
* Diagnostic report output
* Validation report output
* Example model (if possible)

**Contact**:

* Email: <support@betterbuilding.io>
* Include: Subject line "SketchUp THERM Exporter - \[issue]"

</details>

<details>

<summary>Workflow Example</summary>

#### Example: Simple Wall Assembly

**Goal**: Create a 3-layer wall cross-section with interior and exterior BCs.

**Steps**:

**Draw Geometry** (2 minutes):

```
   - Rectangle: 100mm (width) x 2400mm (height)
   - Vertical lines at: 13mm, 103mm
   - Result: 3 vertical strips
```

**Create Materials** (30 seconds):

```
   - Materials → Create Material Collection
   - Confirms materials created
```

**Apply Materials** (1 minute):

```
   - Left strip (13mm): Gypsum Board
   - Middle strip (90mm): Insulation-Fibreglass
   - Right strip (13mm): Cement Board
```

**Assign BCs** (1 minute):

```
   - Select left vertical edge: Interior, horizontal
   - Select right vertical edge: Exterior, air
   - Select top edge: Interior, horizontal
   - Select bottom edge: Interior, horizontal
```

**Validate** (15 seconds):

```
   - Validate Model
   - Check: All green, ready to export
```

**Export** (30 seconds):

```
   - Export → Export to THERM (THMX)
   - File Name: wall_assembly
   - Cross-Section: Wall
   - After Export: Launch THERM
```

**Result**: Complete wall assembly opens in THERM with all materials and BCs correctly assigned.

</details>

<details>

<summary>Best Practices</summary>

#### Modelling

**Always work in 2D**:

* Draw in XY plane (red-green)
* Keep Z = 0 for all geometry
* Use face-on view for accuracy

**Use consistent units**:

* Set SketchUp units to millimetres
* Model at actual size (1:1)
* THERM uses millimetres

**Create clean geometry**:

* No overlapping faces
* No gaps between faces
* No reversed faces

**Name your sections descriptively**:

* Include location (sill, head, jamb)
* Include project identifier
* Use consistent naming convention

#### Material Assignment

**Create materials first**:

* Run "Create Material Collection" before modelling
* Materials persist with the model file
* Can apply during or after modelling

**Use correct material categories**:

* Match physical material to THERM material
* Check conductivity values
* Verify emissivity for radiation

**Apply to all faces**:

* No face should be unpainted
* Use Default Material as last resort
* Validation will warn about missing materials

#### BC Assignment

**Assign systematically**:

* Interior surfaces first
* Exterior surfaces second
* Special conditions last (ground, cavities)

**Use U-Factor tags**:

* Tag all surfaces for U-factor calculations
* Use "Interior" and "Exterior" at minimum
* Tag frame components appropriately

**Auto-assign for speed**:

* Use auto-assign for simple models
* Manually assign for complex models
* Review after auto-assignment

**Save regularly**:

* Plugin auto-saves after changes
* Manually save before major changes
* Export BC database for backup

#### Validation

**Validate before export**:

* Always run validation
* Fix all errors
* Address warnings when possible

**Use diagnostic tools**:

* Run "Diagnose BC Issues" for troubleshooting
* Check Ruby Console for detailed output
* Review validation report carefully

**Test export in THERM**:

* Open exported file in THERM
* Verify materials show correctly
* Check BC assignments and temperatures
* Review U-factor tags

#### Organisation

**Use layers**:

* Organise by material category
* Easy visibility control
* Better model management

**Use scenes**:

* Create scenes for different views
* Document material assignments
* Show BC assignments

**Create documentation**:

* Use "Show Legend Only" for reports
* Export legend as image
* Include in project documentation

</details>

<details>

<summary>Frequently Asked Questions</summary>

**Q: Do I need THERM installed to use this plugin?** A: No. The plugin works independently. THERM is only needed to open exported .thmx files.

**Q: Can I use my own custom materials?** A: Yes. Create custom materials using "Create Custom BC" but ensure thermal properties are correct.

**Q: Why aren't my BCs exporting?** A: Run "Diagnose BC Issues" to identify the problem. Common causes: BCs not assigned, invalid BC references, or edges not part of face boundaries.

**Q: Can I import existing THERM files?** A: No. This plugin is export-only. Draw geometry in SketchUp and export to THERM.

**Q: What units does the plugin use?** A: SketchUp uses inches internally. Export converts to millimeters for THERM. DXF exports in inches (use 2540% scaling when importing to THERM).

**Q: How do I share my custom BCs with colleagues?** A: Use "Export BC Database" to create a JSON file. Share this file and colleagues can import using "Import BC Database".

**Q: Can I edit built-in BCs?** A: When you edit a built-in BC, the plugin creates a custom copy. The original built-in BC remains unchanged.

**Q: What's the difference between THMX and DXF export?** A: THMX includes everything (geometry, materials, BCs). DXF is geometry-only for CAD software.

**Q: My model has 3D geometry. Can I still export?** A: THERM requires 2D geometry. Flatten your model to Z=0 before exporting.

**Q: How do I backup my work?** A: Export BC Database and save your .skp file. These contain all assignments and settings.

</details>
