How do I select materials that are not in my favourites?
I notice that even after putting materials in my favourite folder once I run a new instance of mechanical using Pymechanical it doesn't show up there.
I have found this code below from @Ayush Kumar
here : https://discuss.ansys.com/discussion/1557/how-to-add-materials-from-material-library-in-mechanical-with-act#latest
Unfortunately, when I try it, it just refreshes the material but does not add any new material
cmd = """
library1 = EngData.OpenLibrary(
Name="Composite Materials",
Source="Composite_Materials.xml")
system1 = GetSystem(Name="SYS")
engineeringData1 = system1.GetContainer(ComponentName="Engineering Data")
matl1 = engineeringData1.ImportMaterial(
Name="E-Glass",
Source="Composite_Materials.xml")
"""
ExtAPI.Application.ScriptByName('journaling').ExecuteCommand(cmd)
ExtAPI.DataModel.Project.Model.RefreshMaterials()