# AddFormattedProcProgramData

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

전송할 Formatted Recipe 메시지에 특정 C-Code와 그와 관련된 파라미터 리스트를 추가합니다.\
하나의 레시피는 여러 개의 C-Code로 구성될 수 있으므로, 루프를 돌며 이 함수를 반복 호출하여 전체 레시피 구조를 완성하게 됩니다.

{% hint style="info" %}
Data를 모두 추가한 후 ReplyFormattedProcProgramUpload() 함수를 통해 응답 메시지를 보냅니다.
{% endhint %}

Parameters

<table data-header-hidden><thead><tr><th width="186"></th><th width="159"></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>string[]</td><td>해당 C-Code에 포함될 파라미터 이름 배열</td></tr><tr><td>arrParamVal</td><td>string[]</td><td>해당 C-Code에 포함될 파라미터 값 배열</td></tr></tbody></table>

```csharp
void SendFormattedRecipe(int lMsgId)
{
    // 첫 번째 스텝 추가
    string[] names1 = { "TEMP", "TIME" };
    string[] values1 = { "100", "30" };
    m_gem.AddFormattedProcProgramData(lMsgId, "HEAT_STEP", names1, values1);

    // 두 번째 스텝 추가
    string[] names2 = { "PRESSURE", "GAS" };
    string[] values2 = { "10.5", "Ar" };
    m_gem.AddFormattedProcProgramData(lMsgId, "GAS_STEP", names2, values2);
    
    // 이후 ReplyFormattedProcProgramUpload를 호출하여 최종 전송
    m_gem.ReplyFormattedProcProgramUpload(lMsgId,"MDLN","SOFTREV",1);
}
```


---

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