0

I've been searching alot about this subject (and read alot) but can't find a solution. I'm trying to find the coordinates for a point relative to the project base point. I've found how to get them relative to the survey point as following:

ProjectLocation pl = doc.ActiveProjectLocation;
Transform ttr = pl.GetTotalTransform().Inverse;
 ProjectPosition projPosition = doc.ActiveProjectLocation.get_ProjectPosition(new XYZ(0, 0, 0));
LocationPoint loc = element.Location as LocationPoint;
if (loc != null)
{
    XYZ point = ttr.OfPoint(loc.Point);
}

this works perfectly even if I change the "The angle to the true north" but I can't find a way to get the position relative to the project base point. Has someone have a solution for this?

greets

DomCR
  • 533
  • 4
  • 19
Sennevds
  • 83
  • 10

1 Answers1

0

The base point can be retrieved through a FilteredElementCollector for BasePoint elements. Each BasePoint has a Location property that you can get to retrieve and set to move the point, cf., http://thebuildingcoder.typepad.com/blog/2012/11/survey-and-project-base-point.html.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
  • i've done the following var basePoints = doc.NewFilteredElementCollector().OfClass !x.IsShared); and i can get the coordinates but the problem is getting the coordinates of my point relative to this base point – Sennevds Apr 21 '17 at 08:58