Example #1
0
        public static dynElem ModifyElement(SerialElement serialElement,
                                            [DefaultArgument("Synthetic.Revit.Document.Current()")] RevitDoc document)
        {
            dynElem elem = null;
            Type    type = serialElement.GetType();

            if (type == typeof(SerialMaterial))
            {
                elem = SerialMaterial.ModifyMaterial((SerialMaterial)serialElement, document);
            }
            else if (type == typeof(SerialElementType))
            {
                elem = SerialElementType.ModifyElement((SerialElementType)serialElement, document);
            }
            else if (type == typeof(SerialHostObjType))
            {
                elem = SerialHostObjType.ModifyWallType((SerialHostObjType)serialElement, document);
            }
            else if (type == typeof(SerialView))
            {
                elem = SerialView.ModifyView((SerialView)serialElement, document);
            }
            else
            {
                elem = SerialElement.ModifyElement((SerialElement)serialElement, document);
            }

            return(elem);
        }
Example #2
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);
        }