Welcome
Expand Getting StartedGetting Started
Expand SOLIDWORKS API HelpSOLIDWORKS API Help
Collapse SOLIDWORKS Electrical API HelpSOLIDWORKS Electrical API Help
Expand Getting StartedGetting Started
Expand Add a Custom CommandAdd a Custom Command
Expand Add an Add-inAdd an Add-in
Expand Release NotesRelease Notes
Expand SampleSample
Collapse ClassesClasses
Expand Class ListClass List
Class Index
Collapse Class HierarchyClass Hierarchy
Collapse IDispatchIDispatch
IEwAPIX
IEwAddIn
IEwAddinInternalX
IEwApplicationSettingsX
IEwApplicationX
IEwArchiveEnvironmentX
IEwCableCoreX
IEwCableReferenceManagerX
IEwCaptionBarControlX
IEwCaptionBarX
IEwClassificationManagerX
IEwCommandContextX
IEwCommandManagerX
IEwCommandX
IEwDialogAlignPartsParametersSelectorX
IEwDialogLocationSelectorX
IEwDialogMacroSelectorX
IEwDialogManufacturerPartOrderingX
IEwDialogManufacturerPartSelectorX
IEwDialogProgressX
IEwDialogProjectManagerX
IEwDialogResumeX
IEwDialogSummaryX
IEwDialogTaskX
IEwDockingPaneManagerX
IEwDockingPaneX
IEwDocumentManagerX
IEwDocumentX
IEwEnvironmentX
IEwLibraryManagerX
IEwLockStringX
IEwManagerDialogX
IEwManufacturerPartCircuitX
IEwManufacturerPartManagerX
IEwManufacturerPartTerminalX
IEwMenuItemX
IEwMenuManagerX
IEwMenuX
IEwNotificationDialogX
Expand IEwObjectDispatchXIEwObjectDispatchX
IEwPointX
IEwProjectAutomaticArrowsX
IEwProjectBookManagerX
IEwProjectCableManagerX
IEwProjectComponentManagerX
IEwProjectEntity3DManagerX
IEwProjectExcelAutomationX
IEwProjectExportDWGFilesX
IEwProjectExportPDFX
IEwProjectExportPDMX
IEwProjectExportReportX
IEwProjectFileConfigurationManagerX
IEwProjectFileConfigurationX
IEwProjectFileManagerX
IEwProjectFolderManagerX
IEwProjectFunctionManagerX
IEwProjectGenerateTSDrawingX
IEwProjectHarnessManagerX
IEwProjectInputOutputManagerX
IEwProjectLocationManagerX
IEwProjectManagerX
IEwProjectManufacturerPartCircuitX
IEwProjectManufacturerPartManagerX
IEwProjectManufacturerPartTerminalX
IEwProjectMultilingualTextFontX
IEwProjectMultilingualTextManagerX
IEwProjectNumberDocumentsX
IEwProjectNumberMarksX
IEwProjectNumberWiresX
IEwProjectOptimizeWireOrderX
IEwProjectPrintConfigManagerX
IEwProjectReportManagerX
IEwProjectSnapshotManagerX
IEwProjectSnapshotX
IEwProjectSymbolManagerX
IEwProjectUpdateReplaceDataX
IEwProjectWireManagerX
IEwProjectWireStyleManagerX
IEwProjectX
IEwResumeRowX
IEwRibbonComboBoxControlX
IEwRibbonControlX
IEwRibbonGroupX
IEwRibbonQuickAccessControlX
IEwRibbonTabX
IEwRibbonX
IEwRightsManagerX
IEwSaveDWGImageX
IEwSelectorDialogX
IEwSymbolCircuitX
IEwSymbolFiltersX
IEwSymbolManagerX
IEwSymbolPointX
IEwTerminalTypeManagerX
IEwTitleBlockManagerX
IEwWireTerminationTypeManagerX
IEwXLSBookX
IEwXLSSheetX
Expand IInteropFactoryXIInteropFactoryX
Expand Class MembersClass Members
Expand SOLIDWORKS PDM Professional API HelpSOLIDWORKS PDM Professional API Help
Expand PDM Pro API Web ServicePDM Pro API Web Service
Expand FeatureWorks API HelpFeatureWorks API Help
Expand SOLIDWORKS Costing API HelpSOLIDWORKS Costing API Help
Expand SOLIDWORKS Document Manager API HelpSOLIDWORKS Document Manager API Help
Expand SOLIDWORKS Inspection API HelpSOLIDWORKS Inspection API Help
Expand SOLIDWORKS Routing API HelpSOLIDWORKS Routing API Help
Expand SOLIDWORKS Simulation API HelpSOLIDWORKS Simulation API Help
Expand SOLIDWORKS Sustainability API HelpSOLIDWORKS Sustainability API Help
Expand SOLIDWORKS Toolbox API HelpSOLIDWORKS Toolbox API Help
Expand SOLIDWORKS Utilities API HelpSOLIDWORKS Utilities API Help
Expand eDrawings API HelpeDrawings API Help
Expand DraftSight API HelpDraftSight API Help
Expand Lisp Programming BasicsLisp Programming Basics
Expand Lisp Functions OverviewLisp Functions Overview
Expand Lisp Functions ReferenceLisp Functions Reference
Expand Visual Lisp Compatible FunctionsVisual Lisp Compatible Functions
Hide Table of Contents
SOLIDWORKS Electrical API 2024.0.0
Electrical API
IEwProjectExportPDFX Interface Reference

