Пример #1
0
        public override object GetRevitObject(DataRow dataRow)
        {
            ColumnInfo columnInfo = base.TableInfo[base.TableInfo.PrimaryKeys[0]];
            int        id         = System.Convert.ToInt32(dataRow[columnInfo.Name]);

            return(APIObjectList.GetElementById(id));
        }
Пример #2
0
        public override object GetRevitObject(DataRow dataRow)
        {
            int id = System.Convert.ToInt32(dataRow[APIObjectList.ColumnRes(base.TableInfo.PrimaryKeys[0])]);

            System.Convert.ToInt32(dataRow[APIObjectList.ColumnRes(base.TableInfo.PrimaryKeys[1])]);
            if (!(APIObjectList.GetElementById(id) is FamilyInstance))
            {
                return(null);
            }
            return(dataRow.ItemArray);
        }
        public override object GetRevitObject(DataRow dataRow)
        {
            int num  = System.Convert.ToInt32(dataRow[base.TableInfo[base.TableInfo.PrimaryKeys[0]].Name]);
            int num2 = System.Convert.ToInt32(dataRow[base.TableInfo[base.TableInfo.PrimaryKeys[1]].Name]);

            if (!(APIObjectList.GetElementById(num) is FamilyInstance))
            {
                return(null);
            }
            Phase phase = APIObjectList.GetElementById(num2) as Phase;

            if (phase == null || !phase.IsValidObject)
            {
                Log.WriteLine("Got invalid phase! {0}, Phase: {1}", new object[]
                {
                    num,
                    num2
                });
                return(null);
            }
            return(dataRow.ItemArray);
        }
Пример #4
0
        protected override void PopulateDbRow(Element element, DataRow row)
        {
            RoomTag roomTag = element as RoomTag;

            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_Id"), APIObjectList.GetIdDbValue(roomTag));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_RoomTagType"), APIObjectList.GetNameDbValue(APIObjectList.GetElementById(roomTag.GetTypeId())));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_RoomId"), APIObjectList.GetIdDbValue(roomTag.Room));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_ViewId"), APIObjectList.GetIdDbValue(roomTag.View));
        }