open a file in a task from EPDM

I am trying to create a task that can be called from a workflow that would open the selected file in SolidWorks and run a macro we have to output a render file for use in an online catalog.

The attached macro TestDLH.SWP does call the macro from an open solidworks file.  However, I am unclear what the code needs to be in a task to get the file from vault an open it?

Does anyone have code that shows how to get the file and open it from vault?

Option Explicit

Sub main()

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Dim nDocType As Long

Dim nErrors As Long

Dim nWarnings As Long


Set swApp = Application.SldWorks

Dim runMacroError As Long

Dim boolstatus As Boolean

boolstatus = swApp.RunMacro2("C:\SWMacro\UDA_RENDER3.swp", "UDA_Render1", "main", swRunMacroUnloadAfterRun, runMacroError)

End Sub

SolidworksApi/macros