Hello forum,
We use a macro to record a MeP in dxf and pdf.
The DXF is added to the safe, the PDF is not!
We are always obliged to add it by hand to the safe.
Maybe we need to add an additional function in the macro?
or is it a configuration of the EPDM?
Attached is the registration code portion.
' Pour enregistrer la feuille en PDF
Set swModelDocExt = swModel.Extension
Set swExportPDFData = swApp.GetExportFileData(1)
swExportPDFData.ViewPdfAfterSaving = True
nFileName = swPath & "mises_en_plan\" & resolvedValOut1 & "-" & resolvedValOut2 & ".PDF"
boolstatus = swExportPDFData.SetSheets(swExportData_ExportSpecifiedSheets, swSheet.GetName)
boolstatus = swModelDocExt.SaveAs(nFileName, 0, 0, swExportPDFData, lErrors, lWarnings)
Thanks in advance
1 Like
Hello
The "SaveAs" function is a function from the Solidworks API in a "normal" Windows environment, to work in an "Epdm" environment you have to use the API for Epdm, to add a file in Epdm you have to use the "AddFile2" function, see HERE.
Of course before you have to connect to the safe, refer to the folder in which you want to add this file, etc, etc ... in short, use the Epdm APIs ...
Kind regards
1 Like
Thank you d.roger for your very clear answer, I understood the process but too complicated for me, and well we will continue to add the pdfs to the chest at the hand!
Sincerely,
Hello
Rather look at the configuration of the trunk. By default, the pdf extension is not set so that the vault systematically adds it to the vault when you don't go through the save as interface.
This is managed in the group options in the file add setting. By default it is this list: red; xcm;dwg; dxf; idv;ipn; Ipt; eprt; easm; EDRW; dst;xml;apj; SLDASM; SLDPRT; Iam; by; asm; DFT; slddrw; CWR; cfg; MDB; Markup
3 Likes
Thank you Cyril, indeed the pdf was not in the list, conclusive test!
A+
@fifounet44, here you are an EPDM expert!!!
1 Like