# Select alignment string vs code

**URL:** https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758
**Category:** Uncategorized
**Created:** [August 22, 2024, 12:33pm UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758 "2024-08-22T12:33:43Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jcoon](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jcoon](https://forum.dynamobim.com/u/jcoon)
#### Post date: [August 22, 2024, 12:33pm UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/1 "2024-08-22T12:33:43Z")

</div>

Hi all,

Trying to understand why selection of alignment on-screen to get the alignment name as a string  
doesn’t work, when the pasted name of the alignment name works.

Any ideas?

[GET alignment name 1.pdf](https://forum.dynamobim.com/uploads/short-url/enzF4Mg5IjQ7Ep8uMhkeZchYGZ.pdf) (62.3 KB)  
[select-alignment-PROFILE Report to excel.dwg](https://forum.dynamobim.com/uploads/short-url/dLPd5XFVJvIBV8gIWP4lKmU5qW9.dwg) (2.1 MB)  
[select-alignment-PROFILE Report to excel.dyn](https://forum.dynamobim.com/uploads/short-url/6MLm58Hqw76ClNrXlz9hBfLse3.dyn) (53.4 KB)

---

<div class="post-metadata">

### Author: ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)
#### Post date: [August 22, 2024, 3:01pm UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/2 "2024-08-22T15:01:51Z")

</div>

I’m not an expert, but the output from the Name node is a list containing a Name…

Perhaps the Alignment node only takes a single Name? If you get the first item from the list does it work?

Hope that helps,

Mark

---

<div class="post-metadata">

### Author: ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)
#### Post date: [August 22, 2024, 4:18pm UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/3 "2024-08-22T16:18:30Z")

</div>

You’re way more likely to get responses if you share a screenshot of your graph in action, with all the information we need to understand your process, rather than relying on everyone else to download and run your graph (which can lead to assumptions, varying package versions, and other differences in outcome).

---

<div class="post-metadata">

### Author: ![Joe.Charpentier](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joe.charpentier/32/49617_2.png) [@Joe.Charpentier](https://forum.dynamobim.com/u/Joe.Charpentier)
#### Post date: [August 22, 2024, 4:47pm UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/4 "2024-08-22T16:47:07Z")

</div>

(EDIT: See Mark’s post above and Nick’s post below, data type is a red herring)

Screenshot of your PDF of a screenshot below:

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

(With the caveat I know nothing about Civil3d and it’s data structure/object model)

Is “Alignment Name” actually a string?  
I mean, it looks like a string, but the Selection.AlignmentByName node is looking for “Name” as an input, which may be a data type or property, rather than the actual text value of that name…

(If that makes any sense)

---

<div class="post-metadata">

### Author: ![jcoon](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jcoon](https://forum.dynamobim.com/u/jcoon)
#### Post date: [August 23, 2024, 11:31am UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/5 "2024-08-23T11:31:14Z")

</div>

Joe,

Thanks for reply,

I thought a name was a string, but maybe you right. it’s works fine with typing the name, just thought it should have worked. I’ll look and see if there is a node for alignment name, I’d rather select the alignment than type its name.

Thank you all

---

<div class="post-metadata">

### Author: ![jcoon](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jcoon](https://forum.dynamobim.com/u/jcoon)
#### Post date: [August 23, 2024, 11:55am UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/6 "2024-08-23T11:55:28Z")

</div>

Thanks Joe,

When I use the alignment dropdown it works, I did notice the civilobject.name changed from it looks like a list to string, even when the output of the civilobject.name says it’s a string. that must be why it didn’t work.

![GET alignment name 3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/3/a3834710c2f04a4fe58d9c62fc110e6f6fcd059a.jpeg)

 ![GET alignment name 4](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/0/b0923ca7fa3659b099a32c00b8410a46374f8beb.jpeg)

---

<div class="post-metadata">

### Author: ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)
#### Post date: [August 23, 2024, 12:17pm UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/7 "2024-08-23T12:17:09Z")

</div>

As @Mark.Ackerley mentioned, it’s likely the list structure. All the ways that have worked have been with a single item. The original failed state was when you used `Select Objects` (plural). This was returning a list of strings instead of a single string.

You probably just need to use list levels or a method for a single object selection if you’re only ever using a single object at a time.

---

<div class="post-metadata">

### Author: ![jcoon](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jcoon](https://forum.dynamobim.com/u/jcoon)
#### Post date: [August 23, 2024, 5:10pm UTC](https://forum.dynamobim.com/t/select-alignment-string-vs-code/103758/8 "2024-08-23T17:10:20Z")

</div>

Nick,

Thanks, I didn’t notice that, I thought if I only selected one item to would pass that string, I see what your saying now.  
Thank you
