# SetFormatCode

### int SetFormatCode(string strItemName, string strFormatCode)

라이브러리에 등록된 각종 ID(ALID, CEID, SVID 등)의 \*\*데이터 포맷(Format Code)\*\*을 설정합니다. 이 설정에 따라 실제 메시지 전송 시 해당 데이터가 지정된 타입으로 인코딩됩니다.

* 대상 ID: ALID, CEID, SVID, ECID, TRID, RPTID, DATAID (DVID는 SVID 설정을 따름)
* 설정 가능 포맷: I1, I2, I4, U1, U2, U4, B, ASCII

Parameters

<table data-header-hidden><thead><tr><th width="200" valign="top"></th><th width="87" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Name</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">strItemName</td><td valign="top">string</td><td valign="top">Minimum 값</td></tr><tr><td valign="top">strFormatCode</td><td valign="top">string</td><td valign="top">Maximum 값</td></tr></tbody></table>

```csharp
 //포맷 설정관련 함수들 입니다.
 //===========================================
 m_gem.SetFormatCode("SVID", "U4");
 m_gem.SetFormatCode("CEID", "U4");
 m_gem.SetFormatCode("ALID", "U4");
 m_gem.SetFormatCode("ECID", "U4");
 m_gem.SetFormatCode("SMPLN", "U4");
 m_gem.SetFormatCode("TRACEID", "U4");
 m_gem.SetFormatCode("RPTID", "U4");
 m_gem.SetFormatCode("DATAID", "U4");
 //===========================================
```


---

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