»' Find ALL Wall Types and their System Families (or Kinds)
»Dim newWallType As WallType = Nothing ' store the last one
»Dim sMsg As String = "ALL
Wall Types/Families in the model:"
»
»' We could again iterete all elements and check for WallType class,
»' but it's simpler directly from the doc:
»Dim doc As Revit.Document =
commandData.Application.ActiveDocument
»For Each wt As WallType In doc.WallTypes
» sMsg += vbCrLf & "
Type=" & wt.Name & "
Family(or Kind)=" & wt.Kind.ToString
» newWallType = wt
»Next
»MsgBox(sMsg)
»MsgBox( "Stored
WallType " &
newWallType.Name _
»
& " (Id=" & newWallType.Id.Value.ToString & ") for later use" )