Posted 16 Jan 2016 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); } } } } Share this post Link to post Share on other sites
Posted 16 Jan 2016 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()); } } Share this post Link to post Share on other sites
Posted 27 Jan 2016 Which version of iX are you using (version number and SP)? Share this post Link to post Share on other sites