Run a macro during a PDM Task

Hello

I'm not so experienced with the SW / EPDM Api. I need to run a simple piece of code during a EPDM task.

We need to generate a dxf and a pdf from a .dft file (Solid Edge).

I've tried to replace the convert() function by my code with no success.

Dim objApp As SolidEdgeFramework.Application

Dim objDoc As SolidEdgeDraft.DraftDocument

Dim objSheet As SolidEdgeDraft.Sheet

Dim FilePath_VA As String

    Set objApp = CreateObject("SolidEdge.Application")

    objApp.DisplayAlerts = False

     

            FilePath_VA = "C:\\Users\\raul.SERVER\\Desktop\\ES_007162.dft"

            Set objDoc = objApp.Documents.Open(FilePath_VA)

            objApp.Visible = True

            objDoc.SaveAs ("C:\\Users\\raul.SERVER\\Desktop\\ES_007162.pdf")

            Call objDoc.Close

Call objApp.Quit

Set objApp = Nothing

Set objDoc = Nothing

Set objSheet = Nothing

I understand that the task add-in needs to open and save files from a solidworks file. Then, I was asking myself if is it possible to trigger a 'dummy' solidworks file that trigger my Solid Edge macro. If yes, what about the generated files, will them be added to vault and checked in?

Sombebody has coded something similar?

Thank you in advance.

Raúl

SolidworksApi macros