Use this interface to export file in PDF inside a project. More...

Inheritance diagram for IEwProjectExportPDFX:
Inheritance graph

Public Member Functions

EwPDFPaperFormat getPaperFormat (EwErrorCode *errorCode)
 Get the enum EwPDFPaperFormat paper format of the PDF export files. More...
 
EwErrorCode setPaperFormat (EwPDFPaperFormat ePDFPaperFormat)
 Update the paper format with a new name. More...
 
BSTR getExportToPDFFileName (EwErrorCode *errorCode)
 Get the export to PDF file path. More...
 
EwErrorCode setExportToPDFFileName (BSTR strExportToPDFFilePath)
 Set the export to PDF file path. More...
 
VARIANT_BOOL getExportToPDFBookmarkAndHyperlink (EwErrorCode *errorCode)
 Return true to export PDF bookmark and hyperlink. More...
 
EwErrorCode setExportToPDFBookmarkAndHyperlink (VARIANT_BOOL bExportToPDFBookmarkAndHyperlink)
 Update with true to export PDF bookmark and hyperlink. More...
 
VARIANT_BOOL getExportOnePDFFileByBook (EwErrorCode *errorCode)
 Return true to export one PDF file by book. More...
 
EwErrorCode setExportOnePDFFileByBook (VARIANT_BOOL bExportOnePDFFileByBook)
 Update with true to export one PDF file by book. More...
 
EwPageOrientation getEwPageOrientation (EwErrorCode *errorCode)
 Return the page orientation to the PDF file export. More...
 
EwErrorCode setEwPageOrientation (EwPageOrientation ewPageOrientation)
 Update the page orientation. More...
 
VARIANT_BOOL getPlotWithSymmetry (EwErrorCode *errorCode)
 Return true to export PDF file with symmetry, false for standard export. More...
 
EwErrorCode setPlotWithSymmetry (VARIANT_BOOL bPlotWithSymmetry)
 Update the export PDF file with symmetry. More...
 
EwStandardScaleType getStandardScaleType (EwErrorCode *errorCode)
 Get the scale type EwStandardScaleType enumeration value for export PDF file. More...
 
EwErrorCode setStandardScaleType (EwStandardScaleType eEwStandardScaleType)
 Update the Scale Type with an EwStandardScaleType enumeration value. More...
 
double getPaperScaleUnit (EwErrorCode *errorCode)
 Get the paper scale unit for the scale type, or a custom paper scale type. More...
 
EwErrorCode setPaperScaleUnit (double dPaperScaleUnit)
 Update the paper scale unit for custom paper scale type. More...
 
double getDrawingScaleUnit (EwErrorCode *errorCode)
 Get the drawing scale unit for the the scale type, or a custom drawing scale type. More...
 
EwErrorCode setDrawingScaleUnit (double dDrawingScaleUnit)
 Update the drawing scale unit for custom drawing scale type. More...
 
VARIANT_BOOL getAllProjectFiles (EwErrorCode *errorCode)
 Return true to export all project files. More...
 
EwErrorCode setAllProjectFiles (VARIANT_BOOL bAllProjectFiles)
 Update with true to export all project files. More...
 
VARIANT getSelectionFiles (EwErrorCode *errorCode)
 Return the files to export in an array This parameter is used if "all project files" option is set to false. More...
 
EwErrorCode setSelectionFiles (VARIANT aFolioArray)
 Set the files to export with the files ID specify in the input array. More...
 
