XYZ Point Coordinate List


#1

Hello Everybody!

I started using Dynamo only a couple of weeks ago, so I apologize if I make or say something terribly wrong.
I would need your wise advice about getting XYZ coordinates from elements in the Revit model. In the list I want to export in Excel, I cannot split the X, Y, Z values in different cells. What I can get from Dynamo is “Point(x = 58.184, y=64.759, z=1.35)” all in the same cell. The result I am trying to obtain is having the X,Y,Z values all in different cells of the same row. So the final result should be: “Mark value” - “ElementID” - “X” - “Y” - “Z”. Is it too complicated?

Thank you in advance!

Enrico

XYZ_Point_List


Viewing Images from the old Forum
#2

Maybe something like this?

1


#3

or that :wink:excel


#4

Thank you Jostein and Peter!! You guys are amazing!!
Honestly, Peter, the solution you gave me is a bit too complicated for me. But I really appreciated it!
Can you suggest a source where I might find some study materials for a beginner like me? I would like to study the basic language for codes. What is the difference between blue and brown words and numbers in your code blocks? Are the blue ones variables? And are the brown ones strings?
Thank you again!
Enrico


#5

Enrico, just to clarify: Peter’s solution is more “complicated” because it addresses another use case. Josteins solution shows you how to handle elements that return a single point coordinate as their location (e.g. furniture). Peter’s solution shows you how to handle line-based elements such as walls. Naturally it will be more “complicated” as it entails more data/work.

Regarding your question on learning material - have you gone through the language guide that is available in the “Learn” section on this site?


#6

Peters solution also includes headlines for each column which mine don’t, and is for line-based elements.

Like Andreas said, just go through the “Learn”-section and you’ll be all set, especially the Dynamo Language Manual. For learning the different nodes you can search for it on the forum and for list nodes you can look through here: http://plevit1.blogspot.co.uk/2015/01/examples-for-all-list-actions-in-dynamo.html


#7

Thank you Andreas! Does a generic model family ( for example if I model a simple sphere volume) return a single point coordinate as its location?

Thank you Jostein!

I will go through the learn section and also plevit1.blogspot.co.uk. It will be definitely very helpful to me having every list actions explained in detail.


#8

Clockworks Element.Location node returns the location as line or point depending on geometry.

so a spheric generic model will most probably return a location point


#9

Thanks!


#10

This looks great for getting the coordinates of an object. I have successfully read coordinates from a Revit model. I have now modified the coordinates and would like to write them back to the object that I read them from. In my case it is a wall that I want to write the coordinated back to. What would be the best way to do this. I have written parameters to objects but not coordinates.


#11

Do you mean you want to change the location coordinates?

If that’s the case, all you need to do is Translate (move)