// // (C) Copyright 2003-2013 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, // provided that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. // // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. // // Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. // using System; using System.Collections; using System.Collections.Generic; using System.Linq; using Autodesk.Revit.DB; using Autodesk.Revit.DB.ExtensibleStorage; using Autodesk.Revit.DB.ExtensibleStorage.Framework; using Autodesk.Revit.DB.ExtensibleStorage.Framework.Attributes; using Autodesk.Revit.UI.ExtensibleStorage.Framework.Attributes; using Autodesk.Revit.DB.Structure ; namespace ExtensibleStorageUI { /// /// /// [Schema("tabGridSchema", "02639b0b-d52a-453c-be68-a4a98aa81945")] public class TabGridSchema : SchemaClass { public RebarBarType rbt = null; # region Constructors /// /// Initialize /// public TabGridSchema() { # region GridTextBox GridTextBoxDouble = new List(); GridTextBoxXYZ = new List(); GridTextBoxUV = new List(); GridTextBoxBool = new List(); GridTextBoxInt16 = new List(); GridTextBoxInt32 = new List(); GridTextBoxString = new List(); GridTextBoxGuid = new List(); GridTextBoxXYZRemoveNotAllow = new List { new XYZ(1, 1, 1), new XYZ(2, 2, 2) }; # endregion GridTextBox # region GridComboBox GridComboBoxDouble = new List(); GridComboBoxXYZ = new List(); GridComboBoxUV = new List(); GridComboBoxBool = new List(); GridComboBoxInt16 = new List(); GridComboBoxInt32 = new List(); GridComboBoxString = new List(); GridComboBoxGuid = new List(); # endregion GridComboBox GridUnitTextBoxDouble = new List(); GridXYZTextBox = new List(); GridCheckBoxBool = new List(); } /// /// /// /// public TabGridSchema(Document document) { } /// /// /// /// /// public TabGridSchema(Entity entity, Document document) : base(entity, document) { } #endregion Constructors # region GridTextBox /// /// Grid TextBox supporting a value defined as double. /// [SchemaProperty(Unit = UnitType.UT_Area, DisplayUnit = DisplayUnitType.DUT_SQUARE_CENTIMETERS)] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_SQUARE_CENTIMETERS, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxDouble", Tooltip = "GridTextBoxDoubleToolTips" )] public List GridTextBoxDouble { get; set; } /// /// Grid TextBox supporting a value defined as XYZ. /// Default XYZ is provided by the XYZDefaultValueProvider (1,1,1). /// [SchemaProperty(Unit = UnitType.UT_Length , DisplayUnit = DisplayUnitType.DUT_METERS)] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxXYZ", Tooltip = "GridTextBoxXYZToolTips", DefaultValueProvider = typeof(XYZDefaultValueProvider) )] public List GridTextBoxXYZ { get; set; } /// /// Grid TextBox supporting a value defined as UV. /// Default UV is provided by the UVDefaultValueProvider (1,1). /// [SchemaProperty(Unit = UnitType.UT_Length, DisplayUnit = DisplayUnitType.DUT_METERS)] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxUV", Tooltip = "GridTextBoxUVToolTips", DefaultValueProvider = typeof(UVDefaultValueProvider) )] public List GridTextBoxUV { get; set; } /// /// Grid TextBox supporting a value defined as integer16. /// Default integer is provided by the IntDefaultValueProvider (2). /// [SchemaProperty()] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxInt16", Tooltip = "GridTextBoxInt16ToolTips", DefaultValueProvider = typeof(Int16DefaultValueProvider) )] public List GridTextBoxInt16 { get; set; } /// /// Grid TextBox supporting a value defined as integer32. /// integer is set to 5 per default. /// [SchemaProperty()] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxInt32", Tooltip = "GridTextBoxInt32ToolTips", DefaultValue = 5 )] public List GridTextBoxInt32 { get; set; } /// /// Grid TextBox supporting a value defined as string. /// String is set to "Choice 1" per default. /// [SchemaProperty()] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxString", Tooltip = "GridTextBoxStringToolTips", DefaultValue = "Choice 1" )] public List GridTextBoxString { get; set; } /// /// Grid TextBox supporting a value defined as boolean. /// Boolean is set to true per default. /// [SchemaProperty()] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxBool", Tooltip = "GridTextBoxBoolToolTips", DefaultValue = true )] public List GridTextBoxBool { get; set; } /// /// Grid TextBox supporting a value defined as guid. /// Default guid is porvided by the GUIDDefaultValueProvider /// [SchemaProperty()] [GridTextBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid TextBox", IsVisible = true, IsEnabled = true, Index = 0, Localizable = true, Description = "GridTextBoxGuid", Tooltip = "GridTextBoxGuidToolTips" , DefaultValueProvider = typeof(GUIDDefaultValueProvider) )] public List GridTextBoxGuid { get; set; } # endregion GridTextBox # region GridComboBox /// /// Grid ComboBox supporting some double values. /// ComboBox is filled using "ComboBoxDouble" data source [10,20,30,40]. /// [SchemaProperty(Unit = UnitType.UT_Length, DisplayUnit = DisplayUnitType.DUT_CENTIMETERS)] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxDouble", Tooltip = "GridComboBoxDoubleToolTips", DataSourceKey = "DataSourceDoubleList", DefaultValue = 10 )] public List GridComboBoxDouble { get; set; } /// /// Grid ComboBox supporting some XYZ values. /// ComboBox is filled using "DataSourceXYZList" data source. /// Default value is set using XYZDefaultValueProvider /// [SchemaProperty(Unit = UnitType.UT_Length, DisplayUnit = DisplayUnitType.DUT_CENTIMETERS)] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxXYZ", Tooltip = "GridComboBoxXYZToolTips", DataSourceKey = "DataSourceXYZList", DefaultValueProvider = typeof(XYZDefaultValueProvider) )] public List GridComboBoxXYZ { get; set; } /// /// Grid ComboBox supporting UV values. /// ComboBox is filled using "DataSourceUVList" data source. /// Default value is set using UVDefaultValueProvider /// [SchemaProperty(Unit = UnitType.UT_Length, DisplayUnit = DisplayUnitType.DUT_CENTIMETERS)] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxUV", Tooltip = "GridComboBoxUVToolTips", DataSourceKey = "DataSourceUVList", DefaultValueProvider = typeof(UVDefaultValueProvider) )] public List GridComboBoxUV { get; set; } /// /// Grid ComboBox supporting integer16 values. /// ComboBox is filled using "DataSourceInt16List" data source. /// Default value is set using Int16DefaultValueProvider /// [SchemaProperty()] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxInt16", Tooltip = "GridComboBoxInt16ToolTips", DataSourceKey = "DataSourceInt16List", DefaultValueProvider = typeof(Int16DefaultValueProvider) )] public List GridComboBoxInt16 { get; set; } /// /// Grid ComboBox supporting integer32 values. /// ComboBox is filled using "DataSourceInt32List" data source. /// Default value is set to 1. [SchemaProperty()] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxInt32", Tooltip = "GridComboBoxInt32ToolTips", DataSourceKey = "DataSourceInt32List", DefaultValue = 1 )] public List GridComboBoxInt32 { get; set; } /// /// Grid ComboBox supporting guid values. /// ComboBox is filled using "DataSourceGuidList" data source. /// Default value is set using GUIDDefaultValueProvider [SchemaProperty()] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxGuid", Tooltip = "GridComboBoxGuidToolTips", DataSourceKey = "DataSourceGuidList", DefaultValueProvider = typeof(GUIDDefaultValueProvider) )] public List GridComboBoxGuid { get; set; } /// /// Grid ComboBox supporting boolean values. /// ComboBox is filled using "DataSourceBoolList" data source. /// Default value is set to true. [SchemaProperty()] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxBool", Tooltip = "GridComboBoxBoolToolTips", DataSourceKey = "DataSourceBoolList", DefaultValue = true )] public List GridComboBoxBool { get; set; } /// /// Grid ComboBox supporting string values. /// ComboBox is filled using "DataSourceStringList" data source. /// Default value is set to "Choice 1". [SchemaProperty()] [GridComboBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid ComboBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridComboBoxString", Tooltip = "GridComboBoxStringToolTips", DataSourceKey = "DataSourceStringList", DefaultValue = "Choice 1" )] public List GridComboBoxString { get; set; } # endregion GridComboBox # region UnitTextBox /// /// Grid TextBox supporting a value defined as double. /// Default value is set to 10.0. /// [SchemaProperty(Unit = UnitType.UT_Area, DisplayUnit = DisplayUnitType.DUT_SQUARE_CENTIMETERS)] [GridUnitTextBox( AllowToAddElements = true, AllowToRemoveElements = true, Category = "Grid UnitTextBox", AttributeUnit = DisplayUnitType.DUT_SQUARE_CENTIMETERS, IsVisible = true, IsEnabled = true, Index = 2, Localizable = true, Description = "GridUnitTextBoxDouble", Tooltip = "GridUnitTextBoxDoubleToolTips", DefaultValue = 10.0)] public List GridUnitTextBoxDouble { get; set; } # endregion UnitTextBox # region XYZTextBox /// /// Grid TextBox supporting a value defined as XYZ. /// Default XYZ is provided by the XYZDefaultValueProvider (1,1,1). /// [SchemaProperty(Unit = UnitType.UT_Length, DisplayUnit = DisplayUnitType.DUT_METERS)] [GridXYZTextBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "Grid XYZTextBox", IsVisible = true, IsEnabled = true, Index = 7, Localizable = true, Description = "GridXYZTextBox", Tooltip = "GridXYZTextBoxToolTips", DefaultValueProvider = typeof(XYZDefaultValueProvider) )] public List GridXYZTextBox { get; set; } /// /// Grid TextBox supporting a key defined as string and value defined as XYZ. /// Default values are for the first point 1 (1,1,1) and for the point 2 (2,2,2). /// Point 1 and 2 are defined on the constructor. /// [SchemaProperty(Unit = UnitType.UT_Length, DisplayUnit = DisplayUnitType.DUT_METERS)] [GridXYZTextBox( AllowToAddElements = false, AllowToRemoveElements = false, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "XYZTextBox", IsVisible = true, IsEnabled = true, Index = 7, Localizable = true, Description = "GridTextBoxXYZRemoveNotAllow", Tooltip = "GridTextBoxXYZRemoveNotAllowToolTips" )] public List GridTextBoxXYZRemoveNotAllow { get; set; } # endregion XYZTextBox # region GridCheckBox /// /// Grid CheckBox supporting a boolean. ////// [SchemaProperty()] [GridCheckBox( AllowToAddElements = true, AllowToRemoveElements = true, AttributeUnit = DisplayUnitType.DUT_METERS, Category = "Grid CheckBox", IsVisible = true, IsEnabled = true, Index = 1, Localizable = true, Description = "GridCheckBoxBool", Tooltip = "GridCheckBoxBoolToolTips", DefaultValue = true )] public List GridCheckBoxBool { get; set; } # endregion GridCheckBox # region GridEnumCombobox /// /// Grid Enum ComboBox supporting image. /// Default value is set to Choice 3 /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType = typeof(EnumLocalized), Presentation = PresentationMode.Combobox, Item = PresentationItem.Image, Description = "GridEnumComboboxImage", Category = "Grid Enum Combobox", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumComboboxImageToolTips", DefaultValue = EnumLocalized.Choice3 )] public List GridEnumComboboxImage { get; set; } /// /// Grid Enum ComboBox supporting text. /// Default value is set to Choice 2 /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType = typeof(EnumLocalized), Presentation = PresentationMode.Combobox, Item = PresentationItem.Text, Description = "GridEnumComboboxText", Category = "Grid Enum Combobox", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumComboboxTextToolTips", DefaultValue = EnumLocalized.Choice2 )] public List GridEnumComboboxText { get; set; } /// /// Grid Enum ComboBox supporting image and text. /// Default value is set to Choice 1 /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType= typeof(EnumLocalized), Presentation = PresentationMode.Combobox, Item = PresentationItem.ImageWithText , Description = "GridEnumComboboxImageText", Category = "Grid Enum Combobox", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumComboboxImageTextToolTips", DefaultValue = EnumLocalized.Choice1 )] public List GridEnumComboboxImageText { get; set; } # endregion GridEnumCombobox # region GridEnumOptionList /// /// Grid Enum OptionList supporting image. /// Default value is set to Choice 3. /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType = typeof(EnumLocalized), Presentation = PresentationMode.OptionList , Item = PresentationItem.Image, Description = "GridEnumOptionListImage", Category = "Grid Enum OptionList", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumOptionListImageToolTips", DefaultValue = EnumLocalized.Choice3 )] public List GridEnumOptionListImage { get; set; } /// /// Grid Enum OptionList supporting text. /// Default value is set to Choice 2. /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType = typeof(EnumLocalized), Presentation = PresentationMode.OptionList, Item = PresentationItem.Text, Description = "GridEnumOptionListText", Category = "Grid Enum OptionList", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumOptionListTextToolTips", DefaultValue = EnumLocalized.Choice2 )] public List GridEnumOptionListText { get; set; } /// /// Grid Enum OptionList supporting image and text. /// Default value is set to Choice 1. /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, // EnumType= typeof(AnEnumLocalized), Presentation = PresentationMode.OptionList, Item = PresentationItem.ImageWithText, Description = "GridEnumOptionListImageText", Category = "Grid Enum OptionList", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumOptionListImageTextToolTips", DefaultValue = EnumLocalized.Choice1 )] public List GridEnumOptionListImageText { get; set; } # endregion GridEnumOptionList # region GridEnumToggleButton /// /// Grid Enum ToggleButton supporting image. /// Default value is set to Choice 3. /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType = typeof(EnumLocalized), Presentation = PresentationMode.ToggleButton, Item = PresentationItem.Image, Description = "GridEnumToggleButtonImage", Category = "Grid Enum ToggleButton", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumToggleButtonImageToolTips", DefaultValue = EnumLocalized.Choice3 )] public List GridEnumToggleButtonImage { get; set; } /// /// Grid Enum ToggleButton supporting text. /// Default value is set to Choice 2. /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType = typeof(EnumLocalized), Presentation = PresentationMode.ToggleButton , Item = PresentationItem.Text, Description = "GridEnumToggleButtonText", Category = "Grid Enum ToggleButton", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumToggleButtonTextToolTips", DefaultValue = EnumLocalized.Choice2 )] public List GridEnumToggleButtonText { get; set; } /// /// Grid Enum ToggleButton supporting image and text. /// Default value is set to Choice 1. /// [SchemaProperty()] [GridEnumControl( AllowToAddElements = true, AllowToRemoveElements = true, EnumType= typeof(EnumLocalized), Presentation = PresentationMode.ToggleButton , Item = PresentationItem.ImageWithText, Description = "GridEnumToggleButtonImageText", Category = "Grid Enum ToggleButton", IsVisible = true, IsEnabled = true, Index = 6, Localizable = true, Tooltip = "GridEnumToggleButtonImageTextToolTips", DefaultValue = EnumLocalized.Choice1 )] public List GridEnumToggleButtonImageText{ get; set; } # endregion GridEnumToggleButton } }