VARIANT_BOOL getGenerateAutomatedDrawings (EwErrorCode *errorCode)
 Return the option to update all generated files like Terminal strips or Reports which have been added to the project. More...
 
EwErrorCode setGenerateAutomatedDrawings (VARIANT_BOOL bGenerateAutomatedDrawings)
 Option to update all generated files like Terminal strips or Reports which have been added to the project. More...
 
EwErrorCode exportPDF ()
 Export PDF files inside this project. More...
 
VARIANT_BOOL getIncludeDataFile (EwErrorCode *errorCode)
 Return true to include data files. More...
 
EwErrorCode setIncludeDataFile (VARIANT_BOOL bIncludeDataFile)
 Option used to include data files. More...
 
VARIANT_BOOL getUseTrueTypeFontAsGeometry (EwErrorCode *errorCode)
 Return true to export TTF text as geometry. More...
 
EwErrorCode setUseTrueTypeFontAsGeometry (VARIANT_BOOL bExportPdfTTFAsGeometry)
 Option used to export TTF text as geometry. More...
 
VARIANT_BOOL getUseSHXFontAsGeometry (EwErrorCode *errorCode)
 Return true to export SHX text as geometry. More...
 
EwErrorCode setUseSHXFontAsGeometry (VARIANT_BOOL bExportPdfSHXAsGeometry)
 Option used to export SHX text as geometry. More...
 
EwPlotArea getEwPlotArea (EwErrorCode *errorCode)
 Get the plot area. More...
 
EwErrorCode setEwPlotArea (EwPlotArea ePlotArea)
 Set the plot area in print configuration. More...
 
VARIANT_BOOL getUsingStyleSheet (EwErrorCode *errorCode)
 Return true to use style sheet. More...
 
EwErrorCode setUsingStyleSheet (VARIANT_BOOL bUsingStyleSheet)
 Update with true to use style sheet. More...
 
BSTR getStyleSheetName (EwErrorCode *errorCode)
 Get the style sheet name of the export. More...
 
EwErrorCode setStyleSheetName (BSTR strStyleSheetName)
 Update the style sheet name with a new name. More...
 
VARIANT_BOOL getUseCustomBitmapResolution (EwErrorCode *errorCode)
 Indicate if custom bitmap resolution is use in PDF to export. More...
 
EwErrorCode setUseCustomBitmapResolution (VARIANT_BOOL bCustomBitmapResolution)
 Set to true to use custom bitmap resolution in PDF to export. More...
 
long getCustomBitmapResolution (EwErrorCode *errorCode)
 Get the bitmap resolution in the pdf exported. More...
 
EwErrorCode setCustomBitmapResolution (long lBitmapResolution)
 Set the bitmap resolution in the pdf exported. More...
 
EwErrorCode initializeFromPrintProjectConfiguration ()
 Initialize the export PDF from the print project configuration "\<PDF\>". More...
 

Detailed Description

Use this interface to export file in PDF inside a project.

Since
2021 SP0

Member Function Documentation

◆ exportPDF()

EwErrorCode IEwProjectExportPDFX::exportPDF ( )

Export PDF files inside this project.

Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if export PDF file object are not correctly filledS
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ getAllProjectFiles()

VARIANT_BOOL IEwProjectExportPDFX::getAllProjectFiles ( EwErrorCode errorCode)

Return true to export all project files.

True by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
true to export all project files.

◆ getCustomBitmapResolution()

long IEwProjectExportPDFX::getCustomBitmapResolution ( EwErrorCode errorCode)

Get the bitmap resolution in the pdf exported.

By default 600 DPI.

Since
2023 SP0
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
  • EW_NO_ERROR if no error detected
Returns
the bitmap resolution.

◆ getDrawingScaleUnit()

double IEwProjectExportPDFX::getDrawingScaleUnit ( EwErrorCode errorCode)

Get the drawing scale unit for the the scale type, or a custom drawing scale type.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
the drawing scale unit.

◆ getEwPageOrientation()

EwPageOrientation IEwProjectExportPDFX::getEwPageOrientation ( EwErrorCode errorCode)

Return the page orientation to the PDF file export.

LANDSCAPE is the default enum value.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the paper orientation is not found
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
EwExportPageOrientation enum type, can be:
  • LANDSCAPE for landscape orientation
  • PORTRAIT for portrait orientation

◆ getEwPlotArea()

EwPlotArea IEwProjectExportPDFX::getEwPlotArea ( EwErrorCode errorCode)

