Feed

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

Tutorial by Amin Kashef
Small

Follow The Procedure Below

  1. Step 1:

    first you should check the format of the text file
    only x y z separated by space no headings, comas or ...

  2. Step 2:

    open a new part
    tool--> macro --> new
    choose a name for it!

  3. Step 3:

    then you will go to the programming window (usually visual basic )!
    type the program below (or you can download .swp that i upload)

  4. Step 4:

    pay attention
    note1 : check the directory (location) of the file
    note2: it inserted the point in meters!

  5. Step 5:

    save the macro and go to the solidworks part window

  6. Step 6:

    tool-->macro-->run

  7. Step 7:

    select the macro you wrote

  8. Step 8:

    the points will be imported as below in 3Dsketch

  9. Step 9:

    now you can do what you want with the point!

    i wanted to make surfaces that cross the points!

Comments

Please log in to add comments
  • Missing feed
    M G

    Whenever I run the macro, I get the error "91 : Object variable or With block variable not set". Can you please help me with that?

    April 18th, 2017 14:08
  • Missing feed
    Miklos Zsolnay

    Great stuff. Worked very well at the beginning. But suddenly I get 'runtime error 52', can anyone help on this ?

    March 29th, 2017 06:30