
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
My goal is to dupilcate/create new WallType and change the properties of structure compounds.
I would appreciate if somebody could help me with using of WallType.Duplicate() method.
I guess that main part of the source code will look like this:
FilteredElementCollector collector = new FilteredElementCollector(doc);
collector.OfClass(typeof(Wall));
foreach (Wall wall in collector)
{
WallType aWallType = wall.WallType;
if (WallKind.Basic == wall.WallType.Kind)
{
if (aWallType.Name == "Generic - 200mm") aWallType.Duplicate("MyNewWallType");
}
}
I am guessing also that first I will need to add "Generic - 200mm" WallType to revit Document DataBase (Autodesk.Revit.DB) in case of this type of wall have not been added before.
The source code mention above is not working properly. "MyNewWallType" is not shown in Revit wall type list.
I heard about Insert() method... maybe somebody is familiar with this subject?
Solved! Go to Solution.