Alarm object in vba of integration projectnot is not working for sub-projects

Alarm object in vba of integration projectnot is not working for sub-projects

Hey everybody,
I do have a problem with the Alarm object in vba of an integration project.
Using following code:
VBA Code:

Option Explicit
Dim WithEvents zAlarm As Alarm
'procedure is executed on startup of the zenOn runtime
Private Sub Project_Active()
'init the alarm object for events
Set zAlarm = thisProject.Alarm
End Sub
'procedure is executed when an Alarm comes
Private Sub zAlarm_AlarmComes(ByVal obItem As IAlarmItem)
'print specific information to Debug window...
Debug.Print obItem.Timecomes & " > " & obItem.Text
End Sub
'procedure is executed when an Alarm has gone
Private Sub zAlarm_AlarmGoes(ByVal obItem As IAlarmItem)
'print specific information to Debug window...
Debug.Print obItem.Timegoes & " < " & obItem.Text
End Sub
'procedure is executed when an Alarm was acknowledged by a user
Private Sub zAlarm_AlarmAcknowledged(ByVal obItem As IAlarmItem)
'print specific information to Debug window...
Debug.Print obItem.TimeAcknowledged & " | " & obItem.Text
End Sub
Private Sub zAlarm_AlarmListSelectionChanged(ByVal obItem As IAlarmItem)
'print specific information to Debug window...
Debug.Print "AlarmListSelectionChanged: " & obItem.Name & " - " & obItem.Projectname
End Sub
'procedure is executed on terminating the zenOn Runtime
Private Sub Project_Inactive()
'free the alarm object
Set zAlarm = Nothing
End Sub

The problem is the events of zAlarm are only fired for alarms which are from variables located in the integration project not for the alarms of variables which are located in the sub-projects of the integration project!
For example:
I do have an alarm picture in the integration project showing alarms from variables of the integration project and the sub-projects. If I am selecting in the AML an alarm of the integration project "_AlarmListSelectionChanged" is fired. If I am selecting in the same picture an alarm of a sub-project nothing happens!
I need to be able to react on all alarms of the sub-project within vba of the integration project!
What am I doing wrong?
Please advice.
Thanks for any input!
H.-P.

This is a migrated post! Originally posted on 21.05.2008 by user hp. Please be aware that information can be outdated.

    Disclaimer

    This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.

    The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.

    Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.

    Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.

    COPA-DATA reserves the right to change this document from time to time at own discretion.


    Ing. Punzenberger COPA-DATA GmbH
    Karolingerstraße 7b · 5020 Salzburg · Austria
    www.copadata.com