# SetVIDValue

### int SetVIDValue(int VID, string strValue)

GEM 표준에서 변수(Variable)는 크게 상태 변수인 SVID와 데이터 변수인 DVID로 나뉩니다. 이 함수는 그 두 가지를 구분하지 않고 통합하여 값을 설정할 수 있게 해주는 범용 함수입니다. 실시간 장비 데이터나 이벤트 발생 시 함께 보고해야 할 동적 변수들을 관리할 때 사용됩니다.

Parameters

<table data-header-hidden><thead><tr><th width="235"></th><th width="106"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>VID</td><td>int</td><td>값을 변경하려는 Variable ID (SVID 또는 DVID)</td></tr><tr><td>strValue</td><td>string</td><td>해당 VID에 설정할 새로운 값</td></tr></tbody></table>

```csharp
// 1. 상태 변수(SVID) 업데이트
m_gem.SetVIDValue(1001, "1"); // 장비 가동 상태를 RUN으로

// 2. 데이터 변수(DVID) 업데이트 
// 보통 이벤트(CEID)가 발생하기 직전에 관련 DVID 값을 세팅합니다.
m_gem.SetVIDValue(2001, "LOT_ABCD_1234"); // 현재 작업 중인 Lot ID 업데이트
m_gem.SendEventReport(1); // Lot Start 이벤트 보고 (이때 DVID 2001이 함께 전송됨)
```


---

# 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:

```
GET https://nviasoft.gitbook.io/nviasoft-docs/api-reference/undefined-6/setvidvalue.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.
