EBDN - Community - Question & Answers

  Monday, 18 November 2019
  0 Replies
  1.1K Visits
0
Votes
Undo
Hi there,

I have been trying to access the attributes of a device from type definition. But i seem to get the system attribute when i access the devices attribute after finding it.

It does not give me all the other tabs and attributes which shows in the define dialog. This makes it hard for me to add attributes in certain tabs.


FilterExpression fe = myApplication.CreateFilter();
fe.Add(AttributeId.Designation, BinaryOperator.Equal, "Pair");
ObjectCollection oc = myApplication.Folders.TypeDefinitions.FindObjects(fe, SearchBehavior.Hierarchical, true);

List<string> names = new List<string>();
foreach (var item in oc)
{
foreach (var att in item.Attributes)
{
names.Add(att.Name);
}

}


As you can see here if you run this code you will only be able to access the system attribute which makes this method REFER TO ATTACHMENT 1.

Kindly Help Thank You.