|
DigiPara Liftdesigner LDX API
|
API method: ILDXApplication5.InvokeServerCommand
' from Samples/Src/LDXAPIExamples/Example_LDXApplication.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXApp, APIHelpModes.InputParaTempWithDefaultFileName, APIHelpModes.InputParaDesktopWithOtherFileName, "LD API Example"}, "", "LDXApplication~InvokeServerCommand", "Export or close .ld3 file")>
Public Shared Sub InvokeServerCommand(ldxApplication As DigiPara.LDX.LDXApplication, sourceFilePath As String, targetFilePath As String)
If MsgBox("Do you want to export the drawing as .pdf to desktop? If not the drawing will be closed.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
' Export as PDF
ldxApplication.InvokeServerCommand(0, 0, String.Format("CreateFile=6+{0}.pdf++0+1", targetFilePath), sourceFilePath)
Else
' Close
ldxApplication.InvokeServerCommand(0, 0, "Close", sourceFilePath)
End If
End Sub