Functions related to the manipulation of and accessing the Project Location data and Archicad's related functionalities.
More...
|
enum | API_NorthUnitID { APINorthUnit_DecimalDegree
, APINorthUnit_DegreeMinSec
} |
| typedef enum { APINorthUnit_DecimalDegree, APINorthUnit_DegreeMinSec } API_NorthUnitID ;
|
|
enum | API_AltitudeUnitID { APIAltitudeUnit_Meter
, APIAltitudeUnit_DecFoot
} |
| typedef enum { APIAltitudeUnit_Meter, APIAltitudeUnit_DecFoot } API_AltitudeUnitID ;
|
|
enum class | API_LongLatUnitID { APILongLatUnit_DecimalDegree
, APILongLatUnit_DegreeMinSec
} |
| enum class API_LongLatUnitID { APILongLatUnit_DecimalDegree , APILongLatUnit_DegreeMinSec } ; More...
|
|
Functions related to the manipulation of and accessing the Project Location data and Archicad's related functionalities.
◆ API_LongLatUnitID
enum class API_LongLatUnitID { APILongLatUnit_DecimalDegree
, APILongLatUnit_DegreeMinSec
} ;
- Since
- Archicad 26
◆ ACAPI_GeoLocation_CalcSunOnPlace()
GSErrCode ACAPI_GeoLocation_CalcSunOnPlace |
( |
API_PlaceInfo * |
placeInfo | ) |
|
Calculates the sun position in a given place.
- Since
- Archicad 26
- Parameters
-
placeInfo | [in/out] Parameters of the sun place.
API_PlaceInfo |
longitude | required, longitude |
latitude | required, latitude |
sumTime | required, daylight saving on/off |
year | required, year |
month | required, month |
day | required, day |
hour | required, hour |
minute | required, minute |
second | required, second |
time zone | required, time zone in minutes |
north | required, north direction |
sunAngXY | out, the sun angle |
sunAngZ | out, the sun angle |
|
- Returns
- NoError - The function has completed with success.
- APIERR_NOPLAN - no open project
- APIERR_BADPARS - placeInfo is
nullptr
or contains invalid data
- Example
GSErrCode err;
placeInfo.
north = PI / 2;
err = ACAPI_Goodies (APIAny_CalcSunOnPlaceID, &placeInfo, nullptr);
The current location, date and sun parameters.
Definition: APIdefs_Environment.h:3218
double latitude
latitude in degrees
Definition: APIdefs_Environment.h:3284
double north
North direction in radians.
Definition: APIdefs_Environment.h:3296
unsigned short year
The year at the given place.
Definition: APIdefs_Environment.h:3242
unsigned short hour
The hour at the given place.
Definition: APIdefs_Environment.h:3260
unsigned short minute
The minute at the given place.
Definition: APIdefs_Environment.h:3266
unsigned short second
The second at the given place.
Definition: APIdefs_Environment.h:3272
bool sumTime
true if daylight saving time is in effect
Definition: APIdefs_Environment.h:3230
unsigned short month
The month at the given place.
Definition: APIdefs_Environment.h:3248
unsigned short day
The day at the given place.
Definition: APIdefs_Environment.h:3254
double longitude
longitude in degrees
Definition: APIdefs_Environment.h:3278
short timeZoneInMinutes
Time zone in minutes from Greenwich.
Definition: APIdefs_Environment.h:3332
◆ ACAPI_GeoLocation_CanChangePlaceSets()
GSErrCode ACAPI_GeoLocation_CanChangePlaceSets |
( |
bool * |
withDialog | ) |
|
May the current user change the place settings now?
- Parameters
-
withDialog | [in] If the user don't have permisson to change the place settings now, then the Location Dialog will open if this parameter is true, otherwise it will just return whether the user can or can not change the place settings now. This parameter is optional; if you pass nullptr, it defaults to true. |
- Returns
- NoError - The user is allowed to change the place settings.
- APIERR_NOTEDITABLE - The user is not allowed to change the place settings.
- Example
bool withDialog = false;
ACAPI_Environment (APIEnv_CanChangePlaceSetsID, &withDialog);
◆ ACAPI_GeoLocation_ChangePlaceSets()
GSErrCode ACAPI_GeoLocation_ChangePlaceSets |
( |
API_PlaceInfo * |
placeInfo | ) |
|
Changes the place settings.
- Since
- Archicad 26
- Parameters
-
placeInfo | [in] This structure holds the parameters of the place. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - placeInfo is nullptr or contains invalid data.
- APIERR_NOPLAN - No open project.
- Example
GSErrCode err;
err = ACAPI_Environment (APIEnv_GetPlaceSetsID, &placeInfo, nullptr);
err = ACAPI_Environment (APIEnv_ChangePlaceSetsID, &placeInfo, nullptr);
◆ ACAPI_GeoLocation_GetGeoLocation()
GSErrCode ACAPI_GeoLocation_GetGeoLocation |
( |
API_GeoLocation * |
apiGeoLocation | ) |
|
Returns the Location settings of the project.
- Since
- Archicad 25
- Parameters
-
apiGeoLocation | [out] Location data associated with the project |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - apiGeoLocation is nullptr
- Example
See the example of the APIEnv_SetGeoLocationID
function.
◆ ACAPI_GeoLocation_GetPlaceSets()
GSErrCode ACAPI_GeoLocation_GetPlaceSets |
( |
API_PlaceInfo * |
placeInfo | ) |
|
Returns information on location parameters.
- Since
- Archicad 26
- Parameters
-
placeInfo | [out] Parameters of the place. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - placeInfo is nullptr.
- APIERR_NOPLAN - No open project.
- Example
GSErrCode err;
err = ACAPI_Environment (APIEnv_GetPlaceSetsID, &placeInfo, nullptr);
◆ ACAPI_GeoLocation_GetSunSets()
GSErrCode ACAPI_GeoLocation_GetSunSets |
( |
API_SunInfo * |
sunInfo | ) |
|
Returns information on sun parameters.
- Parameters
-
sunInfo | [out] Parameters of the sun. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - sunInfo is nullptr.
- APIERR_NOPLAN - No open project.
- Example
GSErrCode err;
err = ACAPI_Environment (APIEnv_GetSunSetsID, &sunInfo, nullptr);
Parameters of the sunlight.
Definition: APIdefs_Environment.h:3128
◆ ACAPI_GeoLocation_SetGeoLocation()
GSErrCode ACAPI_GeoLocation_SetGeoLocation |
( |
API_GeoLocation * |
apiGeoLocation | ) |
|
Modifies the Location settings of the project.
- Since
- Archicad 25
- Parameters
-
apiGeoLocation | [in] the Location settings associated with the project |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - apiGeoLocation is nullptr
- APIERR_NOTEDITABLE - The Location settings cannot be modified in Teamwork unless it is reserved by the current user.
- Example
ACAPI_Environment (APIEnv_GetGeoLocationID, &geoLocation);
ACAPI_Environment (APIEnv_SetGeoLocationID, &geoLocation);
double x
The x factor.
Definition: APIdefs_Base.h:113
double z
The z factor.
Definition: APIdefs_Base.h:125
double y
The y factor.
Definition: APIdefs_Base.h:119
Geo Location data of the project.
Definition: APIdefs_Environment.h:3440
API_Coord3D surveyPointPosition
Position of the Survey Point in the project.
Definition: APIdefs_Environment.h:3452