public Result OnStartup(UIControlledApplication application) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) this.m_MyForm = null; string text = "Hot Gear"; try { application.CreateRibbonTab(text); } catch { } RibbonPanel val = application.CreateRibbonPanel(text, "Parameter Explorer"); ContextualHelp contextualHelp = new ContextualHelp(2, "https://hotgearproject.wordpress.com/hot-gear-project-2/"); PushButton val2 = val.AddItem(new PushButtonData("HotGear_IPE", "Instance", HotGearPackage.AddInPath, "InstanceParameterCollector")) as PushButton; val2.set_ToolTip("Collect Project Instance Elements Data"); val2.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Instance.png")); val2.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Instance_s.png")); val2.SetContextualHelp(contextualHelp); val.AddSeparator(); PushButton val3 = val.AddItem(new PushButtonData("HotGear_TPE", "Type", HotGearPackage.AddInPath, "TypeParameterCollector")) as PushButton; val3.set_ToolTip("Collect Project Type Elements Data"); val3.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Type.png")); val3.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Type_s.png")); val3.SetContextualHelp(contextualHelp); return(0); }
public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) GlobalVar.G_commandData = commandData; UIApplication application = commandData.get_Application(); Document document = application.get_ActiveUIDocument().get_Document(); UIDocument activeUIDocument = application.get_ActiveUIDocument(); Application application2 = commandData.get_Application().get_Application(); View activeView = document.get_ActiveView(); GlobalVar.TypeORInstance = "Family Instance"; Selection selection = application.get_ActiveUIDocument().get_Selection(); ICollection <ElementId> elementIds = selection.GetElementIds(); List <Element> list = new List <Element>(); foreach (ElementId item in elementIds) { Element element = document.GetElement(item); list.Add(element); } if (list.Count > 0) { DataSet dataSet = new DataSet(); DataSet dataSet2 = new DataSet(); List <ElementId> list2 = new List <ElementId>(); foreach (Element item2 in list) { try { list2.Add(item2.get_Category().get_Id()); } catch { MessageBox.Show("None Category Instance Is Not Support.", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } List <ElementId> list3 = ((IEnumerable <ElementId>)list2).Distinct <ElementId>().ToList <ElementId>(); if (list3.Count == 0) { return(0); } foreach (ElementId item3 in list3) { FilteredElementCollector val = new FilteredElementCollector(document, elementIds).OfCategoryId(item3); IList <Element> eleList = val.ToElements(); DataTable table = Method.ElementParameter2Table(commandData, eleList); DataTable table2 = Method.ParameterIsRead(commandData, eleList, document); dataSet.Tables.Add(table); dataSet2.Tables.Add(table2); } ParameterEventHandler parameterEventHandler = new ParameterEventHandler(); ElementOverrideEventHandler elementOverrideEventHandler = new ElementOverrideEventHandler(); ResetElementOverrideEventHandler resetElementOverrideEventHandler = new ResetElementOverrideEventHandler(); ExternalEvent g_exEvent = ExternalEvent.Create(parameterEventHandler); ExternalEvent g_exEvent2 = ExternalEvent.Create(elementOverrideEventHandler); ExternalEvent g_exEvent3 = ExternalEvent.Create(resetElementOverrideEventHandler); GlobalVar.G_handler = parameterEventHandler; GlobalVar.G_exEvent = g_exEvent; GlobalVar.G_handler1 = elementOverrideEventHandler; GlobalVar.G_exEvent1 = g_exEvent2; GlobalVar.G_handler3 = resetElementOverrideEventHandler; GlobalVar.G_exEvent3 = g_exEvent3; GlobalVar.MyDataSet = dataSet; GlobalVar.Is_Read_Only = dataSet2; HotGear_Parameter_Explorer hotGear_Parameter_Explorer = new HotGear_Parameter_Explorer(); hotGear_Parameter_Explorer.InitializeComponent(commandData, document); hotGear_Parameter_Explorer.Show(); } else { List <string> list4 = new List <string>(); foreach (Document document2 in application2.get_Documents()) { list4.Add(document2.get_Title()); } GlobalVar.G_Doc_Selection = list4; CategorySelection categorySelection = new CategorySelection(); categorySelection.InitializeComponent(commandData); categorySelection.ShowDialog(); List <Element> g_Ele = GlobalVar.G_Ele; List <string> g_Cat_Selection = GlobalVar.G_Cat_Selection; Document g_Sel_Doc = GlobalVar.G_Sel_Doc; ICollection <ElementId> g_Eleid = GlobalVar.G_Eleid; if (g_Cat_Selection == null) { return(0); } DataSet dataSet3 = new DataSet(); DataSet dataSet4 = new DataSet(); List <ElementId> list5 = new List <ElementId>(); foreach (Element item4 in g_Ele) { foreach (string item5 in g_Cat_Selection) { if (item4.get_Category().get_Name() == item5) { list5.Add(item4.get_Category().get_Id()); } } } List <ElementId> list6 = ((IEnumerable <ElementId>)list5).Distinct <ElementId>().ToList <ElementId>(); if (list6.Count == 0) { return(0); } foreach (ElementId item6 in list6) { FilteredElementCollector val3 = new FilteredElementCollector(g_Sel_Doc, g_Eleid).OfCategoryId(item6); IList <Element> eleList2 = val3.ToElements(); DataTable table3 = Method.ElementParameter2Table(commandData, eleList2); DataTable table4 = Method.ParameterIsRead(commandData, eleList2, g_Sel_Doc); dataSet3.Tables.Add(table3); dataSet4.Tables.Add(table4); } ParameterEventHandler parameterEventHandler2 = new ParameterEventHandler(); ElementOverrideEventHandler elementOverrideEventHandler2 = new ElementOverrideEventHandler(); ResetElementOverrideEventHandler resetElementOverrideEventHandler2 = new ResetElementOverrideEventHandler(); ExternalEvent g_exEvent4 = ExternalEvent.Create(parameterEventHandler2); ExternalEvent g_exEvent5 = ExternalEvent.Create(elementOverrideEventHandler2); ExternalEvent g_exEvent6 = ExternalEvent.Create(resetElementOverrideEventHandler2); GlobalVar.G_handler = parameterEventHandler2; GlobalVar.G_exEvent = g_exEvent4; GlobalVar.G_handler1 = elementOverrideEventHandler2; GlobalVar.G_exEvent1 = g_exEvent5; GlobalVar.G_handler3 = resetElementOverrideEventHandler2; GlobalVar.G_exEvent3 = g_exEvent6; GlobalVar.MyDataSet = dataSet3; GlobalVar.Is_Read_Only = dataSet4; HotGear_Parameter_Explorer hotGear_Parameter_Explorer2 = new HotGear_Parameter_Explorer(); hotGear_Parameter_Explorer2.InitializeComponent(commandData, g_Sel_Doc); hotGear_Parameter_Explorer2.Show(); } return(0); }
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) GlobalVar.G_commandData = commandData; UIApplication application = commandData.get_Application(); Document document = application.get_ActiveUIDocument().get_Document(); UIDocument activeUIDocument = application.get_ActiveUIDocument(); Application application2 = commandData.get_Application().get_Application(); View activeView = document.get_ActiveView(); GlobalVar.TypeORInstance = "Family Type"; Selection selection = application.get_ActiveUIDocument().get_Selection(); ICollection <ElementId> elementIds = selection.GetElementIds(); ICollection <ElementId> collection = new List <ElementId>(); List <Element> list = new List <Element>(); foreach (ElementId item in elementIds) { try { Element element = document.GetElement(item); ElementId typeId = element.GetTypeId(); Element element2 = document.GetElement(typeId); collection.Add(typeId); list.Add(element2); } catch { } } if (list.Count > 0) { DataSet dataSet = new DataSet(); DataSet dataSet2 = new DataSet(); List <ElementId> list2 = new List <ElementId>(); foreach (Element item2 in list) { try { list2.Add(item2.get_Category().get_Id()); } catch { } } List <ElementId> list3 = ((IEnumerable <ElementId>)list2).Distinct <ElementId>().ToList <ElementId>(); foreach (ElementId item3 in list3) { FilteredElementCollector val = new FilteredElementCollector(document, collection).OfCategoryId(item3); IList <Element> eleList = val.ToElements(); DataTable table = Method.ElementParameter2Table(commandData, eleList); DataTable table2 = Method.ParameterIsRead(commandData, eleList, document); dataSet.Tables.Add(table); dataSet2.Tables.Add(table2); } ParameterEventHandler parameterEventHandler = new ParameterEventHandler(); ElementOverrideEventHandler elementOverrideEventHandler = new ElementOverrideEventHandler(); ResetElementOverrideEventHandler resetElementOverrideEventHandler = new ResetElementOverrideEventHandler(); ExternalEvent g_exEvent = ExternalEvent.Create(parameterEventHandler); ExternalEvent g_exEvent2 = ExternalEvent.Create(elementOverrideEventHandler); ExternalEvent g_exEvent3 = ExternalEvent.Create(resetElementOverrideEventHandler); GlobalVar.G_handler = parameterEventHandler; GlobalVar.G_exEvent = g_exEvent; GlobalVar.G_handler1 = elementOverrideEventHandler; GlobalVar.G_exEvent1 = g_exEvent2; GlobalVar.G_handler3 = resetElementOverrideEventHandler; GlobalVar.G_exEvent3 = g_exEvent3; GlobalVar.MyDataSet = dataSet; GlobalVar.Is_Read_Only = dataSet2; HotGear_Parameter_Explorer hotGear_Parameter_Explorer = new HotGear_Parameter_Explorer(); hotGear_Parameter_Explorer.InitializeComponent(commandData, document); hotGear_Parameter_Explorer.Show(); } else { List <string> list4 = new List <string>(); foreach (Document document2 in application2.get_Documents()) { list4.Add(document2.get_Title()); } GlobalVar.G_Doc_Selection = list4; CategorySelection categorySelection = new CategorySelection(); categorySelection.InitializeComponent(commandData); categorySelection.ShowDialog(); List <Element> g_Ele = GlobalVar.G_Ele; List <string> g_Cat_Selection = GlobalVar.G_Cat_Selection; Document g_Sel_Doc = GlobalVar.G_Sel_Doc; ICollection <ElementId> g_Eleid = GlobalVar.G_Eleid; if (g_Cat_Selection == null) { return(0); } List <ElementId> list5 = new List <ElementId>(); foreach (Element item4 in g_Ele) { foreach (string item5 in g_Cat_Selection) { if (item4.get_Category().get_Name() == item5) { list5.Add(item4.get_Category().get_Id()); } } } DataSet dataSet3 = new DataSet(); DataSet dataSet4 = new DataSet(); List <ElementId> list6 = ((IEnumerable <ElementId>)list5).Distinct <ElementId>().ToList <ElementId>(); foreach (ElementId item6 in list6) { FilteredElementCollector val3 = new FilteredElementCollector(g_Sel_Doc, g_Eleid).OfCategoryId(item6); IList <Element> list7 = new List <Element>(); foreach (Element item7 in val3) { list7.Add(item7); } DataTable table3 = Method.ElementParameter2Table(commandData, list7); DataTable table4 = Method.ParameterIsRead(commandData, list7, g_Sel_Doc); dataSet3.Tables.Add(table3); dataSet4.Tables.Add(table4); } ParameterEventHandler parameterEventHandler2 = new ParameterEventHandler(); ElementOverrideEventHandler elementOverrideEventHandler2 = new ElementOverrideEventHandler(); ResetElementOverrideEventHandler resetElementOverrideEventHandler2 = new ResetElementOverrideEventHandler(); ExternalEvent g_exEvent4 = ExternalEvent.Create(parameterEventHandler2); ExternalEvent g_exEvent5 = ExternalEvent.Create(elementOverrideEventHandler2); ExternalEvent g_exEvent6 = ExternalEvent.Create(resetElementOverrideEventHandler2); GlobalVar.G_handler = parameterEventHandler2; GlobalVar.G_exEvent = g_exEvent4; GlobalVar.G_handler1 = elementOverrideEventHandler2; GlobalVar.G_exEvent1 = g_exEvent5; GlobalVar.G_handler3 = resetElementOverrideEventHandler2; GlobalVar.G_exEvent3 = g_exEvent6; GlobalVar.MyDataSet = dataSet3; GlobalVar.Is_Read_Only = dataSet4; HotGear_Parameter_Explorer hotGear_Parameter_Explorer2 = new HotGear_Parameter_Explorer(); hotGear_Parameter_Explorer2.InitializeComponent(commandData, g_Sel_Doc); hotGear_Parameter_Explorer2.Show(); } return(0); }