material_name = part.Configurations[c.config_name].Material.Name
Code above throw a exception: Xarial.XCad.Exceptions.EntityNotFoundException:“Entity 'XXXX' is not found in the repository”
I have checked the folder "C:\ProgramData\SOLIDWORKS", the material database folder lost for some reasons, maybe it's the causing.
Perhaps you should add a method to avoid the exception arising.
material_name = part.Configurations[c.config_name].Material.Name
Code above throw a exception: Xarial.XCad.Exceptions.EntityNotFoundException:“Entity 'XXXX' is not found in the repository” I have checked the folder "C:\ProgramData\SOLIDWORKS", the material database folder lost for some reasons, maybe it's the causing. Perhaps you should add a method to avoid the exception arising.