public static IEnumerable <Material> SelectSingleMaterial(string name) { IMaterial material = null; try { material = MaterialAdapter.CreateMaterial(ProductClient.GetMaterialByName(name)); } catch (Exception ex) { MessageBox.Show(ex.Message); yield break; } yield return(material.Unwrap()); }
public static IEnumerable <IMaterial> SelectSingleProjectSpecific(string name, bool includeStandardMaterials) { yield return(MaterialAdapter.CreateMaterial(ProjectClient.GetMaterialForCurrentProjectByName(name, includeStandardMaterials))); }