0 Replies Latest reply on Jan 23, 2018 7:51 AM by Robbie Dolan

    Hi, I am new to solid works and I need to import data from a csv file to create a series of coordinate points and then join certain points up with a line. I have successfully imported the points using a macro and they are in my workspace but I can't figur

    Robbie Dolan

      This is the macro I used to import the points and I would just like to adapt this to import a second set of data that will joint certain points with a line. I think a for loop might do it but not sure.


      I would appreciate any help



      Dim swApp As Object

      Sub main()



      Set swApp = Application.SldWorks

      Set Part = swApp.ActiveDoc

      swApp.ActiveDoc.ActiveView.FrameState = 1



      Open "\\Mac\Home\Desktop\test2d.csv" For Input As #1

      Part.SketchManager.Insert3DSketch True

      Do While Not EOF(1)

      Input #1, X, Y

      Set skPoint = Part.SketchManager.CreatePoint(X, Y, 0)




      Close #1




      End Sub