Get the plot area.

Default value is kPlotAreaExtent.

Since
2022 SP0
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected.
  • EW_UNDEFINED_ERROR if another error occurred.
  • EW_INVALID_OBJECT if object is not initialized.
Returns
an enumeration of EwPlotArea type.

◆ getExportOnePDFFileByBook()

VARIANT_BOOL IEwProjectExportPDFX::getExportOnePDFFileByBook ( EwErrorCode errorCode)

Return true to export one PDF file by book.

False by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true to export one PDF file by book.
  • EW_INVALID_OBJECT if object is not initialized

◆ getExportToPDFBookmarkAndHyperlink()

VARIANT_BOOL IEwProjectExportPDFX::getExportToPDFBookmarkAndHyperlink ( EwErrorCode errorCode)

Return true to export PDF bookmark and hyperlink.

True by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
true to export PDF bookmark and hyperlink.

◆ getExportToPDFFileName()

BSTR IEwProjectExportPDFX::getExportToPDFFileName ( EwErrorCode errorCode)

Get the export to PDF file path.

Example: "C:\ExportToPDF\MyProject.pdf"

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
the export to PDF file name.

◆ getGenerateAutomatedDrawings()

VARIANT_BOOL IEwProjectExportPDFX::getGenerateAutomatedDrawings ( EwErrorCode errorCode)

Return the option to update all generated files like Terminal strips or Reports which have been added to the project.

Default value is true.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
Returns true by default, false otherwise.

◆ getIncludeDataFile()

VARIANT_BOOL IEwProjectExportPDFX::getIncludeDataFile ( EwErrorCode errorCode)

Return true to include data files.

Only PDF files and shortcut to PDF files implemented. False by default.

Since
2022 SP0
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object owner is not correctly intialize
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true to include data files.

◆ getPaperFormat()

EwPDFPaperFormat IEwProjectExportPDFX::getPaperFormat ( EwErrorCode errorCode)

Get the enum EwPDFPaperFormat paper format of the PDF export files.

"ISO A4 (210.00 x 297.00 MM)" by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the paper format is not found
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
the enum EwPDFPaperFormatpaper format of the PDF export files.

◆ getPaperScaleUnit()

double IEwProjectExportPDFX::getPaperScaleUnit ( EwErrorCode errorCode)

Get the paper scale unit for the scale type, or a custom paper scale type.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
the paper scale unit.

◆ getPlotWithSymmetry()

VARIANT_BOOL IEwProjectExportPDFX::getPlotWithSymmetry ( EwErrorCode errorCode)

Return true to export PDF file with symmetry, false for standard export.

False by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
export PDF file with symmetry, false for standard export.

◆ getSelectionFiles()

VARIANT IEwProjectExportPDFX::getSelectionFiles ( EwErrorCode errorCode)

Return the files to export in an array This parameter is used if "all project files" option is set to false.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if "all project files" option is set to true
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ getStandardScaleType()

EwStandardScaleType IEwProjectExportPDFX::getStandardScaleType ( EwErrorCode errorCode)

Get the scale type EwStandardScaleType enumeration value for export PDF file.

kScaleTypeScaleToFit by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if project object has not been initialized
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
The scale type EwStandardScaleType enumeration value for export PDF file.

◆ getStyleSheetName()

BSTR IEwProjectExportPDFX::getStyleSheetName ( EwErrorCode errorCode)

Get the style sheet name of the export.

Since
2022 SP2
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
the paper format of the export.

◆ getUseCustomBitmapResolution()

VARIANT_BOOL IEwProjectExportPDFX::getUseCustomBitmapResolution ( EwErrorCode errorCode)

Indicate if custom bitmap resolution is use in PDF to export.

Default value false.

Since
2023 SP0
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
  • EW_NO_ERROR if no error detected
Returns
true If custom bitmap resolution is use.

◆ getUseSHXFontAsGeometry()

VARIANT_BOOL IEwProjectExportPDFX::getUseSHXFontAsGeometry ( EwErrorCode errorCode)

Return true to export SHX text as geometry.

False by default.

Since
2022 SP0
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object owner is not correctly intialize
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true export SHX text as geometry.

◆ getUseTrueTypeFontAsGeometry()

VARIANT_BOOL IEwProjectExportPDFX::getUseTrueTypeFontAsGeometry ( EwErrorCode errorCode)

Return true to export TTF text as geometry.


False by default.

