everything is ok apart of this line:
'swModel.SaveAs2 PathNoExtention & Extension, 0, True, False
use this one (change parameters if needed):
swModelDocExt.SaveAs PathNoExtention & Extension, swSaveAsCurrentVersion, swSaveAsOptions_Silent, ExportData, lErrors, lWarnings
you need to pay closer attention to help page:
To export a part or assembly to 3D PDF:
- Get the IExportPdfData object using ISldWorks::GetExportFileData.
- Set IExportPdfData::ExportAs3D to true.
- Set whether to view the PDF after saving using IExportPdfData::ViewPdfAfterSaving.
- Save the part or assembly using IModelDocExtension::SaveAs.
Last point is crucial for your case.
Cheers mate, hope it helps
Ah great. Thanks!
I was trying to simplify the commands to reduce the number of reference files required and got totally tied in knots.