# Rotate imported objects according to an alignment

**URL:** <https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615>\
**Category:** Civil 3D\
**Created:** [November 5, 2024, 11:02am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615 "2024-11-05T11:02:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [November 5, 2024, 11:02am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/1 "2024-11-05T11:02:42Z")

</div>

Hi  
In continuation of my previous post, [Place blocks by excel coordinates - Civil3D - Dynamo](https://forum.dynamobim.com/t/place-blocks-by-excel-coordinates/105351/20)  
I´d like to figure out how I can, by Dynamo, rotate the objects parallel to an alignment. It´s regarding placing markerboards in correct rotation.

---

<div class="post-metadata">

**Author:** ![damdinsuren](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/damdinsuren/32/189786_2.png) [@damdinsuren](https://forum.dynamobim.com/u/damdinsuren)\
**Post date:** [November 8, 2024, 6:26am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/2 "2024-11-08T06:26:54Z")

</div>

Hello @FKNZ

Maybe this will help you.

 ![Objects by excel coord_2024-11-08_03-06-51](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/3/73eb47ddd21a4aeae0b7e34bfd9fc2ed0cb5763f.png)

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 10, 2025, 1:39pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/3 "2025-02-10T13:39:01Z")

</div>

Hi  
Will somebody please check my flow diagram. It doesnt place the objects in the civil 3d anymore. The only warning I get is on the “BlockReference.ByPoint” as following:

 ![Skærmbillede 2025-02-10 143807](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/c/6cbd4fcf6f8b29a7de35becc9d3e3b2e0c3f85ae.png)

[Objects by excel coord - Align objects to alignment\_1 - Kopi.dyn](https://forum.dynamobim.com/uploads/short-url/x7HkqLQ1Br1I8ZogniPfzNq61BG.dyn) (45.9 KB)

[Markerboard.dwg](https://forum.dynamobim.com/uploads/short-url/5fsyPzgowUeaZ32eWfnP7zoZHoX.dwg) (692.4 KB)  
[Markerboard.xlsx](https://forum.dynamobim.com/uploads/short-url/l1uULVeB4AFllOR8FYhLKFAnsje.xlsx) (15.4 KB)  
[Alignment for Markerboards.dwg](https://forum.dynamobim.com/uploads/short-url/rDIGWDrR0ux4PsHibdKbGGIkqrw.dwg) (1.1 MB)  
[Objects by excel coord - Align objects to alignment\_1 - Edited.dyn](https://forum.dynamobim.com/uploads/short-url/73BnB7iChEXNaHZnfgBm7SX0vf.dyn) (45.7 KB)

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 10, 2025, 1:39pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/4 "2025-02-10T13:39:28Z")

</div>

Hi again  
Will you please guide me

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 10, 2025, 1:48pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/5 "2025-02-10T13:48:23Z")

</div>

Which version of Civil 3D are you in?  
Can you clarify which dwg you’re using for others to reproduce?

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 10, 2025, 1:57pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/6 "2025-02-10T13:57:00Z")

</div>

Hi Jacob  
Iits 2025 and for production using the file “Markerboard.dwg”. I have uploaded a new dyn file ending with “Edited” which runs fine but doesnt show the objects in Civil 3D.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 10, 2025, 3:06pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/7 "2025-02-10T15:06:09Z")

</div>

Your edited graph doesn’t have a block input into the BlockReference.ByPoint.

After you fix that the error message will generate again. That message tells you exactly what the issue is. Quoting it here:

> BlockReference.ByPoint expects argument type(s) (Autodesk.AutoCAD.DynamoNodes.Block, Autodesk.DesignScript.Geometry.Point, double, double, Autodesk.DesignScript.Geometry.Vector, string, Autodesk.AutoCAD.DynamoNodes.Block), but was called with (Autodesk.AutoCAD.DynamoNodes.Block, Autodesk.DesignScript.Geometry.Point, double, Autodesk.DesignScript.Geometry.Vector, null, string, Autodesk.AutoCAD.DynamoNodes.Block). href=NonOverloadMethodResolutionError.html

This message is telling you that ‘the node expects (things) but got (different things)’. So you need to break down what it got vs what it exepected and find the difference. This is easiest withs ome more copy/paste, giving you something along the lines of this:

```auto
BlockReference.ByPoint expects argument type(s)
	(Autodesk.AutoCAD.DynamoNodes.Block, Autodesk.DesignScript.Geometry.Point, double, double, Autodesk.DesignScript.Geometry.Vector, string, Autodesk.AutoCAD.DynamoNodes.Block),
but was called with
	(Autodesk.AutoCAD.DynamoNodes.Block, Autodesk.DesignScript.Geometry.Point[], double[], Autodesk.DesignScript.Geometry.Vector, null, string, Autodesk.AutoCAD.DynamoNodes.Block). href=NonOverloadMethodResolutionError.html

```

Breaking that down further to get objects paired by input type, we get:

```auto
Autodesk.AutoCAD.DynamoNodes.Block, Autodesk.AutoCAD.DynamoNodes.Block
Autodesk.DesignScript.Geometry.Point, Autodesk.DesignScript.Geometry.Point[]
double, double[]
double, Autodesk.DesignScript.Geometry.Vector
Autodesk.DesignScript.Geometry.Vector, null
string, string
Autodesk.AutoCAD.DynamoNodes.Block, Autodesk.AutoCAD.DynamoNodes.Block

```

By the looks of it your vector is going into an input which expects a double (scale) when you want it into the input which expects a vector (normal).

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 12, 2025, 9:43am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/8 "2025-02-12T09:43:32Z")

</div>

Hi Jacob  
I´m not used to that Dynamo response language, so don´t know exactly where to edit the diagram. But I can see that The flow setup for “Rotation” makes trouble since it inserted the blocks in Civil 3D before I added that to the “Block.Ref.Bypoint”. Can you practically show where I should make changes?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2025, 11:20am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/9 "2025-02-12T11:20:29Z")

</div>

Upload a larger image of your graph showing what you ahve now, using the export canvas as image function (zoom in, hit the button in the top right).

Basically your scale input should be in the normal input for the node which is causing the error…

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 12, 2025, 11:49am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/10 "2025-02-12T11:49:50Z")

