> For the complete documentation index, see [llms.txt](https://nviasoft.gitbook.io/nviasoft-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nviasoft.gitbook.io/nviasoft-docs/api-reference/item-parsing/getlimittransition.md).

# GetLimitTransition

### int GetLimitTransition(int VID, ref int pnLimitID, ref int pnTransitionType, ref string sCurVal, ref string sUpperLimit, ref string sLowerLimit)

\
지정한 VID(Variable ID)에 대해 발생한 리미트 전환(Limit Transition) 상세 정보를 조회합니다. 현재 값은 얼마인지, 어떤 리미트 설정(LimitID)에 걸렸는지, 그리고 상/하한 임계값은 무엇이었는지를 한꺼번에 파악할 수 있게 해줍니다.

Parameters

<table data-header-hidden><thead><tr><th width="175"></th><th width="165"></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>모니터링 대상 변수 ID</td></tr><tr><td>pnLimitID</td><td>ref int</td><td>(Output) 위반이 발생한 리미트의 고유 ID</td></tr><tr><td>pnTransitionType</td><td>ref int</td><td>(Output) 전환 유형 (예: 리미트 진입, 리미트 이탈 등)</td></tr><tr><td>sCurVal</td><td>ref string</td><td>(Output) 이벤트 발생 시점의 현재 데이터 값</td></tr><tr><td>sUpperLimit</td><td>ref string</td><td>(Output) 설정되어 있던 상한 임계값</td></tr><tr><td>sLowerLimit</td><td>ref string</td><td>(Output) 설정되어 있던 하한 임계값</td></tr></tbody></table>

```csharp
void CheckVariableLimit(int targetVID)
{
    int limitID = 0;
    int transitionType = 0;
    string curVal = "", upper = "", lower = "";

    // 특정 변수의 리미트 전환 정보 조회
    int result = m_gem.GetLimitTransition(targetVID, ref limitID, ref transitionType, ref curVal, ref upper, ref lower);

    if (result >= 0)
    {
        Console.WriteLine($"[VID: {targetVID}] Limit Event 발생!");
        Console.WriteLine($"현재값: {curVal} (범위: {lower} ~ {upper})");
        Console.WriteLine($"Limit ID: {limitID}, 전환유형: {transitionType}");
    }
}
```


---

# 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/item-parsing/getlimittransition.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.
