Create a NetLogic that fetches UI elements from server

Set the default external code editor. See Set the default code editor.
  1. In
    Project view
    , right-click
    MainWindow (type)
    and select
    New
    Runtime NetLogic
    .
  2. Hover-over the NetLogic, select
    Edit
    , and enter
    UIFetcher
    .
  3. Double-click the NetLogic.
    The external code editor opens.
  4. In the code editor, replace the existing code with the following code:
    #region StandardUsing using System; using FTOptix.Core; using FTOptix.CoreBase; using FTOptix.HMIProject; using UAManagedCore; using OpcUa = UAManagedCore.OpcUa; using FTOptix.NetLogic; using FTOptix.UI; #endregion public class UIFetcher : FTOptix.NetLogic.BaseNetLogic { public override void Start() { var clientPanelLoader = (PanelLoader)LogicObject.Owner.Get("ClientPanelLoader"); var remoteMainPanel = Project.Current.Get("UI/RemotePanels/MainPanel"); if (remoteMainPanel == null) { Log.Error("Remote server main panel not found"); return; } clientPanelLoader.ChangePanel(remoteMainPanel.NodeId, NodeId.Empty); } public override void Stop() { // Insert code to be executed when the user-defined logic is stopped } }
  5. Save the code.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.