APINavigatorAddOnViewPointDataSaveOld​FormatHandlerProc

User supplied callback procedure for converting Navigator AddOn viewpoints into older format.

    typedef GSErrCode  APINavigatorAddOnViewPointDataSaveOldFormatHandlerProc (
        API_FTypeID                                           planFileType,
        const GS::Array<API_NavigatorAddOnViewPointData>&     currentFormatVPDataArray,
        GS::Array<API_NavigatorAddOnViewPointData>&           oldFormatVPDataArray
    );

 

Parameters

planFileType
[in] The old format plan version, the project is being saved into.
currentFormatVPDataArray
[in] Navigator AddOn viewpoints in current format.
oldFormatVPDataArray
[out] Navigator AddOn viewpoints in old format. This will be saved into the old format plan.

 

Return Values

NoError
The function has completed with success.

For other common API errors see the API Errors document.

 

Remarks

In order to save the Navigator AddOn viewpoints into a previous version project file, you need to implement this callback function, and install it with ACAPI_Install_NavigatorAddOnViewPointDataSaveOldFormatHandler in the Initialize function. It is also necessary to call ACAPI_Register_NavigatorAddOnViewPointDataHandler from the RegisterInterface function.

This handler function is called by ARCHICAD whenever the user saves the project into an older format.

Inside the function the converted viewpoints should be constructed in API_NavigatorAddOnViewPointData structures in the format required by the previous version of this AddOn, and these structures should be pushed into oldFormatVPDataArray. When ARCHICAD calls this function, it passes an empty oldFormatVPDataArray.

If you need to delete a Navigator AddOn viewpoint (e.g. it cannot be converted to previous version) then simply do not push it into oldFormatVPDataArray. Note, that if you do not push a root or group, all its descendants will be deleted, even if some descendants were pushed into oldFormatVPDataArray. If you push a viewpoint data with an invalid guid (i.e. one that does not designate an existing root, group or leaf node), it will be skipped, and not created. Order of the items in oldFormatVPDataArray is irrelevant.

The hierarchy cannot be changed during conversion. The parentGuid of the pushed structures will be ignored.

The item type of the Navigator viewpoints cannot be changed during conversion. The itemType of the pushed structures will be ignored.

 

Requirements

Version: API 22 or later
Header: APIdefs_Callback.h

 

See Also

API_NavigatorAddOnViewPointData
ACAPI_Install_NavigatorAddOnViewPointDataSaveOldFormatHandler
ACAPI_Register_NavigatorAddOnViewPointDataHandler
API Functions