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 __ACENV_CALL 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:2654
double latitude
latitude in degrees
Definition: APIdefs_Environment.h:2701
double north
North direction in radians.
Definition: APIdefs_Environment.h:2711
unsigned short year
The year at the given place.
Definition: APIdefs_Environment.h:2666
unsigned short hour
The hour at the given place.
Definition: APIdefs_Environment.h:2681
unsigned short minute
The minute at the given place.
Definition: APIdefs_Environment.h:2686
unsigned short second
The second at the given place.
Definition: APIdefs_Environment.h:2691
bool sumTime
true if daylight saving time is in effect
Definition: APIdefs_Environment.h:2660
unsigned short month
The month at the given place.
Definition: APIdefs_Environment.h:2671
unsigned short day
The day at the given place.
Definition: APIdefs_Environment.h:2676
double longitude
longitude in degrees
Definition: APIdefs_Environment.h:2696
short timeZoneInMinutes
Time zone in minutes from Greenwich.
Definition: APIdefs_Environment.h:2741
◆ ACAPI_GeoLocation_CanChangePlaceSets()
GSErrCode __ACENV_CALL 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 __ACENV_CALL 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 __ACENV_CALL 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 __ACENV_CALL 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 __ACENV_CALL 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:2578
◆ ACAPI_GeoLocation_SetGeoLocation()
GSErrCode __ACENV_CALL 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:104
double z
The z factor.
Definition: APIdefs_Base.h:114
double y
The y factor.
Definition: APIdefs_Base.h:109
Geo Location data of the project.
Definition: APIdefs_Environment.h:2829
API_Coord3D surveyPointPosition
Position of the Survey Point in the project.
Definition: APIdefs_Environment.h:2839