Weather Object

The ACP Weather object

Remarks

Intrinsic This object represents ACP's Weather server object. This provides access to the informational items provided by the configured weather server (if connected). The information is supplied in units that are used internationally for weather reporting (knots, deg.C, millibars).

Weather servers are external components that must be written to support a particular source of weather information. Capabilities vary, thus some of the items provided by ACP.Weather may not be available. Those that are not available will raise an error if accessed.

There is one property, however, that must be implemented by any ACP weather server: Weather.Safe. This is used internally by ACP to provide weather safety. If it becomes False, ACP will abort any currently running script and automatically run a special script ACP-Weather.xxx (this can be in any supported scripting language).

ACP.Weather cannot be created directly by external automation clients, however the master copy of Weather is available as Util.Weather. Creating a copy of Util will give access to Weather from external automation objects. You do not need to do this in ACP scripts or ASP pages, where Weather is available directly within the script namespace.

To create a weather server, implement all of the properties and methods of ACP.Weather except Weather.Available, plus an additional read/write property Connected. For informational items that you don't support, raise an error 80040400 (hex) and provide a "not implemented" error message. You must implement Weather.Safe. Then enter the ProgID of your weather server on ACP's Preferences window, Weather tab. Clicking the Setup button there will call your SetupDialog() method. You can simply pop up a message box, or provide a configuration window. You should probably implement SetupDialog() as failure to do so will result in the setup button appearing dead.