Create point list from xml extraction

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

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.

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.

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…

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.

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

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.

1 Like

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

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.