Since
2022 SP0
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object owner is not correctly intialize
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true export TTF text as geometry.

◆ getUsingStyleSheet()

VARIANT_BOOL IEwProjectExportPDFX::getUsingStyleSheet ( EwErrorCode errorCode)

Return true to use style sheet.

Since
2022 SP2
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
Returns
true to use style sheet

◆ initializeFromPrintProjectConfiguration()

EwErrorCode IEwProjectExportPDFX::initializeFromPrintProjectConfiguration ( )

Initialize the export PDF from the print project configuration "\<PDF\>".

Since
2022 SP4
Returns
EwErrorCode enum type, can be:
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
  • EW_OBJECT_NOT_FOUND if the "\<PDF\>" printer is not presont on the current computer.
  • EW_NO_ERROR if no error detected

◆ setAllProjectFiles()

EwErrorCode IEwProjectExportPDFX::setAllProjectFiles ( VARIANT_BOOL  bAllProjectFiles)

Update with true to export all project files.

True by default.

Parameters
[in]bAllProjectFilestrue for export all project files.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setCustomBitmapResolution()

EwErrorCode IEwProjectExportPDFX::setCustomBitmapResolution ( long  lBitmapResolution)

Set the bitmap resolution in the pdf exported.

By default 600 DPI.

Since
2023 SP0
Parameters
[in]lBitmapResolutionnew bitmap resolution
Returns
EwErrorCode enum type, can be:
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
  • EW_NO_ERROR if no error detected

◆ setDrawingScaleUnit()

EwErrorCode IEwProjectExportPDFX::setDrawingScaleUnit ( double  dDrawingScaleUnit)

Update the drawing scale unit for custom drawing scale type.

Parameters
[in]dDrawingScaleUnitthe drawing scale unit.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the scale type is kScaleTypeScaleToFit or dDrawingScaleUnit is under 0
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setEwPageOrientation()

EwErrorCode IEwProjectExportPDFX::setEwPageOrientation ( EwPageOrientation  ewPageOrientation)

Update the page orientation.


LANDSCAPE is the default enum value.

Parameters
[in]ewPageOrientationEwExportPageOrientation enum type, can be:
  • LANDSCAPE for landscape orientation
  • PORTRAIT for portrait orientation
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the paper orientation is not found
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setEwPlotArea()

EwErrorCode IEwProjectExportPDFX::setEwPlotArea ( EwPlotArea  ePlotArea)

Set the plot area in print configuration.

Default value is kPlotAreaExtent.

Since
2022 SP0
Parameters
[in]ePlotAreaenumeration of EwPlotArea type.
Returns
errorCode EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected.
  • EW_UNDEFINED_ERROR if another error occurred.
  • EW_INVALID_OBJECT if object is not initialized.
  • EW_BAD_INPUTS if ePlotArea is not allowed.

◆ setExportOnePDFFileByBook()

EwErrorCode IEwProjectExportPDFX::setExportOnePDFFileByBook ( VARIANT_BOOL  bExportOnePDFFileByBook)

Update with true to export one PDF file by book.

False by default.

Parameters
[in]bExportOnePDFFileByBooktrue for export one PDF file by book.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setExportToPDFBookmarkAndHyperlink()

EwErrorCode IEwProjectExportPDFX::setExportToPDFBookmarkAndHyperlink ( VARIANT_BOOL  bExportToPDFBookmarkAndHyperlink)

Update with true to export PDF bookmark and hyperlink.

True by default.

Parameters
[in]bExportToPDFBookmarkAndHyperlinktrue for export to PDF bookmark and hyperlink.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setExportToPDFFileName()

EwErrorCode IEwProjectExportPDFX::setExportToPDFFileName ( BSTR  strExportToPDFFilePath)

Set the export to PDF file path.

Example: "C:\ExportToPDF\MyProject.pdf"

Parameters
[in]strExportToPDFFilePaththe path and the name of the output PDF.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_FOLDER_NOT_FOUND if the export to PDF file path is not found
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setGenerateAutomatedDrawings()

EwErrorCode IEwProjectExportPDFX::setGenerateAutomatedDrawings ( VARIANT_BOOL  bGenerateAutomatedDrawings)

Option to update all generated files like Terminal strips or Reports which have been added to the project.

Default value is true.

Parameters
[in]bGenerateAutomatedDrawingscan be true or false. True for update all generated files.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setIncludeDataFile()

