Get survey point trough API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i noticed something weird when i am retrieving the survey point coordinates.
i am using the code below after i have been reading Jeremy's blog ( http://thebuildingcoder.typepad.com/blog/2012/11/survey-and-project-base-point.html )
At first this seemed to be right. though i noticed the values changing when the rotation in the project basepoint changes.
though when i check the survey point properties within revit iself (the blue triangle) it still should be 0,0,0 but the the values trough API are different.
why is this happening? am i still retrieving the wrong point somehow, and how to get the right one ?
although its only very little, i dont understand why it isn't 0 anymore as the double you are getting.
(also see attached screenshot N/S value)
my code:
FilteredElementCollector locations = new FilteredElementCollector(doc).OfClass(typeof(BasePoint)); foreach (var locationPoint in locations) { BasePoint basePoint = locationPoint as BasePoint; if (basePoint.IsShared== true) { //this is the survey point Location svLoc = basePoint.Location; projectSurvpntX = basePoint.get_Parameter(BuiltInParameter.BASEPOINT_EASTWEST_PARAM).AsDouble(); projectSurvpntY = basePoint.get_Parameter(BuiltInParameter.BASEPOINT_NORTHSOUTH_PARAM).AsDouble(); projectSurvpntZ = basePoint.get_Parameter(BuiltInParameter.BASEPOINT_ELEVATION_PARAM).AsDouble();
....