示例#1
0
        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);
        }
示例#2
0
 public static string ToJSON(SerialListMaterial ListJSON)
 {
     return(Newtonsoft.Json.JsonConvert.SerializeObject(ListJSON, Formatting.Indented));
 }
示例#3
0
        public static SerialListMaterial ByJSON(string JSON)
        {
            SerialListMaterial materials = JsonConvert.DeserializeObject <SerialListMaterial>(JSON);

            return(materials);
        }