> For the complete documentation index, see [llms.txt](https://primer2.dynamobim.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://primer2.dynamobim.org/ko/5_essential_nodes_and_concepts/5-5_dictionaries-in-dynamo/4-dictionary-use-cases.md).

# Revit 사용 사례

Revit에서 포함된 데이터의 일부를 사용해서 항목을 조회하려고 한 적이 있습니까?

다음 예와 같이 작업을 수행할 수 있습니다.

아래 이미지에서는 Revit 모델의 모든 룸을 수집하고, 원하는 룸의 색인(룸 번호 기준)을 가져오고, 마지막으로 색인의 룸을 가져오는 작업을 수행합니다.

!

> 1. 모델의 모든 룸을 수집합니다.
> 2. 찾을 룸 번호입니다.
> 3. 룸 번호를 가져오고 해당 룸 번호가 있는 색인을 찾습니다.
> 4. 색인에서 룸을 가져옵니다.

## 연습: 룸 사전

### 1부: 룸 사전 작성

> 아래 링크를 클릭하여 예제 파일을 다운로드하십시오.
>
> 전체 예시 파일 리스트는 부록에서 확인할 수 있습니다.

이제 사전을 사용하여 이 아이디어를 다시 작성해 보겠습니다. 먼저 Revit 모델에서 모든 룸을 수집해야 합니다.

!

> 1. 작업할 Revit 카테고리를 선택합니다(이 경우에는 룸 사용).
> 2. Dynamo에 모든 요소를 수집하도록 지시합니다.

다음에는 이 데이터를 조회하는 데 사용할 키를 결정해야 합니다. 키에 대한 정보는 [사전이란 무엇입니까?](/ko/5_essential_nodes_and_concepts/5-5_dictionaries-in-dynamo/1-what-is-a-dictionary.md) 섹션에서 찾을 수 있습니다.

!

> 1. 사용할 데이터는 룸 번호입니다.

이제 지정된 키 및 요소로 사전을 작성합니다.

!

> 1. 적절한 입력이 주어지면 노드 **Dictionary.ByKeysValues**가 사전을 작성합니다.
> 2. `Keys`는 문자열이어야 하지만, `values`는 다양한 객체 유형일 수 있습니다.

마지막으로, 이제 룸 번호를 사용하여 사전에서 룸을 검색할 수 있습니다.

!

> 1. `String`은 사전에서 객체를 조회하는 데 사용하는 키입니다.
> 2. **Dictionary.ValueAtKey**가 이제 사전에서 객체를 가져옵니다.

### 2부: 값 조회

동일한 사전 논리를 사용하여 그룹화된 객체로 사전을 작성할 수도 있습니다. 지정된 레벨에서 모든 룸을 조회하려면 다음과 같이 위 그래프를 수정하면 됩니다.

!

> 1. 이제 룸 번호를 키로 사용하는 대신, 매개변수 값을 사용할 수 있습니다(이 경우에는 레벨 사용).

!

> 2. 이제 룸이 있는 레벨을 기준으로 룸을 그룹화할 수 있습니다.

!

> 3. 이제 요소가 레벨로 그룹화되므로 공유 키(고유 키)를 사전용 키로 사용하고 룸 리스트를 요소로 사용할 수 있습니다.

!

> 4. 마지막으로 Revit 모델의 레벨을 사용하여 사전에서 해당 레벨에 있는 룸을 조회할 수 있습니다. `Dictionary.ValueAtKey`는 레벨 이름을 가져온 후 해당 레벨에서 룸 객체를 반환합니다.

사전을 사용할 수 있는 기회는 무궁무진합니다. Revit의 BIM 데이터를 요소 자체에 연결하는 기능은 다양한 사용 사례에 제시할 수 있습니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://primer2.dynamobim.org/ko/5_essential_nodes_and_concepts/5-5_dictionaries-in-dynamo/4-dictionary-use-cases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
