Inserting a family into a coordinated site with coordinates from an excel spreadsheet

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

2 Likes