2 of 2 people found this helpful
You have the right idea. You can set this attribute value using the SetValue method.
This method has a number of overloads (as you have probably noticed in the help file) but probably the easiest one to use is the SetValue( AFValue newValue ) overload.
The first order of business is getting a handle for the attribute. In this case you have a known path to your attribute so you can do something like:
AFAttribute a = AFAttribute.FindAttribute(@"\\<server-name>\<database name>\One Hill Solutions\Proplus\Vessel3|DO_H",null);
If you wanted a more general approach, you can look in to searches using the FindElementAttributes method.
Once we have the attribute, we can construct an AFValue object. We'll use the simplest constructor that we can still specify a value, AFValue(object). Finally, we'll set the value of our attribute to this AFValue.
AFValue v = new AFValue(50); a.SetValue(v);
If you want to specify a Unit of Measure (UOM), that's possible with another overload. It doesn't look like that attribute is currently using one, but if you'd like more information on the subject, I'd be happy to help.