EwErrorCode IEwProjectExportPDFX::setIncludeDataFile ( VARIANT_BOOL  bIncludeDataFile)

Option used to include data files.

Only PDF files and shortcut to PDF files implemented. False by default.

Since
2022 SP0
Parameters
[in]bIncludeDataFiletrue to include data files.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object owner is not correctly intialize
  • EW_UNDEFINED_ERROR if another error occurred

◆ setPaperFormat()

EwErrorCode IEwProjectExportPDFX::setPaperFormat ( EwPDFPaperFormat  ePDFPaperFormat)

Update the paper format with a new name.

kPDF_ISO_A4_210_x_297_MM by default.

Parameters
[in]ePDFPaperFormatenum of EwPDFPaperFormat that describe the new paper format.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the paper format is not found
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setPaperScaleUnit()

EwErrorCode IEwProjectExportPDFX::setPaperScaleUnit ( double  dPaperScaleUnit)

Update the paper scale unit for custom paper scale type.

Parameters
[in]dPaperScaleUnitpaper scale unit.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the scale type is kScaleTypeScaleToFit or dPaperScaleUnit is under 0
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setPlotWithSymmetry()

EwErrorCode IEwProjectExportPDFX::setPlotWithSymmetry ( VARIANT_BOOL  bPlotWithSymmetry)

Update the export PDF file with symmetry.

False by default;

Parameters
[in]bPlotWithSymmetrytrue for v with symmetry false for standard export
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setSelectionFiles()

EwErrorCode IEwProjectExportPDFX::setSelectionFiles ( VARIANT  aFolioArray)

Set the files to export with the files ID specify in the input array.

This parameter is used if "all project files" option is set to false. This function remove the previous selected files and fill the selection file with the input array.

Parameters
[in]aFolioArrayan array of id files.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if "all project files" option is set to true or the aFolioArray array is not a long array
  • EW_BAD_INPUTS if aFolioArray array size = 0
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setStandardScaleType()

EwErrorCode IEwProjectExportPDFX::setStandardScaleType ( EwStandardScaleType  eEwStandardScaleType)

Update the Scale Type with an EwStandardScaleType enumeration value.

kScaleTypeScaleToFit by default.

Parameters
[in]eEwStandardScaleTypethe new EwStandardScaleType enumeration value.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if project object has not been initialized
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setStyleSheetName()

EwErrorCode IEwProjectExportPDFX::setStyleSheetName ( BSTR  strStyleSheetName)

Update the style sheet name with a new name.

Since
2022 SP2
Parameters
[in]strStyleSheetNamethe new name for style sheet.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the style sheet name is not found
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized

◆ setUseCustomBitmapResolution()

EwErrorCode IEwProjectExportPDFX::setUseCustomBitmapResolution ( VARIANT_BOOL  bCustomBitmapResolution)

Set to true to use custom bitmap resolution in PDF to export.

Since
2023 SP0
Parameters
[in]bCustomBitmapResolutiontrue for use Custom bitmap resolution
Returns
EwErrorCode enum type, can be:
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized
  • EW_NO_ERROR if no error detected

◆ setUseSHXFontAsGeometry()

EwErrorCode IEwProjectExportPDFX::setUseSHXFontAsGeometry ( VARIANT_BOOL  bExportPdfSHXAsGeometry)

Option used to export SHX text as geometry.

False by default.

Since
2022 SP0
Parameters
[in]bExportPdfSHXAsGeometrytrue to export SHX text as geometry.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object owner is not correctly intialize
  • EW_UNDEFINED_ERROR if another error occurred

◆ setUseTrueTypeFontAsGeometry()

EwErrorCode IEwProjectExportPDFX::setUseTrueTypeFontAsGeometry ( VARIANT_BOOL  bExportPdfTTFAsGeometry)

Option used to export TTF text as geometry.


False by default.

Since
2022 SP0
Parameters
[in]bExportPdfTTFAsGeometrytrue to export TTF text as geometry.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object owner is not correctly intialize
  • EW_UNDEFINED_ERROR if another error occurred

◆ setUsingStyleSheet()

EwErrorCode IEwProjectExportPDFX::setUsingStyleSheet ( VARIANT_BOOL  bUsingStyleSheet)

Update with true to use style sheet.

Since
2022 SP2
Parameters
[in]bUsingStyleSheettrue for use style sheet
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_INVALID_OBJECT if object is not initialized


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   SOLIDWORKS Electrical API: IEwProjectExportPDFX Interface Reference
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:




x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2024 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.