# INFORTREAT BIM Viewer - Quick Start Guide

This guide will help you get the INFORTREAT BIM Viewer up and running on your WordPress site in minutes.

## 📋 Prerequisites

- WordPress 5.0 or higher
- Admin access to your WordPress installation
- A `.xkt` model file and optional `_metadata.json` file

## 🚀 Installation (5 minutes)

### Step 1: Upload the Plugin

**Option A: Via WordPress Admin (Recommended)**
1. Download the plugin ZIP file
2. Go to WordPress Admin → **Plugins** → **Add New**
3. Click **Upload Plugin**
4. Choose the ZIP file and click **Install Now**
5. Click **Activate Plugin**

**Option B: Via FTP**
1. Extract the plugin ZIP file
2. Upload the `infortreat-bim-viewer` folder to `/wp-content/plugins/`
3. Go to WordPress Admin → **Plugins**
4. Find "INFORTREAT Web BIM" and click **Activate**

### Step 2: Upload Your Model

1. Go to **Media** → **Add New**
2. Upload your `.xkt` or `.bin` model file
3. (Optional) Upload the corresponding `_metadata.json` file to the same location
4. Copy the file URL from the Media Library

### Step 3: Create a Page with the Viewer

1. Go to **Pages** → **Add New**
2. Give your page a title (e.g., "Pietro Sardi 1638 - Bastioned Front")
3. Add a **Shortcode** block
4. Paste the shortcode:

```
[bim_viewer url="YOUR_MODEL_URL_HERE" name="Pietro Sardi, 1638"]
```

5. Replace `YOUR_MODEL_URL_HERE` with the URL you copied
6. Click **Publish**

## ✅ That's It!

Visit your page and you should see an interactive 3D viewer with your model!

## 🎨 Next Steps

- **Customize colors:** Edit `viewer.css` (see [CUSTOMIZATION.md](CUSTOMIZATION.md))
- **Add multiple treatises:** See [MULTI_TREATISE_GUIDE.md](MULTI_TREATISE_GUIDE.md)
- **Create metadata:** Use the Python script to extract properties from IFC files

## 🆘 Troubleshooting

### Model doesn't load
- Check the console (F12) for error messages
- Verify the URL is correct and accessible
- Ensure the file is `.xkt` or `.bin` format
- Check that the file uploaded successfully

### Properties don't show
- Verify the `_metadata.json` file exists
- Check the filename matches (e.g., `model.xkt` needs `model_metadata.json`)
- Ensure the JSON file is in the same media folder

### Page layout broken
- Your theme might have conflicting styles
- Try adding the viewer to a "Full Width" page template
- Check for JavaScript errors in the console

## 📧 Need Help?

- Open an issue on GitHub
- Check the full README.md for detailed documentation
- Visit [infortreat.unipi.it](https://www.infortreat.unipi.it)
