idslk
Alibre Super User
Edit: Update to V03:
# V03 does no longer create copies of points, instead it changes their coordinate values
# the ee-parameter get the name of the point and an extension for the axis
# table cells now can also contain formulas
Hello colleagues,
if you have a table like that:

and you want to get the coordinates to be reference points in your design,
you can use the appended script (Table_to_3DPoints_forum_V01.py)
If you start the script in a fresh design (no matter of assembly or part),
you will be promted to select a spreadsheet file in xlsx format.

A demo data file is appended to this post (coordinate_table.xlsx as a zip file because xlsx is not in upload selection...)
If you cancel the loading process, you will be informed in the console:

If you proceed with a valid solution, you will get the following in formation in the console:

and the results in the design

and explorer window

If you start the script a second time with the same spreadsheet file
or with a spreadsheet file which contains points with same names,
the script will add the information "-copy" to the "new" point name.
You will get regarding informations in the console:

and explorer window

of course the new points will also be created in the design.
The format of the spreadsheet table has to be the same as in the demo data!
Ofcourse you can add more points with different names.
The names should contain only valid characters for alibre!
The units of the x,y,z coordinates should match your design units!
"And as ever": Use at your own risk!
Regards
Stefan
# V03 does no longer create copies of points, instead it changes their coordinate values
# the ee-parameter get the name of the point and an extension for the axis
# table cells now can also contain formulas
Hello colleagues,
if you have a table like that:

and you want to get the coordinates to be reference points in your design,
you can use the appended script (Table_to_3DPoints_forum_V01.py)
If you start the script in a fresh design (no matter of assembly or part),
you will be promted to select a spreadsheet file in xlsx format.

A demo data file is appended to this post (coordinate_table.xlsx as a zip file because xlsx is not in upload selection...)
If you cancel the loading process, you will be informed in the console:

If you proceed with a valid solution, you will get the following in formation in the console:

and the results in the design

and explorer window

If you start the script a second time with the same spreadsheet file
or with a spreadsheet file which contains points with same names,
the script will add the information "-copy" to the "new" point name.
You will get regarding informations in the console:

and explorer window

of course the new points will also be created in the design.
The format of the spreadsheet table has to be the same as in the demo data!
Ofcourse you can add more points with different names.
The names should contain only valid characters for alibre!
The units of the x,y,z coordinates should match your design units!
"And as ever": Use at your own risk!
Regards
Stefan
Attachments
Last edited: