Getting the Base and Survey point locations with respect to the Internal Origin

Getting the Base and Survey point locations with respect to the Internal Origin

Anonymous
Not applicable
1,604 Views
1 Reply
Message 1 of 2

Getting the Base and Survey point locations with respect to the Internal Origin

Anonymous
Not applicable

Looking at the code here, https://forums.autodesk.com/t5/revit-api-forum/get-survey-point-trough-api/td-p/7543173, I can get the location of the Base point with respect to the Survey point. But how do we get the locations of the Base and Survey points with respect to the Internal Origin?

0 Likes
Accepted solutions (1)
1,605 Views
1 Reply
Reply (1)
Message 2 of 2

FAIR59
Advisor
Advisor
Accepted solution

The location poimt of the Survey - and Project Base Point, is the Min -value (or Max) of the boundingbox.

			StringBuilder sb = new StringBuilder();
			
			IEnumerable<BasePoint> points = new FilteredElementCollector(doc)
				.OfClass(typeof(BasePoint))
				.Cast<BasePoint>();
			foreach(BasePoint bp in points)
			{
				string name = bp.IsShared? "surveypoint": "project basepoint";
				BoundingBoxXYZ bb = bp.get_BoundingBox(null);
				XYZ pos = bb.Min;
				sb.AppendLine(string.Format("{0} :  {1}",name, pos));
			}
			TaskDialog.Show("debug",sb.ToString());
0 Likes