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 ...

Answer
 
Comments 1

12 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

 
Comments 3

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

 
Comments 4

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

 
Comments 0

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

 
Comments 1

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

 
Comments 0

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

 
Comments 0

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?

 
Comments 0

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.

 
Comments 0