As my title, I want to know total endpoint located on the edge of the floor. Does anyone has a solution? My ideal maybe like this:
int i = 0;
FilteredElementCollector docCollector1 = new FilteredElementCollector(doc).OfClass(typeof(Point));
foreach(Point point in docCollector1)
{
i++;
}
TaskDialog.Show("Revit","Have total {0} point on the edge of the floor ", i);
This's image about my problem: Edge has endpoint
I only wan't to know how many endpoint arround my floor.
I can identify 4 edge by this code, but I'm still don't know get all the point for each edge.
for (int i = 0; i < ea.Size; i++)
{
Edge e = ea.get_Item(i);
//Identify point located edge in here
IList<XYZ> exyz = e.Tessellate();
int m = exyz.Count;
XYZ sPoint = exyz[0];
XYZ ePoint = exyz[m - 1];
XYZ mPoint = new XYZ((sPoint.X + ePoint.X) / 2, (sPoint.Y + ePoint.Y) / 2, 0);
}
I just answered your question on how to get all the points on the edge of the floor in the Revit API discussion forum :
You can add a geometric location filter, eg, using a BoundingBoxIntersectsFilter .
Here are some examples:
http://thebuildingcoder.typepad.com/blog/2013/03/filter-for-family-instances-in-a-room.html
http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.9
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.