# Script 2 | Update Door Data

## 👉 Description

The Script's purpose is to automatically update all of the door element's data based on its location and sort it based on the unique number for the door schedule.

## 👣 Steps

### 1️⃣ Door Leaves Type

> Users need to prepare the Door Type Family by inputting the "Door Leaves Type" Type Parameter. This parameter represents the door's opening mechanism. For further explanation on the parameter refer to [The Theory of Door Page](/dorche-door-schedule-automation/theory-of-door.md)
>
> ![type of door opening](/files/rTC1tnxDmMWgOda2VXBm)\
> Note : In case there are existing door, users can intentionally keep blank this parameter to automatically hide from door schedule and halftone the door in key plan.&#x20;
>
> ![door leaves type parameter](/files/JpjLZssjCpumFZR2NDVR)

### 2️⃣ Run The Script

> Users need to open BIM TI Addin Ribbon, Click on "Door Schedule" Drop Down Button. Then click on "Update Data". This script will sort door schedule based on level then door leaves type shutter, and then followed by other door leaves type.&#x20;
>
> ![door number sorting logic](/files/DsFShlBUds8UXbzT761c)
>
> The script also update the door from room and to room based on door location in model.
>
> ![door update data script](/files/nek1t1zFmwBWHZYBX82k)

## 📦 Output

The script updates the Door Element "\_SORTING", "Door From Room" and "Door To Room" Instance Parameters. Please be aware before running the script again that the sorting parameter will affect the door schedule sorting.

![door update door script result](/files/MrKmCZ3FDi0xyqgZXntm)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bim-takenaka-ar.gitbook.io/dorche-door-schedule-automation/how-to-use/script-2-or-update-door-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
