# Create point list from xml extraction

**URL:** <https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672>\
**Category:** Revit\
**Created:** [April 3, 2018, 7:03pm UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672 "2018-04-03T19:03:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![smusitano](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@smusitano](https://forum.dynamobim.com/u/smusitano)\
**Post date:** [April 3, 2018, 7:03pm UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672/1 "2018-04-03T19:03:01Z")

</div>

Evening all  
Playing with Dynamo for a while , but now working on first major project… and I’m stuck.  
Scope - Reading in XML data file, extracting coordinates and ID(name) from the file then placing a family at each position with its given ID

 ![xml-coords](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/3/23998b4119097eb0cfadfb02d8ec188b7ff5a1ad.PNG)

I have managed to extract the list of coordinates from from and XML file now, I now need to turn this into a point list. Gone through lots of options cutting up the string to get the 3 individual X,Y,Z values then putting them back together to a get a single line point list, but i need to iterate this for how ever many lines their may be from the extraction…

Ideas and suggestions please.  
Cheers  
Steve

---

<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:** [April 3, 2018, 8:07pm UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672/2 "2018-04-03T20:07:48Z")

</div>

Try this:

Remove the get item at index node.  
Use a List.Transpose node after the string to number.

This should process the entire list of points.

---

<div class="post-metadata">

**Author:** ![smusitano](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@smusitano](https://forum.dynamobim.com/u/smusitano)\
**Post date:** [April 3, 2018, 8:32pm UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672/3 "2018-04-03T20:32:39Z")

</div>

Hi Jacob  
Thanks for the feedback, but that’s not achieving whats required. Unless im not implementing what you have suggested correctly.

Basically i need to produce a point list of the bracketed x,y,z values in the watch on the far left. I believe this would mean having to iterate / loop through that watch list to create the point list due to its format…

---

<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:** [April 3, 2018, 10:26pm UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672/4 "2018-04-03T22:26:35Z")

</div>

Dynamo will handle the lists correctly so long as they are ordered correctly, and based on what I’m seeing they should be, but I’m unable to implement until tomorrow sometime at the earliest.

Post an image export (camera button on the top right after zoom in to a point where things are legible) of what you tried, including previews along the way, and I’ll do my best to find the issue tomorrow.

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [April 4, 2018, 6:54am UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672/5 "2018-04-04T06:54:07Z")

</div>

I think what @jacob.small is suggesting here is this:

 ![pointlist](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/571c0c059975385492dae05952f94ad8cd62879c.png)  
By transposing the list of points, you get 3 sublists, one for X, Y, and Z. You have to separate them with something like my codeblock to feed it into the point node though.

Edit: Also found out that the String.TrimLeadingWhitespace is unneeded as ToNumber will ignore whitespace.

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [April 4, 2018, 9:13am UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672/6 "2018-04-04T09:13:15Z")

</div>

The same could be achieved using list levels avoiding the need to transpose.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/3/5351a01fe8df2f62bff1974f8431d002fbf3548c.png)

---

<div class="post-metadata">

**Author:** ![smusitano](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@smusitano](https://forum.dynamobim.com/u/smusitano)\
**Post date:** [April 4, 2018, 5:16pm UTC](https://forum.dynamobim.com/t/create-point-list-from-xml-extraction/20672/7 "2018-04-04T17:16:56Z")

</div>

Kenny & Jonathan  
Many many thanks, both solutions work perfectly. Now just got to get my head round the coordinate systems to place the family at the correct point locations relative the the models!!!

Again much appreciated, for the rapid response.

Regards  
Steve
