Showing results 1 to 5 of 5

Thread: Dynamic Screen Switch Function

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    03.09.2019
    Posts
    7

    Frage Dynamic Screen Switch Function

    Hi,

    I'm trying to find a way to build a "Screen Switch Function" on the fly in an Add-In service. Considering the following configuration:


    [AddInExtension("Temp Service", "Service extension description", DefaultStartMode = DefaultStartupModes.Auto)]
    public class ProjectServiceExtension : IProjectServiceExtension
    {
    private IProject _project;



    public void Start(IProject context, IBehavior behavior)
    {
    _project = context;


    //-- This can just read from an attached variable on any object, and just execute this
    //-- BUT, this throws an exception that says it's a read only setting (Parameter)
    //-- Yet, the .Parameters says "get; set;" when I peek at the method implementation in visual studio.
    switchFunc.Parameter = "NextScreenName";
    switchFunc.Execute();
    }
    catch(Exception ex)
    {
    //-- Log exception...
    }
    }

    public void Stop()
    {
    _project.ScreenCollection.ElementLeftButtonUp -= ScreenCollection_ElementLeftButtonUp;
    }
    }

    My end goal is to just create a little add-on or script to have one common screen switch that can be reused and not have to define a 100 different screen switch functions in my project for simple tasks.

    How do I do this in Zenon?

    Thanks!
    Last edited by justinL : 4th June 2021 at 17:43 Reason: C# Code Formatter is not working correctly on website, left it as plain text

Similar Threads

  1. Reg: Variables Will Impact Delay in Screen switch function in Runtime
    By saravanan1985 in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 1
    Last Post: 3rd July 2018, 13:09
  2. Reg: Variables Will Impact Delay in Screen switch function in Runtime
    By saravanan1985 in forum zenon Energy Edition
    Replies: 0
    Last Post: 12th June 2018, 15:51
  3. Manipulation 'Screen switch'-Rt-Function via C#
    By michael.winter in forum VSTA
    Replies: 4
    Last Post: 19th November 2014, 14:46
  4. Replies: 2
    Last Post: 24th May 2013, 04:12
  5. Dynamic text on momentary switch button
    By robolution in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 2
    Last Post: 8th May 2013, 08:30

Tags for this Thread

Posting Rules

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