Rhinocommon can't accesee to Material in panel?

When i import some materials, I can‘t access the material directly from the code like

doc = RhinoDoc.ActiveDoc;
doc.Materials.Find("GlassClear", false);

The code will get -1 which means don’t find ”GlassClear“. When I assign the “GlassClear” to some object manually, the code above will find the material.

You need to use the RenderMaterials table on the document to find materials that have not yet been assigned, but are in the document.