Welcome
Expand Getting StartedGetting Started
Expand SOLIDWORKS API HelpSOLIDWORKS API Help
Collapse SOLIDWORKS Electrical API HelpSOLIDWORKS Electrical API Help
Expand Getting StartedGetting Started
Expand Release NotesRelease Notes
Collapse ClassesClasses
Expand Class ListClass List
Class Index
Collapse Class HierarchyClass Hierarchy
_DIEwProjectXEvents
Collapse IDispatchIDispatch
IEwAddIn
IEwAPIX
IEwApplicationReactorX
IEwApplicationSettingsX
IEwApplicationX
IEwArchiveEnvironmentX
IEwCableCoreX
IEwCableReferenceManagerX
IEwCableReferenceX
IEwCommandContextX
IEwCommandManagerX
IEwCommandX
IEwDialogAlignPartsParametersSelectorX
IEwDialogLocationSelectorX
IEwDialogMacroSelectorX
IEwDialogManufacturerPartOrderingX
IEwDialogManufacturerPartSelectorX
IEwDialogProgressX
IEwDialogProjectManagerX
IEwDialogResumeX
IEwDialogSummaryX
IEwDialogTaskX
IEwDockingPaneManagerX
IEwDockingPaneX
IEwEnvironmentX
IEwInteropFactoryX
IEwLibraryManagerX
IEwLibraryX
IEwLockStringX
IEwManufacturerPartCircuitX
IEwManufacturerPartManagerX
IEwManufacturerPartTerminalX
IEwManufacturerPartX
Expand IEwObjectBaseXIEwObjectBaseX
IEwPointX
IEwProjectAutomaticArrowsX
IEwProjectBookManagerX
IEwProjectCableManagerX
IEwProjectComponentManagerX
IEwProjectComponentTerminalX
IEwProjectEntity3DManagerX
IEwProjectExcelAutomationX
IEwProjectExportDWGFilesX
IEwProjectExportPDFX
IEwProjectExportPDMX
IEwProjectExportReportX
IEwProjectFileManagerX
IEwProjectFolderManagerX
IEwProjectFunctionManagerX
IEwProjectGenerateTSDrawingX
IEwProjectHarnessManagerX
IEwProjectInputOutputManagerX
IEwProjectLocationManagerX
IEwProjectManagerX
IEwProjectManufacturerPartCircuitX
IEwProjectManufacturerPartManagerX
IEwProjectManufacturerPartTerminalX
IEwProjectManufacturerPartX
IEwProjectNumberDocumentsX
IEwProjectNumberMarksX
IEwProjectNumberWiresX
IEwProjectOptimizeWireOrderX
IEwProjectPrintConfigManagerX
IEwProjectReportManagerX
IEwProjectSnapshotManagerX
IEwProjectSnapshotX
IEwProjectSymbolManagerX
IEwProjectUpdateReplaceDataX
IEwProjectWireManagerX
IEwProjectX
IEwResumeRowX
IEwRibbonControlX
IEwRibbonGroupX
IEwRibbonTabX
IEwRibbonX
IEwRightsManagerX
IEwSymbolCircuitX
IEwSymbolFiltersX
IEwSymbolManagerX
IEwSymbolPointX
IEwSymbolX
IEwTitleBlockManagerX
IEwTitleBlockX
IEwXLSBookX
IEwXLSSheetX
Expand Class MembersClass Members
Expand SOLIDWORKS PDM Professional API HelpSOLIDWORKS PDM Professional API Help
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 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  2021.0.0
Electrical API
IEwProjectExportPDFX Interface Reference

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

Inheritance diagram for IEwProjectExportPDFX:

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 file inside this project. 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 file 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

◆ 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
Returns
true to export all project files.

◆ 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
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
Returns
EwExportPageOrientation enum type, can be:
  • LANDSCAPE for landscape orientation
  • PORTRAIT for portrait orientation

◆ 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.

◆ 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
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
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
Returns
Returns true by default, false otherwise.

◆ 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
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
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
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

◆ 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
Returns
The scale type EwStandardScaleType enumeration value for export PDF file.

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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


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) 2021 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.