private List<Line> GetLines(Element element)
{
List<Line> lines = new List<Line>();
Autodesk.Revit.DB.Options geomOption = element.Document.Application.Create.NewGeometryOptions();
if (null != geomOption)
{
geomOption.View = element.Document.ActiveView;
}
GeometryElement geometryElement = element.get_Geometry(geomOption);
foreach (GeometryInstance gi in geometryElement)
{
foreach (GeometryObject go in gi.GetInstanceGeometry())
{
Line l = go as Line;
if (l != null)
{
lines.Add(l);
}
}
}
return lines;
}