'MsgBox("ok1")
fi.Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS).Set(ei.ElementName)
'MsgBox("ok2")
If Not materialsBase.ContainsKey(ei.MaterialName) Then
Throw New ArgumentException($"Не найден материал {ei.MaterialName}")
Return
End If
Dim par As Parameter
par = fi.LookupParameter("Материал")
If par Is Nothing Then
MsgBox("Nothing")
Else
fi.LookupParameter("Материал").Set(materialsBase(ei.MaterialName))
End If