Aligning multiple lights with dynamo

I’m super new to dynamo and I’m trying to understand what I’m doing wrong here.

I’m trying to align lights in my model based on one Light that has the correct location in the floorplan. The lights that I’m trying to align are in different levels so I’m ok with their elevation. I just need to adjust the X, Y locations.

Any advice is appreciated.

I’m working in Revit 2024 with Dynamo v.2.18.1.

You’re telling ALL the items listed in B to be at the single point A.

As @Alien mentioned, you’ll presumably need one new location per object you want aligned. The easiest thing to do is get the current location of the existing lights and overwrite the X or Y value to that of the correctly aligned fixture. Then you have a list of updated locations, one for each fixture.

You also have your inputs switched. You’re passing the list of fixtures into the geometry input and the point location into the element input.

Thanks for responding. That’s kinda the idea. That everything aligns in floorplan. I just don’t want to overwrite their elevation (the Z value) because they are in different levels. I thought if the Z value was zero then that would work, but it’s not :sweat_smile:

Gotcha.


So get coordinates (A) … take the Z .. feed it into the Point.ByCoordinates and now you should have a list.
You can see currently they’re all Z = zero.

Hello @Panta Welcome :wink: or something here maybe

Hey @sovitek I tried your method and the elements only align in one axis. (I tried with different light families and even created a new file but it’s the same result. I even tried with the default revit fams)

ya h only one direction x or y…right im not really sure what you mean, can you sketch how you want them aligned ? if out of x or y we have to play with some vectors, but not sure thats it i just tried with sharp x iguess :slight_smile:

@sovitek :sweat_smile: So here is a sketch of what I’m trying to achieve. In the left is a floorplan and on the right is the 3D view in elevation.

Hey @Alien I tried your suggestion, but it gave me an error message :sweat_smile:

try making the code block this:

a.X;
a.Y;
b.Z;

yeps as Jacob say if i understand :wink: same same just another directoin :wink:

Oh, I understand now :slight_smile:

I finally got it :heart: Thanks guys

I just fixed the typo in your original - you went a.X; b.Y; b.Z;.

:wink:

That’s because you missed A out.
A = getting the Z coordinate for the model elements.