public Inventor.AttributeSet getAttrSet <T>(T ob, string name) { AttributeSets attSets = InvDoc.Reflect.getProp <T, AttributeSets>(ob, "AttributeSets"); var ie = attSets.OfType <AttributeSet>().Where(a => a.Name.StartsWith(name)); return(ie.FirstOrDefault()); }
public Inventor.Attribute getAttrib <T>(T ob, string name) { AttributeSets attSets = InvDoc.Reflect.getProp <T, AttributeSets>(ob, "AttributeSets"); var ie = attSets.OfType <AttributeSet>().Where(a => a.Name.StartsWith(name)); foreach (var item in ie) { if (item.Count != 0) { return(item[1]); } } return(null); }