---
title: "Functions of Daily weather"
canonical: "https://docs.cuesystem.com/space/CVCGC/512164087/Functions%20of%20Daily%20weather"
format: markdown
---
## SetAPIKey 

This function sets API key to newapikey value. The function returns True on success or False if an error occurs (object is not accessible).

#### Syntax 

```visualbasic
Function SetAPIKey(newapikey As Text) As Boolean
```

## SetLocation 

This function sets the new coordinates for weather forecast. The function returns True on success or False if an error occurs (parameters are out of range, object is not accessible). For allowed values see the properties described above.

#### Syntax 

```visualbasic
Function SetLocation(
  latitude As Double, 
  longitude As Double, 
  location As Text) 
As Boolean
```

## SetTimeMode24H

The function sets the format of the displayed time to 24 hours. The function returns True on success or False if an error occurs (object is not accessible).

#### Syntax 

```visualbasic
Function SetTimeMode24H() As Boolean
```

## SetTimeMode12H

The function sets the format of the displayed time to 12 hours. The function returns True on success or False if an error occurs (object is not accessible).

#### Syntax 

```visualbasic
Function SetTimeMode12H() As Boolean
```

## SetUnitsImperial

The function sets the weather parameter units to imperial. The function returns True on success or False if an error occurs (object is not accessible).

#### Syntax 

```visualbasic
Function SetUnitsImperial() As Boolean
```

## SetUnitsMetric

The function sets the weather parameter units to metric. The function returns True on success or False if an error occurs (object is not accessible).

#### Syntax 

```visualbasic
Function SetUnitsMetric() As Boolean
```