Tutorial-How to import points to solidworks from a text file !

In this tutorial we learn how to import point to the solidworks from text files for further operations. the point may be obtain from the mathematics formulas or CMM devices or data base of coordinate for airfoils or ...

13 Answers

If you just want to make spline with the points, you can do it without macro!
follow the procedure below:

Answered with a tutorial: https://grabcad.com/tutorials/tutorial-how-to-import-points-to-solidworks-from-a-text-file

As you want to export airfoil coordinates to the SolidWorks hence the coordinate database for airfoils usually come in 2D (in two column only has X & Y) and it's a tedious job to put 0 into the third column, Little changes to above procedure is needed (you can do it using matlab software or excel but I prefer this)

a database for airfoils coordinate comes below:
http://www.ae.illinois.edu/m-selig/ads/coord_database.html#N

Answered with a tutorial: https://grabcad.com/tutorials/tutorial-how-to-import-points-to-solidworks-from-a-text-file--1

Hello. In the SWP file is missing some variable declarations:
Dim Part As Object
Dim X As Double
Dim Y As Double
Dim Z As Double
Thanks

Added a dialog to select the file, supports 2 or 3 coordinates automatically, discards not numbers strings, converts decimal mark.
This also fixes a bad behavior of CreatePoint: some points were added with the previous point Y.

How to use it:
- download the swp file
- create a new part
- Tools > Macro > Run..
- select the swp file
- now a new dialog appears, look a the title, it is called "Open points file to import"
- select your point file
- choose if you want to replace the decimal separator (comma to point or point to comma)
- choose if you want the value divided by 1000

hello
very good
thanks

Very useful. Thanks a lot.

Great tutorial! I wish I only wish I had found it sooner.

Thank you for the tutorial!
However, could you explain how you created a surface with those points (step 9)?
Thanks in advance

I've used the Macro on several occasions, however for some reason I'm getting a compiling error on the Set Part line. Can you give me some direction?

Thankyou Amin!
Worked perfectly!

I was wondering if it would be possible to connect the points in order they are imported? to draw a line through all the coordinates, I've started doing it by hand but Im hoping there is a simpler way.

Thank you Amin

This topic is maybe outdated, but I used it today and found it meaningful. But if somebody can help. I need to define the type of import for each point. For example, for first coordinate XYZ i need to import a cercle 2mm diameter. For the second point, a cercle 3mm diameter... is that possible please?