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 );
- [in] The old format plan version, the project is being saved into.
- [in] Navigator AddOn viewpoints in current format.
- [out] Navigator AddOn viewpoints in old format. This will be saved into the old format plan.
- The function has completed with success.
For other common API errors see the API Errors document.
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
When Archicad calls this function, it passes an empty
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
Note, that if you do not push a root or group, all its descendants will be deleted, even if some descendants were pushed into
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.
- Version: API 22 or later
- Header: APIdefs_Callback.h