ACAPI_Attribute_Modify
속성을 변경합니다.
GSErrCode ACAPI_Attribute_Modify ( API_Attribute* attribute, API_AttributeDef* defs );
파라미터
- attribute
- [in] 변경할 속성은 헤더의
typeID
와index
필드들에 의해 정의됩니다. - defs
- [in] 필요한 속성에 대한 확장된 정보입니다.
리턴 값
NoError
- 함수가 성공적으로 완료되었습니다.
APIERR_BADPARS
- 전달된 파라미터가
NULL입니다; attribute, [defs]
APIERR_BADID
- 속성 타입이 유효하지 않습니다.
APIERR_BADINDEX
- 속성 인덱스가 유효하지 않습니다.
APIERR_DELETED
- 속성이 데이터베이스에 존재하지 않습니다.
APIERR_REFUSEDPAR
- 레이어, 채우기, 라인 타입에 대하여 인덱스 1을 가진 속성을 변경할 수 없습니다. 솔리드 채우기와 빈 채우기 역시 변경할 수 없습니다.
다른 공통 API 오류들에 대해서는 API 오류 문서를 보십시오.
설명
이 함수는 속성을 변경하는 데 사용합니다. 변경할 속성은 속성 헤더의 typeID
와 index
필드들에 의해 식별됩니다.
전달된 API_Attribute structure 또는 API_AttributeDef에 주어진 확장된 정보를 통해 파라미터들을 변경할 수 있습니다.
예제
API_Attribute attrib; API_AttributeDefs defs; short ltypeIndex; GSErrCode err; BNZeroMemory (&attrib, sizeof (API_Attribute)); BNZeroMemory (&defs, sizeof (API_AttributeDefs)); /* "Wave" 라인 타입에 대한 모든 정보를 가져옴 */ attrib.header.typeID = API_LinetypeID; CHCopyC ("Wave", attrib.header.name); err = ACAPI_Attribute_Get (&attrib); if (err == NoError) { err = ACAPI_Attribute_GetDef (attrib.header.typeID, attrib.header.index, &defs); } if (err == NoError) { attrib.header.flags |= APILine_ScaleWithPlan; attrib.lineType.defineScale = 100.0; err = ACAPI_Attribute_Modify (&attrib, &defs); } ACAPI_DisposeAttrDefsHdls (&defs);
요구사항
- 버전: API 1.3 또는 이후
- 헤더: ACAPinc.h