- Getting started
- Using the software
- OPC UA
- Graphic and layout objects
- Developing solutions
- Developing projects with C#
- Application examples
- UI tutorial
- NetLogic tutorial
- Object and variable references
Create a NetLogic that fetches UI elements from server
Set the default external code editor. See Set the default code editor.
- InProject view, right-clickMainWindow (type)and select .
- Hover-over the NetLogic, select, and enterUIFetcher.
- Double-click the NetLogic.The external code editor opens.
- 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 } }
- Save the code.
Provide Feedback