public static List <dynElem> ModifyElements(SerialListMaterial listMaterialJSON, revitDoc doc) { List <dynElem> elems = new List <dynElem>(); foreach (SerialMaterial m in listMaterialJSON.Elements) { elems.Add(SerialMaterial.ModifyMaterial(m, doc)); } return(elems); }
public static string ToJSON(SerialListMaterial ListJSON) { return(Newtonsoft.Json.JsonConvert.SerializeObject(ListJSON, Formatting.Indented)); }
public static SerialListMaterial ByJSON(string JSON) { SerialListMaterial materials = JsonConvert.DeserializeObject <SerialListMaterial>(JSON); return(materials); }