1 Reply Latest reply on Sep 8, 2013 7:39 PM by Artem Taturevych

    new on api worlds

    Daniel Cote

      Hi

       

      I make lot of API for Autocad in vs 2008 express.  Now I'am learnig the SOLIDWORKS API.

       

      I know how to programm with the VSTA vb.net.  But i like to use VISUAL STUDIO EXPRESS 2008 or 2010.   I see somewhere that with VSEXPRESS we can edit the code  while debugging it.

       

      My problem is I don't how to lauch Solidworks and load my DLL test it in debug mode.

       

      Someones have tutorial for that ????

       

       

      Also, in VSTA, I make a API to export  BOM ( ALREADY IN A DATAGRID )  to my MYSQL DB.  My code work in AUTOCAD but in SOLIDWORKS they work only for the first record.   At the second line, they start the SOLIDWORKSMACRO_STARTUP sub with the RUNRESULT = 4

       

       

       

       

      this the code i use

       

       

       

      ds.Tables(0).Clear()

       

       

      For i = 0 To DataGridView1.Rows.Count - 2

       

       

       

      ds.Tables(0).Rows.Add()

       

       

       

       

      Dim ITEM As String = DataGridView1.Rows(i).Cells("ITEM").Value()

       

       

      ds.Tables(0).Rows(0).Item(0) = ITEM

       

      .

      ..

      .

       

        Dim CMDBUILDER4 As New MySqlCommandBuilder(da)

         

      da.InsertCommand = CMDBUILDER4.GetInsertCommand()

      i = da.Update(ds.Tables(0))