ACAPI_Attribute_ModifyExt
속성을 변경합니다.
GSErrCode ACAPI_Attribute_ModifyExt ( API_Attribute* attribute, API_AttributeDefExt* 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_AttributeDefExt에 주어진 확장된 정보를 통해 파라미터들을 변경할 수 있습니다.
ACAPI_Attribute_Modify 함수 대신 이 함수를 사용하십시오. 왜냐하면 API_AttributeDefExt structure가 API_AttributeDef보다 더 많은 필드들을 포함하고 있기 때문입니다. (복합 벽 속성에 대한 자세한 정보)
예제
API_Attribute attrib; API_AttributeDefsExt defs; short ltypeIndex; GSErrCode err; BNZeroMemory (&attrib, sizeof (API_Attribute)); BNZeroMemory (&defs, sizeof (API_AttributeDefsExt)); /* "Comp Wall 0.6" 복합에 대한 모든 정보를 가져옴 */ attrib.header.typeID = API_CompWallID; CHCopyC ("Comp Wall 0.6", attrib.header.name); err = ACAPI_Attribute_Get (&attrib); if (err == NoError) { err = ACAPI_Attribute_GetDefExt (attrib.header.typeID, attrib.header.index, &defs); } if (err == NoError) { for (short i = 0; i < attrib.compWall.nComps + 1; i++) { (*defs.cwall_compLItems)[i].ltypeInd = 3; (*defs.cwall_compLItems)[i].linePen = 3; } err = ACAPI_Attribute_ModifyExt (&attrib, &defs); } ACAPI_DisposeAttrDefsHdlsExt (&defs);
요구사항
- 버전: API 5.1 또는 이후
- 헤더: ACAPinc.h