-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGenericModelStrucMaterial.cs
More file actions
57 lines (50 loc) · 1.43 KB
/
Copy pathGenericModelStrucMaterial.cs
File metadata and controls
57 lines (50 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Created by SharpDevelop.
* User: julianvenczel
* Date: 1/09/2017
* Time: 9:00 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;
using System.Collections.Generic;
using System.Linq;
namespace viewFilterChanger
{
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
[Autodesk.Revit.DB.Macros.AddInId("004FF341-7740-488C-A540-4FFF317A891D")]
public partial class ThisApplication
{
private void Module_Startup(object sender, EventArgs e)
{
}
private void Module_Shutdown(object sender, EventArgs e)
{
}
#region Revit Macros generated code
private void InternalStartup()
{
this.Startup += new System.EventHandler(Module_Startup);
this.Shutdown += new System.EventHandler(Module_Shutdown);
}
#endregion
public void filterChanger()
{
Document CurDoc = this.ActiveUIDocument.Document;
ElementCategoryFilter GMFilt = new ElementCategoryFilter(BuiltInCategory.OST_GenericModel);
string GmMat = "";
foreach (Element G in new FilteredElementCollector(CurDoc)
.OfClass(typeof(FamilyInstance))
.WherePasses(GMFilt))
{
FamilyInstance gfi = G as FamilyInstance;
FamilySymbol gs = gfi.Symbol;
GmMat += gs.StructuralMaterialType;
}
TaskDialog.Show("elements", GmMat);
}
}
}