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

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



[in] The old format plan version being opened.
[in] Navigator AddOn viewpoints in old format.
[out] Navigator AddOn viewpoints in current format. These will be visible after the plan finished opening.


Return Values

The function has completed with success.

For other common API errors see the API Errors document.



In order to convert older version Navigator AddOn viewpoints into current version during plan file opening, you need to implement this callback function, and install it with ACAPI_Install_NavigatorAddOnViewPointDataConvertNewFormatHandler 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 opens a plan file, that is in older format.

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

If you need to delete a Navigator AddOn viewpoint (e.g. it cannot be converted to current version) then simply do not push it into currentFormatVPDataArray. Note, that if you do not push a root or group, all its descendants will be deleted, even if some descendants were pushed into currentFormatVPDataArray. 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 currentFormatVPDataArray 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.



Version: API 22 or later
Header: APIdefs_Callback.h


See Also

API Functions