Graphisoft®

API Development KitVersion: 18

ACAPI_SetPreferences_OldVersion

예전 프로젝트 파일 버전들로 저장할 커스텀 Preferences 데이터를 정의합니다.

    GSErrCode  ACAPI_SetPreferences_OldVersion (
        Int32              version,
        GSSize             nByte,
        const void*        data,
        unsigned short     platformSign,
        API_FTypeID        oldPlanFileID
    );

 

파라미터

version
[in] 저장할 데이터의 버전입니다.
nByte
[in] 저장할 데이터의 크기입니다.
data
[in] 지정한 도면 버전에 대하여 저장하고 싶은 Preferences 데이터입니다.
platformSign
[in] 데이터의 플랫폼 식별자입니다. (GS::Win_Platform_Sign, GS::Mac_Platform_Sign, GS::Mactel_Platform_Sign10  또는 GS::Act_Platform_Sign)
oldPlanFileID
[in] 이 도면 버전으로 프로젝트를 저장할 때 Preferences 데이터와 관련된 도면 파일 포맷입니다. 이 파라미터의 값은 다음이 될 수 있습니다:
APIFType_PlanFile, APIFType_PlanFile810, APIFType_PlanFile800, APIFType_PlanFile700, APIFType_PlanFile650, APIFType_PlanFile600.

 

리턴 값

다른 공통 API 오류들에 대해서는 API 오류 문서를 보십시오.

 

설명

이 함수는 당신의 고유 옵션들이나 Preferences를 서버 애플리케이션의 Preferences 파일 또는 저장할 프로젝트 파일에 저장하는 데 사용합니다. 이 정보는 나중에 ACAPI_GetPreferencesACAPI_GetPreferences_Platform로 가져올 수 있습니다.

당신은 서로 다른 도면 파일 포맷들에 저장할 서로 다른 Preferences를 정의할 수 있습니다. 만약 당신의 애드온이 ArchiCAD의 예전 버전들에서 호환되지 않는 Preferences 포맷을 갖고 있다면 이 함수를 사용하십시오. 어떤 도면 버전이 그것을 사용해야 한다고 표시하기 위해 해당 포맷으로 데이터를 저장하십시오. 사용자가 예전 도면 포맷으로 도면을 저장하려고 선택했을 때, 적절한 Preferences 데이터가 저장될 것입니다.

더 자세한 것은 애드온 데이터를 Preferences와 Project File에 저장하기 섹션을 보십시오.

 

예제

const Int32 ActVersion = 3;
const Int32 Version_in_AC8 = 2;
const Int32 Version_in_AC7 = 1;

struct MyPrefs          prefsData;
struct MyPrefs_in_AC8   dataForAC8;
struct MyPrefs_in_AC7   dataForAC7;
// preferences 데이터를 생성함...

// 실제 preferences를 저장
ACAPI_SetPreferences (ActVersion, sizeof (MyPrefs), &prefsData);

// 예전 도면 파일 버전들로 저장할 preferences를 지정함
ACAPI_SetPreferences_OldVersion (Version_in_AC8, sizeof (MyPrefs_in_AC8), &dataForAC8, GS::Act_Platform_Sign, APIFType_PlanFile800);
ACAPI_SetPreferences_OldVersion (Version_in_AC7, sizeof (MyPrefs_in_AC7), &dataForAC7, GS::Act_Platform_Sign, APIFType_PlanFile700);

 

요구사항

버전: API 6.1 또는 이후
헤더: ACAPinc.h

 

참고사항

애드온 데이터를 Preferences와 Project File에 저장하기
ACAPI_SetPreferences
ACAPI_GetPreferences
ACAPI_GetPreferences_Platform
API 함수