def GetMaterials(api):
    project = api.DataModel.Project
    egrDataLibrary = project.EngineeringDataLibrary
    materials = egrDataLibrary.GetMaterials()
    return [mat.DisplayName for mat in materials]
    
def GetMaterialByName(api, matName):
    project = api.DataModel.Project
    egrDataLibrary = project.EngineeringDataLibrary
    materials = egrDataLibrary.GetMaterials()
    material = materials.GetByName(matName)
    return material
