If model Is Nothing Then Throw New Exception("Model not present") End If If (Not model.Type = EpfcModelType.EpfcMDL_PART) And _(Not model.Type = EpfcModelType.EpfcMDL_ASSEMBLY) Then Throw New Exception("Model is not a solid") End If