Showing results 1 to 2 of 2

Thread: Import Alarm XML

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    03.02.2020
    Posts
    2

    Default Import Alarm XML

    Hi,

    Is there a way to import Alarm from XML with the API?





    Thank you.
    Regards,

  2. #2
    Join Date
    03.11.2015
    Posts
    15

    Default Re: Import Alarm XML

    In fact, there is currently no possibility to trigger an XML import on Alarm-Areas, -Groups, or -Classes with the AddIn-Framework (zenon API).

    It is however possible to create Alarm-Areas with DynProperties of the project.
    So technically, ther could be a possibility to parse the XML file and create the the alarm classes in an Editor Wizard Extention.

    Here is a simple example on how to create an alarm class in an Editor Wizard Extention:

    public void Run(IEditorApplication context, IBehavior behavior)
        {
          var activeProject = context.Workspace.ActiveProject;
          var dynProps = activeProject.GetDynamicProperties("");  // this is to get all DynProperties of the project. You can watch them in the watch or locals window.
          activeProject.CreateDynamicProperty("AlarmClasses");
          var alarmClasses = activeProject.GetDynamicProperty("AlarmClasses"); // Returns the number of Alarm Classes in the project.
        }
    Last edited by c.f. : 17th September 2020 at 09:30

Similar Threads

  1. Double Click Acknowledge of alarm on Alarm Screen..!
    By daujivar in forum zenon Supervisor
    Replies: 1
    Last Post: 31st August 2016, 07:22
  2. Problems with alarm list and alarm time
    By dario in forum zenon Supervisor
    Replies: 4
    Last Post: 9th November 2012, 13:52
  3. Alarm Status Line and Alarm List
    By tomaslipa in forum zenon Supervisor
    Replies: 1
    Last Post: 21st January 2009, 12:02
  4. Replies: 0
    Last Post: 20th August 2007, 14:00

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •