Solved! Go to Solution.
I am using Creo Parametric Release 8.0 and Datecode18.104.22.168
Material Files - Are there any formatting or other requirements (such as required parameters or parameter groups) that must be satisfied in order to ensure that the files are valid for use?
Background-as part of the company transitioning from Solidworks to Creo, the existing Solidworks custom/customer materials database is to be replicated as a company Materials Library. The sldmat file is an xml file and a java utility (outside of Creo API's) was written to parse the file and write a .mtl file for each "material" element in the sldmat DOM.
visually the resulting mtl files appear as though they should work. Initial testing result is that the newly created mtl files are visible to Creo but when attempting to assign to the model an error indicating that the [MATERIAL] is not Valid. s
Here are the errors that I faced
Selecting a generated material file results in a message stating that the file is not valid
my suggestion ... compare the structure of generated .mtl file with Creo original file (for example ...\Creo 22.214.171.124\Common Files\creo_standards\material_database\metal_steel_low_carbon.mtl).
Note: You can also pack .mtl file into .zip file and upload .zip file. This enables other users to help you.
When displacing Solidworks your customer required to have the material database converted to Creo's and this is essential that this is iso functional.
The Solidworks material database has been converted to Creo's thanks to a Java Tooling and the resulting files are not considered valid by Creo.
First and foremost Creo material files, like all Creo files, are recommended to be created with official PTC solutions. As a former developer and PLM migration specialist, I get that the xml can be edited and general parsing is tempting in that instance.
So I'll disclose to you the official way to go: if you or the provider of the parsing tool is comfortable with Java, then use Java Object Toolkit for the writing part of the mtl files. And more specifically run the method Materials::Create(). If any issue in the creation with that method, then the Creo JOTK Support team will be accountable.
Because the parsing tool relies on general Java programming, PTC cannot be held accountable for looking into.
And because I was a PLM migration developer in a past life, here's one of the things i'd verify: what's the encoding of the mtl file? Is it the same as the ones shipped with Creo?
Creo can retrieve material information if they are originally assigned in Solidworks.
Inside Creo, File > Open > sldprt
File > Prepare > Model properties > Material Change
File > Save mtl file.