APIEnv_​ChangePlaceSetsID

Changes the place settings.

    GSErrCode ACAPI_Environment (
        APIEnv_ChangePlaceSetsID,
        API_PlaceInfo*     placeInfo
    );

 

Parameters

placeInfo
[in] This structure holds the parameters of the place.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
placeInfo is nullptr or contains invalid data.
APIERR_NOPLAN
No open project.

For other common API errors see the API Errors document.

 

Remarks

This function is used to set/change the current city, date, time and north direction parameters of the plan. The sun angles are calculated in the given city and on the given day and time. The calculated angles are returned in the sunAngXY and sunAngZ fields of the API_PlaceInfo structure.

Please refer to the APIEnv_GetPlaceSetsID function for calculating the sun parameters at a custom place on a certain date.

 

Example


API_PlaceInfo  placeInfo;
GSErrCode      err;

BNZeroMemory (&placeInfo, sizeof (API_PlaceInfo));
err = ACAPI_Environment (APIEnv_GetPlaceSetsID, &placeInfo, nullptr);
placeInfo.north += PI/2;
err = ACAPI_Environment (APIEnv_ChangePlaceSetsID, &placeInfo, nullptr);

 

Requirements

Version: API 2.1 or later
Header: APIdefs_Environment.h

 

See Also

API_PlaceInfo, APIEnv_CanChangePlaceSetsID
ACAPI_Environment, API Functions