# GetFormattedProcProgramData

### int GetFormattedProcProgramData(int lMsgId, string sCCode, ref string\[] arrParamName, ref string\[] arrParamVal)

Formatted Recipe(S7F23) 메시지에서 특정 C-Code에 해당하는 파라미터들의 이름(Name) 리스트와 값(Value) 리스트를 추출합니다.

Parameters

<table data-header-hidden><thead><tr><th width="185"></th><th width="162"></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>sCCode</td><td>string</td><td>데이터를 조회할 대상 명령 코드 (Command Code)</td></tr><tr><td>arrParamName</td><td>ref string[]</td><td>(Output) 해당 C-Code에 속한 파라미터 이름 배열</td></tr><tr><td>arrParamVal</td><td>ref string[]</td><td>(Output) 해당 C-Code에 속한 파라미터 값 배열</td></tr></tbody></table>

```csharp
void OnProcessFormattedRecipe(int lMsgId)
{
    // 1. 먼저 GetFormattedProcProgramInfo 함수를 통해 C-Code 리스트를 얻었다고 가정
    string[] cCodeList = { "STEP1", "STEP2" }; 
    
    foreach (string ccode in cCodeList)
    {
        string[] paramNames = null;
        string[] paramValues = null;

        // 2. 각 C-Code별 상세 파라미터 데이터 추출
        int result = m_gem.GetFormattedProcProgramData(lMsgId, ccode, ref paramNames, ref paramValues);

        if (result >= 0)
        {
            Console.WriteLine($"[C-Code: {ccode}]");
            for (int i = 0; i < paramNames.Length; i++)
            {
                Console.WriteLine($" - {paramNames[i]} : {paramValues[i]}");
            }
        }
    }
}
```


---

# 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-3/getformattedprocprogramdata.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.
