MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About ParthDesai

  • Rank
    Hi, I am New!
  1. Convert String to Tag in iX Developer

    Please help Guys.
  2. 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());             }             }
  3. 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); }                         }     } }