Tutorial-How to export points from solidworks to a excel file!


the macro below used for exporting points from sketch to excel !
Step 1:
For example we have these points in the 3Dsketch Below to export to excel
Step 2:
go to tool --> macro --> new
choose a name for macro and click saveStep 3:
In the programming window write code below ( download the .swp I attached, the whole code didn't fit in picture!)
Step 4:
Choose the sketch you want to export points from!
Step 5:
tool--> macro--> run
Step 6:
select the macro you write (or I uploaded) and click open
Step 7:
the points will be write in a excel file as below
is it necessary that all the points must be only in one sketch?
how can we export the coordinate from a single SLDPRT file but from different sketches .
where is the code file?
very helpful but i cannot find the code file attached
the macro file is here https://grabcad.com/questions/tutorial-how-to-export-points-from-solidworks-to-a-excel-file
Great macro, but my resulting excel file had all duplicated points. Anything to fix this?
good job!
Hi This is great! You might want to add that you have to select a sketch before running the macro or it writes an excel file with just the xyz labels no data.
What's the order when exporting all the points? What if I want to export points in a specific order, can this macro be modified to have order control?
If your 3D sketch points have external references, say a coincident line, the script will also export the xyz values of the referenced line's vertexes. Is there a way to keep it from doing this?
Another way to do it is to save the part as an IGES file, open up the options in the save dialog and check the option that says something like "include sketch data".
Next, change the file extension from IGS to .CSV, then open it in excel. Pretty easy so spot the rows/columns that are applicable and then delete the rest.