Revit API

Revit API

Reply
Member
chiouhau
Posts: 4
Registered: ‎10-16-2012
Message 1 of 4 (211 Views)

Unable to get material using "Materials.Contains(name)"

211 Views, 3 Replies
10-16-2012 02:08 AM

Hi,

 

I'm using Revit 2013. I want to get the material from a family document (e.g.

Material m = m_familyDocument.Settings.Materials.get_Item(name);). I used 2 different functions (Materials.Contains(string name) and Materials.get_Item(string name)) but both also giving me the following error: "Revit encountered a System.MissingMethodException: Method not found: 'Autodesk.Revit.DB.Materials Autodesk.Revit.DB.Settings.get_Materials()'." Am I allowed to retrieve material from a family document? What is the correct function to be used?

 

 

Thanks,

Chiou Hau