Technical FAQs

Ask a Question

Tenant Metering Software (TMS v 1.5) - Unhandled Exception - "Value of '0' is not valid for Parameter name: SelectedIndex" when adding a meter

Goals and Symptoms

Issue
When adding a meter to Tenant Metering Software (TMS v 1.5), the following error is displayed:

Tenant Metering Software Unhandled Exception - "Value of '0' is not valid for Parameter name: SelectedIndex"

Causes and Fixes

Cause

Version 1.5 of TMS relies on VB, which has a callfor "Serial devices" in the system before building the "Add Meter" screen. Most modern computers do not have COM ports, and so, because there was no error checking on that return value it will throw the error above when the list is empty.


Resolution

The attached program creates a virtual com port on the machine. TMS detects the virtual com port as a standard com port and thus the list can be created correctly and returned without errors.

Was this helpful?
What can we do to improve the information ?