> 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/getitemvalue.md).

# GetItemValue

### int GetItemValue(int lMsgId, string sPointer, ref string pstrValue)

메시지(`lMsgId`) 내의 특정 경로(`sPointer`)에 위치한 값을 조회하여 문자열(`pstrValue`)로 반환합니다. 내부적으로는 복잡한 바이너리 데이터를 사람이 읽을 수 있는 텍스트로 변환하는 과정을 거치므로, 별도의 복잡한 파싱 로직 없이도 데이터를 쉽게 확인할 수 있습니다.

Parameters

<table data-header-hidden><thead><tr><th width="186"></th><th width="161"></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>lMsgId</td><td>int</td><td>값을 읽어올 대상 메시지 ID</td></tr><tr><td>sPointer</td><td>string</td><td>"/ "이면 List<br>"1"이면 첫번째 아이템<br>"2"이면 두번째 아이템</td></tr><tr><td>pstrValue</td><td>ref string</td><td>(Output) 추출된 데이터 값이 담길 문자열 변수</td></tr></tbody></table>

{% code title="Host에서 보낸 메시지 예시" %}

```
S2F33W   /* DEFINE REPORT */
<L
   <U2 1>
   <L
      <L
         <U2 1004>
         <L
            <U4 2001>
            <U4 2003>
            <U4 2009>
         >
      >
   >
>

```

{% endcode %}

```csharp
void ReadMessageData(int lMsgId)
{
    string extractedValue = "";
    
    // U4 2001의 값을 얻어옵니다.
    int result = m_gem.GetItemValue(lMsgId, "/2/1/2/1", ref extractedValue);//2001

    if (result >= 0)
    {
        Console.WriteLine($"추출된 값: {extractedValue}");//2001
    }
    else
    {
        Console.WriteLine("값 조회 실패!");
    }
}
```


---

# 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/getitemvalue.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.
