Point coordinates to collect and store in dictionary using python

I am struggling with some task.
I need to collect with a python script some point coordinates of a object which I have set onto the object.
now my little script in python ask to select points in the rhino space and will then automatically put full point coordinates onto these points for x/y/z.

here comes my struggle…

I want to save these created world coordinates into a list / dictionary to show me following result when exporting to excel or similar program:

object A: x=…, y=…, z=…
object B:x=…, y=…, z=…

and so on.

can anybody help me out with a script on how to store the coordinates of the selected points and to export the same?

would be very thankful for any help.


Hi @kaisvenebert,

I’m not sure I totally understand what you are looking to do. But here are a couple sample scripts for you to study. Perhaps they will help.

test_set_points.py (676 Bytes)

test_export_points.py (901 Bytes)

– Dale

Hi Dale,
Thanks a lot for your reply.

What I am actually doing and trying to do is following.
I have in Rhino some Column rings in a Ceiling, which I need to place points in order to cross check and verify with the points received from Site for respective column claddings.

Now I have manually set on each column ( call them column A, B, C, …) and have them in separate layers saved.

I have a small python program to select for each column ring these points and label them with 0, 1, 2, 3, and so on.
I also can then print the world coordinates in python itself in the script editor.

But I would like to get these points including their coordinates printed as an dictionary, showing me result of:
Column A , pt0: x,y,z
Column B , pt1: x,y,z, and so on…

I can either show the labeling points in Rhino as 0, 1, 2, 3… or I can show the coordinates directly to each set point.

But I don’t get it on how to get these data into a dictionary which I could then export for each column directly to another file, i.e. into an excel file.

Maybe this is a bit better explained.

I will try to see if I can figure out something with your scripts.
Thank you very much for your feedback.

Best regards and have. great Weekend,