ParthDesai

MrPLC Member
  • Content count

    3
  • Joined

  • Last visited

Everything posted by ParthDesai

  1. Hello, I am trying to pass tag name as string and trying to write the tag value, but facing an error "Object reference not set to an instance of an object".Is there any dll which I have to add to my project files.Please Tell me what I am doing Wrong.Below is my code namespace Neo.ApplicationFramework.Generated {     using System.Windows.Forms;     using System;     using System.Drawing;     using Neo.ApplicationFramework.Tools;     using Neo.ApplicationFramework.Common.Graphics.Logic;     using Neo.ApplicationFramework.Controls;     using Neo.ApplicationFramework.Interfaces;     using System.IO;                    // for ApplicationPath     using System.Reflection;            // for ApplicationPath     using Neo.ApplicationFramework.Tools.OpcClient;     public partial class Screen1     {                void Button1_Click(System.Object sender, System.EventArgs e)         {             var myTag = GetGlobalDataItem("value1");             myTag.Value = 123;          }         private GlobalDataItem GetGlobalDataItem(string propertyName)         {             PropertyInfo tagProperty = typeof (Neo.ApplicationFramework.Generated.Tags).GetProperty(propertyName);             if(tagProperty == null)                 return null;             else                 return tagProperty.GetValue(Globals.Tags, null) as GlobalDataItem;         }         private string ApplicationPath         {                         get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().ManifestModule.FullyQualifiedName); }                         }     } }
  2. Convert String to Tag in iX Developer

    Please help Guys.
  3. Convert String to Tag in iX Developer

    With this I am able to get tag names but only of tags having read access rights. I want to get Tag names with readwrite access rights. void Button1_Click(System.Object sender, System.EventArgs e)         {             foreach(GlobalDataItem gdi in Globals.Tags.DataItem){                 MessageBox.Show(gdi.Name.ToString());             }             }