public static string getPaintWallFaces(ElementId wallId,Document doc)
{
Element wall = doc.GetElement(wallId);
GeometryElement geometryElement = wall.get_Geometry(new Options());
string str= "";
foreach (GeometryObject geometryObject in geometryElement)
{
if (geometryObject is Solid)
{
Solid solid = geometryObject as Solid;
foreach (Face face in solid.Faces)
{
if (doc.IsPainted(wallId, face))
{
ElementId mid = doc.GetPaintedMaterial(wallId, face);
Material mel = doc.GetElement(mid) as Material;
str+=mel.Name+"\n";
}
}
}
}
return str;
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น