I am trying to open a part file using a button in a userform in VB.Net
I want Creating a SolidWorks Add-in and open file from this program
The quick and (dirty) way is to use a simple process start function. I use this method all the time for launching excel / pdf documents from a listbox. Be warned, this will launch the program with the system default for that file extension (which should be solidworks most likely).
Dim startinfo As New ProcessStartInfo
Function LaunchFile(byval FilePath as string) 'Filepath is the full filename with extension, ex: c:\temp\tube.sldprt
startinfo.FileName = FilePath
startinfo.Arguments = False
'To launch the file:
sub ButtonPressed(byval sender as system.object, byval e as system.eventargs) handles button1.click
EDIT: Once you've created the program and compiled it, you then point to the .DLL of your program with the macro editor in solidworks. If you want to implement this across a broader board, i am unsure how the add-in manager works through the PDM administrator as I am just a lowly design engineer and doesnt have access to the vault
Retrieving data ...