</div>

Here it is

 ![Objects by excel coord - Align objects to alignment](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/7/37674572438d60cd8f00894426dcfcc3da1e0df3.png)

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 12, 2025, 12:32pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/11 "2025-02-12T12:32:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/4/e412407f9ccfe932a54ae8b813d44e6d37f1dc7b.png)

When connected to “Normal”, it only shows 4 objects in Civil 3D…?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2025, 1:33pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/12 "2025-02-12T13:33:13Z")

</div>

How many did you expect? You have a lacing issue somewhere along the line, but I am not sure where.

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 12, 2025, 2:20pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/13 "2025-02-12T14:20:18Z")

</div>

141 according to the excel sheet- Its funny that it worked before I added the rotation input.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2025, 2:22pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/14 "2025-02-12T14:22:48Z")

</div>

Rotation is set to @L2, which means you’ve altered the way the lacing works on that node. Need to see the data and list structure for all input to the node.

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 12, 2025, 2:47pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/15 "2025-02-12T14:47:19Z")

</div>

[Markerboard.xlsx](https://forum.dynamobim.com/uploads/short-url/l1uULVeB4AFllOR8FYhLKFAnsje.xlsx) (15.4 KB)

Here it is

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [February 26, 2025, 3:58pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/17 "2025-02-26T15:58:56Z")

</div>

I tried with new ways for the rotation part, but still doesnt show the blocks.

[Objects by excel coord - Align objects to alignment\_new solution.dyn](https://forum.dynamobim.com/uploads/short-url/d3rODoQZILEO7oqVSv3zDvadVZk.dyn) (48.4 KB)

 ![Objects by excel coord - Align objects to alignment_new solution_2025-02-26_04-57-57](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/7/27ce273febc885f8b6b530bfa5343102750f568c.png)

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [February 26, 2025, 8:16pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/18 "2025-02-26T20:16:47Z")

</div>

Could you zoom in to the nodes before you use the function in Dynamo to export out the canvas? It will be the only way to read to name of the nodes.

---

<div class="post-metadata">

**Author:** ![damdinsuren](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/damdinsuren/32/189786_2.png) [@damdinsuren](https://forum.dynamobim.com/u/damdinsuren)\
**Post date:** [February 27, 2025, 4:48am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/19 "2025-02-27T04:48:21Z")

</div>

hello @FKNZ  
Try this. Blocks showed up, but I have no clue how to rotate all blocks into alignment. Sorry.  
[Objects by excel coord - Align objects to alignment\_new solution.dyn](https://forum.dynamobim.com/uploads/short-url/duUZ3XwXzyAYCBoNfpkZo0cmhGX.dyn) (43.7 KB)

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [February 27, 2025, 5:54am UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/20 "2025-02-27T05:54:18Z")

</div>

Try this node to get bearing at point

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/3/c3afd622c4a6a4e37cc8b3306f0beb8bb4824cdd.jpeg)  
Thanks @hosneyalaa for the screenshot 🙂

You can create the point based in station along alignment but where block reference where inserted but set offset to ”0”

---

<div class="post-metadata">

**Author:** ![FKNZ](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FKNZ](https://forum.dynamobim.com/u/FKNZ)\
**Post date:** [March 4, 2025, 1:20pm UTC](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615/21 "2025-03-04T13:20:49Z")

</div>

![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/8/587af91c0adeee69b5b32867f81af4758b430557.png)

Hi Patrick  
Where in the diagram will you insert the one with “bearing” you have mentioned?

[Next page](https://forum.dynamobim.com/t/rotate-imported-objects-according-to-an-alignment/105615.md?page=2)
