I am attempting to use the edrawings VBA api via excel. I have downloaded the edrawings SDK and it seems as though the api only runs through a user form. I have made a few vba macros for solidworks via excel but unlike solidworks there is very limited documentation. I simply want to make a connection to the API, after which I should be able to take it from there.
For right now I would simply like to open up a solidworks drawing in edrawings via excel. So something like the following:
Dim xlBook As Workbook Dim xlsheet As Worksheet Dim eDraw AsNew EModelViewControl Dim FilePath AsString Set xlBook = ActiveWorkbook Set xlsheet = xlBook.Sheets(1) FilePath = Range("B1").Value eDraw.OpenDoc FilePath,False,False,True,""
As an example, Range B1 is the following "C:\ _EngVault\000S\090\090-40400-01.SLDDRW". I have activated the EModelView2018 Type Library and running edrawings 2018. Again, once I can figure out how to connect to the program I should be good but I am unable to make it that far.
Also, do I need a user form for this or did I misunderstand?