Im trying to insert a family at Easting/Northings coordinate points from a spreadsheet into an existing coordinated site. Im able to create a scrip which shows the points on the model but they seem out of scale to where they are extremely close together and nowhere near the positions they’re suppose to be. Please can some help regarding this situation and advise where i could be going wrong. Im happy to share my .dyn file if needs be.
I think you need to ask a question here
The data in the spreadsheet is related to a certain origin and the data is measured from that point.
Check if necessary, double check too
And welcome in the forum.
The coordinates i am using are relative and correspond to the Project Base Point and the Survey point on the model i am using. Just need to apply the new coordinates in the current model.
There are multiple coordinate systems in play in Revit, Internal, which Dynamo uses, Project which is the project datum coordinate system, typically a convenient point like intersection of grids 1 & A, and finally Survey which maps a geolocated coordinate system.
Your set out data will have to be translated into the internal coordinate system for Dynamo to be able to place your elements.
Check the coordinate units match the project units (m vs mm) and adjust
Use Coordinates.BasePoint node to get the Project Base Point in internal coordinates
Translate the excel coordinates to the project base point by adding internal Easting / Northing values
Rotate the coordinates around the Project Base Point
This will place elements if their coordinates are in the project coordinate system
If they are in the survey system you will require an additional translation to the survey system before rotation
As always - triple check your survey / project locations are correct and elements are placed and reporting coordinates as expected.
Here is a basic set up
Python required to get base point location in survey coordinates
import clr
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
units = doc.GetUnits().GetFormatOptions(SpecTypeId.Length).GetUnitTypeId()
def convert_units(n, units=units):
return UnitUtils.ConvertFromInternalUnits(n, units)
project_point = BasePoint.GetProjectBasePoint(doc).SharedPosition
OUT = map(convert_units, [project_point.X, project_point.Y, project_point.Z])
Edit: Crumple package has Coordinates.PBP and Coordiantes.SP which retrieve these values