This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Change values in HAMMER with WaterObjects.NET

Hello,
I've been trying to change the operational (Transient, Valve) Pattern in miy HAMMER project using WO.NET, but I just have been able to see the information, but not to modify anything. I've been looking everywhere in the Hydraulics and Hydrology Forum (because I don't have acces to BDN) and I found this post:

https://communities.bentley.com/products/hydraulics___hydrology/w/hydraulics_and_hydrology__wiki/28467.using-waterobjects-net-for-sewercad

The problem is that at the end they doesn't explain how to edit the values. I already read the WaterObjects.NET Programming Guide, but I couldn't find something useful.

My method I'm building to change the values:

        public void ChangeValveClosure(int ID_CURVE, TorontoProject project)
        {
            
            ISupportElementManager CurveSet = project.DomainDataSet.SupportElementManager((int)SupportElementType.IdahoPatternElementManager);
            
            IUnitizedField CurveField = CurveSet.SupportElementField(StandardFieldName.TransientValveCurve_RelativeClosure) as IUnitizedField;
            IUnitizedField CurveFieldT = CurveSet.SupportElementField(StandardFieldName.TransientValveCurve_TimeFromStart) as IUnitizedField;

            //show values
            IModelingElement CurveElement = CurveSet.Element(ID_CURVE);
            FieldCollection Fields = CurveElement.Manager.SupportedFields();
            IField ClosureCurv = Fields[32];
            CollectionFieldListManagerBase F = (CollectionFieldListManagerBase)ClosureCurv.GetValue(ID_CURVE);
            FieldCollection Fields2 = F.SupportedFields();
            IField TimeCurve = Fields2[0];
            IField ClosureCurve = Fields2[1];
            IDictionary TimeValues = TimeCurve.GetValues();
            IDictionary ClosureValues = ClosureCurve.GetValues();

        }

What am I missing? I don't know what else to do.

Im thankfull with any help,

Juan Sebastian.