Beispiel #1
0
 protected override void SolveInstance(IGH_DataAccess DA)
 {
     DHr hrIn = new DHr();
     if (DA.GetData(1, ref hrIn)) {
         DHr hrOut = new DHr(hrIn);
         hrOut.clear();
         List<string> keys_to_keep = new List<string>();
         DA.GetDataList(0, keys_to_keep);
         foreach (string key in keys_to_keep) {
             if (hrIn.containsKey(key)) hrOut.put(key, hrIn.val(key));
             else this.AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "key not found in given hour: " + key + "\nIf you are streaming from a panel component did you remember to uncheck the 'multiline data' option?");
         }
         DA.SetData(0, hrOut);
     }
 }