Question: Add a material to mattable?

Creator
Creator

Hi all!

 

      When I program to add material to library,the following question encontered:

      My programe is as follows:

      string[] aa = new string[2];

      aa[0] = "abc";

      aa[1] = "def";

      objmat.AddMaterialToLibrary("mat_A", strLibrary, strMatPath, aa.Length , aa, cus_FaceStyle, cus_FillStyle);

      object a1 = aa[0] as object;

      objmat.SetMaterialPropValueToLibrary("mat_A", strLibrary, SolidEdgeFramework.MatTablePropIndex.seDensity, a1);

 

     Program excuted succeed. But "mat_A" has not properties except “Density”。Object  “aa”  assignment is not successful。  Robot Sad

     When I replace "mat_A" with a input value, for example: textBox1.Text.Trim(), The "SetMaterialPropValueToLibrary" has a exception: "Unspecified error (Exception from HRESULT: 0x80004005(E_FAIL)) "   Robot Mad

    

     Does anybody know what  is  wrong ?  THKs.

 

     solid edge ST7 MP10

     C#  2013

 

    

 

1 REPLY

Re: Question: Add a material to mattable?

Phenom
Phenom

Hi,

 

you could post your question in the Solid-Edge-Developer-Community

 

Yasser