creating and adding a new AttributeSet

Discussion created by massuthe on Jun 16, 2010
Latest reply on Jun 28, 2010 by andreas

Hi all,


I am new to PI SDK development and currently struggling with adding an AttributeSet to the known sets of a server. The following code snipped I tried throws an exception:

NamedValues myAttributes = new NamedValues();

object nodePath = new object();
btcAttributes.Add("path", ref nodePath);

AttributeSets attributeSets = _server.AttributeSets;

attributeSets.AddAttributesToSet("mySet", myAttributes);

I want to be able to add a path property to each PI point, which can later be accessed...


Can anyone please help?


(btw. how can I indent the code snipped correctly?)