In a script executed in the Viewer, the reference to AlarmServer object is lost after Deactivate method has been called. This can cause script error, should it be used again afterwards.
HOW CAN I REPRODUCE THIS PROBLEM?
Run the following script in an application:
DIM alarmServer
SET alarmServer = Application.GetObject(“AlarmServer”)
alarmServer.Deactivate()
alarmServer.Activate() ‘ <=== script error!!!
There is a script error in the fourth line, because there are no more references to “AlarmServer” object.
WORKAROUND
To get around this problem, you must add Application object’s GetObject command after AlarmServer‘s Deactivate method. This causes the reference to the object to be added to AlarmServer variable again. The commands list will look like this:
DIM alarmServer
SET alarmServer = Application.GetObject(“AlarmServer”)
alarmServer.Deactivate()
SET alarmServer = Application.GetObject(“AlarmServer”)
alarmServer.Activate()
SITUATION
Elipse Software has confirmed that this is in fact a bug from the products listed by the end of this article. The correction download can be found here.
THIS ARTICLE APPLIES TO THESE PRODUCTS
Elipse E3 version 2.0 or lower
Elipse E3 version 2.5
Elipse E3 version 3.0
Elipse E3 version 3.1