<VB.NET>
''
identify the type of the element known to the UI.
Public Sub IdentifyElement(ByVal elem As Element)
Dim s As String = ""
If TypeOf elem Is Wall Then
s = “壁"
ElseIf TypeOf elem Is Floor Then
s = “床"
ElseIf TypeOf elem Is RoofBase Then
s = “屋根"
ElseIf TypeOf elem Is FamilyInstance Then
'' An instance of a component family is all
FamilyInstance.
'' We'll need to further check its
category.
If
elem.Category.Id.IntegerValue = _
BuiltInCategory.OST_Doors Then
s = “ドア"
ElseIf
elem.Category.Id.IntegerValue = _
BuiltInCategory.OST_Windows Then
s = “窓"
ElseIf
elem.Category.Id.IntegerValue = _
BuiltInCategory.OST_Furniture Then
s = “家具"
Else
s = “コンポーネント ファミリインスタンス" '' e.g.
Plant
End If
...
</VB.NET>