Hi All,
I am using the following snippet to create a new material;
Dim oNewMaterial As Material
Try
oNewMaterial = oPartDoc.Materials.Add(MatName, newDensity)
oNewMaterial.LinearExpansion = newLinearExpansion
oNewMaterial.PoissonsRatio = newPoissonsRation
oNewMaterial.SpecificHeat = newSpecificHeat
oNewMaterial.ThermalConductivity = newThermalConductivity
oNewMaterial.UltimateTensileStrength = newUltimateTensileStrength
oNewMaterial.YieldStrength = newYieldStrength
oNewMaterial.YoungsModulus = newYoungsModulus
oPartDoc.ComponentDefinition.Material = oNewMaterial
Catch
oPartDoc.ComponentDefinition.Material = oPartDoc.Materials.Item(MatName)
End Try
This allows me to create the material, and if it already exists, to select it as the current material.
It works fine on the surface. The new material exists if looked up under the iproperties. It exists on the materials drop-down list under Tools/Material and Appearance. It contains all the information I want. Lovely.
If I go to the materials browser, it doesn't exist anywhere that is visible. If I try to create the material through this interface, it tells me the material exists... but where is it?!?
I don't really care too much, because this new Materials interface so far has been pretty unfriendly, and I've been avoiding it... But, I'm working on adding the materials to structural shapes in the content center, and the material selection is looking at the library. With hundreds of materials, and no viable material library to import, I'm looking at entering these one by one if I can't automate it.
Thanks for your help.
V.
Inventor Professional 2013 sp1.1