Dim partDoc As PartDocument = ThisDoc.Document For Each sb As SurfaceBody In partDoc.ComponentDefinition.SurfaceBodies Dim sbName As String = sb.Name.ToLower() ' To make the code simpler, check the name in lowercase If ((sbName.StartsWith("softwood") And CladdingSelection = 1) OrElse _ (sbName.StartsWith("softshell") And CladdingSelection = 2) OrElse _ (sbName.StartsWith("cellufoam") And CladdingSelection = 3) OrElse _ (sbName.StartsWith("canexcel") And CladdingSelection = 4) ) Then sb.Visible = True Else sb.Visible = False End If Next