Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Finding the right coordinates

1 REPLY 1
Reply
Message 1 of 2
Anonymous
566 Views, 1 Reply

Finding the right coordinates

I have created a plugin that calculates the intersections between grids. The coordinates from the intersection calculation are using the basepoint position as the origin of the coordinates. I want to convert the coordinates to the Survey Point position. I tried to fetch the coordinates of the base point with this code:

 

ElementCategoryFilter filter = new ElementCategoryFilter(BuiltInCategory.OST_ProjectBasePoint);

FilteredElementCollector collector = new FilteredElementCollector(doc);
IList<Element> elements = collector.WherePasses(filter).ToElements();

foreach (Element element in elements)
{
double x = element.get_Parameter(BuiltInParameter.BASEPOINT_EASTWEST_PARAM).AsDouble();
double y = element.get_Parameter(BuiltInParameter.BASEPOINT_NORTHSOUTH_PARAM).AsDouble();
double elevation = element.get_Parameter (BuiltInParameter.BASEPOINT_ELEVATION_PARAM).AsDouble();
}

 



I wanted to use the basepoint coordinates to adjust the coordinates i found in my intersection calculation to use the Survey Point as a origin. But i can`t figure how to use the values from basepoint to adjust the coordinates. It seems the values in basepoint is not using survey point as origin, but maybe the internal coordinates. Or maybe i misunderstood the values in basepoint. Any pointers to what i can try ?

1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: Anonymous

Hi Krigsdal, I tried that as well once and then found it easier to go a different route. Please look at my setout point sample add-in for the solution:

 

http://thebuildingcoder.typepad.com/blog/2012/08/structural-concrete-setout-point-add-in.html

 

Here is the description of the transformation I use, plus a few other links exploring similar issues:

 

http://thebuildingcoder.typepad.com/blog/2012/06/real-world-concrete-corner-coordinates.html#4

 

I hope this helps. Please let us know whether it completely addresses your requirements and what solution you end up using. Thank you!

 

Cheers,



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community