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
IEwProjectExportReportX Interface Reference

Use this interface to manage the export reports used inside the project. More...

Inheritance diagram for IEwProjectExportReportX:

Public Member Functions

VARIANT_BOOL getAddCreatedFileToProject (EwErrorCode *errorCode)
 Indicates if exported files will be added to the project. More...
 
EwErrorCode setAddCreatedFileToProject (VARIANT_BOOL bAddCreatedFileToProject)
 Set this value to true to add exported files to the project. More...
 
BSTR getTargetFolder (EwErrorCode *errorCode)
 Return the exported target folder path. More...
 
EwErrorCode setTargetFolder (BSTR strFolderPath)
 Update the exported target folder path. More...
 
LONG getBookOrFolderId (EwErrorCode *errorCode)
 Return the selected book id or folder id. More...
 
EwErrorCode setBookOrFolderId (long lBookOrFolderId)
 Set the id of the destination folder or book where the reports will be exported. More...
 
VARIANT_BOOL getExportAllReports (EwErrorCode *errorCode)
 Indicate if all reports of the project must be exported. More...
 
EwErrorCode setExportAllReports (VARIANT_BOOL bExportAllReports)
 Set this flag to true to export all reports of the project. More...
 
VARIANT_BOOL getOpenFile (EwErrorCode *errorCode)
 Indicate if reports will be opened after the export. More...
 
EwErrorCode setOpenFile (VARIANT_BOOL bOpenFile)
 Set this flag to true if you want to open the reports after the export. More...
 
VARIANT getEwProjectReportIDArray (EwErrorCode *errorCode)
 Return array of ID of EwProjectReport objects. More...
 
EwErrorCode setEwProjectReportIDArray (VARIANT vProjectReportIDArray)
 Set array of ID of EwProjectReport objects. More...
 
EwErrorCode doXMLExport ()
 Export reports in XML type. More...
 
VARIANT_BOOL getIncludeColumnHeader (EwErrorCode *errorCode)
 Indicate if column header is exported on the first row. More...
 
EwErrorCode setIncludeColumnHeader (VARIANT_BOOL bIncludeColumnHeader)
 Set this flag to true if you want column header exported on the first row. More...
 
EwTextIdentifer getEwTextIdentifer (EwErrorCode *errorCode)
 Return the text identifier for text export of reports. More...
 
EwErrorCode setEwTextIdentifer (EwTextIdentifer eTextIdentifier)
 Update the text identifier for text export of reports. More...
 
EwTextSeparator getEwTextSeparator (EwErrorCode *errorCode)
 Return the text separator for text export ofreports. More...
 
EwErrorCode setEwTextSeparator (EwTextSeparator eTextSeparator)
 Update the text separator for text export of reports. More...
 
EwFileExtension getEwFileExtension (EwErrorCode *errorCode)
 Return the type of the report file extension. More...
 
EwErrorCode setEwFileExtension (EwFileExtension eFileExtension)
 Update the report type file extension. More...
 
EwErrorCode doTxtExport ()
 Export reports in Txt type. More...
 
VARIANT_BOOL getOneSheetByBreak (EwErrorCode *errorCode)
 Indicate if the export will create one sheet by break. More...
 
EwErrorCode setOneSheetByBreak (VARIANT_BOOL bOneSheetByBreak)
 Set this flag to true to export one sheet by break. More...
 
EwErrorCode doExcelExport ()
 Export reports in Excel type. More...
 
EwProjectDataExportType getEwProjectDataExportType (EwErrorCode *errorCode)
 Return the type of report to export. More...
 
EwErrorCode setEwProjectDataExportType (EwProjectDataExportType eProjectDataExportType)
 Update the type of report to export. More...
 

Detailed Description

Use this interface to manage the export reports used inside the project.

Since
2018 SP0

Member Function Documentation

◆ doExcelExport()

EwErrorCode IEwProjectExportReportX::doExcelExport ( )

Export reports in Excel type.

Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if export reports configuration are not correctly filled
  • EW_BAD_INPUTS if "export all reports" is set to false and none reports selected
  • EW_BAD_INPUTS if the folder path does not exist
  • EW_BAD_INPUTS if "Add created file to project" is set to true and the folder ID does not exist
  • EW_OBJECT_NOT_FOUND if "Add created file to project" is set to true and the book or folder id does not exist
  • EW_FOLDER_NOT_FOUND if "Add created file to project" is set to true and if the output folder path does not exist
  • EW_UNDEFINED_ERROR if another error occurred

◆ doTxtExport()

EwErrorCode IEwProjectExportReportX::doTxtExport ( )

Export reports in Txt type.

Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if export reports configuration are not correctly filled
  • EW_BAD_INPUTS if "export all reports" is set to false and none reports selected
  • EW_BAD_INPUTS if the folder path does not exist
  • EW_BAD_INPUTS if "Add created file to project" is set to true and the folder ID does not exist
  • EW_OBJECT_NOT_FOUND if "Add created file to project" is set to true and the book or folder id does not exist
  • EW_FOLDER_NOT_FOUND if "Add created file to project" is set to true and if the output folder path does not exist
  • EW_UNDEFINED_ERROR if another error occurred

◆ doXMLExport()

EwErrorCode IEwProjectExportReportX::doXMLExport ( )

Export reports in XML type.

Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if export reports configuration are not correctly filled
  • EW_BAD_INPUTS if "export all reports" is set to false and none reports selected
  • EW_BAD_INPUTS if the folder path does not exist
  • EW_BAD_INPUTS if "Add created file to project" is set to true and the folder ID does not exist
  • EW_OBJECT_NOT_FOUND if "Add created file to project" is set to true and the book or folder id does not exist
  • EW_FOLDER_NOT_FOUND if "Add created file to project" is set to true and if the output folder path does not exist
  • EW_UNDEFINED_ERROR if another error occurred

◆ getAddCreatedFileToProject()

VARIANT_BOOL IEwProjectExportReportX::getAddCreatedFileToProject ( EwErrorCode errorCode)

Indicates if exported files will be added to the project.

Default value is false.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
Returns false by default, true if exported files will be added to project.

◆ getBookOrFolderId()

LONG IEwProjectExportReportX::getBookOrFolderId ( EwErrorCode errorCode)

Return the selected book id or folder id.

-1 if nothing is selected. -1 by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
The selected id, can be a book id, a folder id or -1 if nothing selected.

◆ getEwFileExtension()

EwFileExtension IEwProjectExportReportX::getEwFileExtension ( EwErrorCode errorCode)

Return the type of the report file extension.

Txt by default (kFileExtensionTXT) for TXT report. XLS by default (kFileExtensionXLS) for Excel report. Used only for Text and Excel export.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
type of the report file extension.

◆ getEwProjectDataExportType()

EwProjectDataExportType IEwProjectExportReportX::getEwProjectDataExportType ( EwErrorCode errorCode)

Return the type of report to export.

By default is kProjectDataExportReport. \ since 2019

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the type of report to export.

◆ getEwProjectReportIDArray()

VARIANT IEwProjectExportReportX::getEwProjectReportIDArray ( EwErrorCode errorCode)

Return array of ID of EwProjectReport objects.

This parameter is used if "export all reports" option is set to false.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if "export all reports" option is set to true
  • EW_UNDEFINED_ERROR if another error occurred

◆ getEwTextIdentifer()

EwTextIdentifer IEwProjectExportReportX::getEwTextIdentifer ( EwErrorCode errorCode)

Return the text identifier for text export of reports.

Double cote by default. Used only for Text export.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the text identifier for text export of reports.

◆ getEwTextSeparator()

EwTextSeparator IEwProjectExportReportX::getEwTextSeparator ( EwErrorCode errorCode)

Return the text separator for text export ofreports.

Comma by default. Used only for Text export.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the text separator for text export of reports.

◆ getExportAllReports()

VARIANT_BOOL IEwProjectExportReportX::getExportAllReports ( EwErrorCode errorCode)

Indicate if all reports of the project must be exported.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true if all reports must be exported.

◆ getIncludeColumnHeader()

VARIANT_BOOL IEwProjectExportReportX::getIncludeColumnHeader ( EwErrorCode errorCode)

Indicate if column header is exported on the first row.

True by default. Used only for Text export.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true if column header is exported on the first row.

◆ getOneSheetByBreak()

VARIANT_BOOL IEwProjectExportReportX::getOneSheetByBreak ( EwErrorCode errorCode)

Indicate if the export will create one sheet by break.

False by default. Used only for Excel export.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true if you want one sheet by break.

◆ getOpenFile()

VARIANT_BOOL IEwProjectExportReportX::getOpenFile ( EwErrorCode errorCode)

Indicate if reports will be opened after the 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
true if reports must be opened after the export.

◆ getTargetFolder()

BSTR IEwProjectExportReportX::getTargetFolder ( EwErrorCode errorCode)

Return the exported target folder path.

Empty by default.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
the exported target folder path.

◆ setAddCreatedFileToProject()

EwErrorCode IEwProjectExportReportX::setAddCreatedFileToProject ( VARIANT_BOOL  bAddCreatedFileToProject)

Set this value to true to add exported files to the project.

You also need to define the destination book or folder.

Parameters
[in]bAddCreatedFileToProjectcan be true or false. True for adding files to project.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ setBookOrFolderId()

EwErrorCode IEwProjectExportReportX::setBookOrFolderId ( long  lBookOrFolderId)

Set the id of the destination folder or book where the reports will be exported.

If value is -1 it will use the default book of the project.

Parameters
[in]lBookOrFolderIdId of a book, a folder of the project. -1 to select nothing.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if the new value is < -1.
  • EW_OBJECT_NOT_FOUND if "Add created file to project" option is set to true and the book or folder id does not exist.
  • EW_UNDEFINED_ERROR if another error occurred

◆ setEwFileExtension()

EwErrorCode IEwProjectExportReportX::setEwFileExtension ( EwFileExtension  eFileExtension)

Update the report type file extension.

Used only for Text and Excel export.

Parameters
[in]eFileExtensionthe new report type.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_FOLDER_NOT_FOUND if the path does not exist

◆ setEwProjectDataExportType()

EwErrorCode IEwProjectExportReportX::setEwProjectDataExportType ( EwProjectDataExportType  eProjectDataExportType)

Update the type of report to export.

By default is kProjectDataExportReport. \ since 2019

Parameters
[in]eProjectDataExportTypean EwProjectDataExportType enum that specifie the new report type. Only kProjectDataExportReport or kProjectDataExportDesignRules are use.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if other enum value are used instead of kProjectDataExportReport or kProjectDataExportDesignRules.
  • EW_UNDEFINED_ERROR if another error occurred

◆ setEwProjectReportIDArray()

EwErrorCode IEwProjectExportReportX::setEwProjectReportIDArray ( VARIANT  vProjectReportIDArray)

Set array of ID of EwProjectReport objects.

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

Parameters
[in]vProjectReportIDArrayan array of files id.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if "export all reports" option is set to true or the aProjectReportArray array is not a long array
  • EW_BAD_INPUTS if the aProjectReportArray is empty
  • EW_UNDEFINED_ERROR if another error occurred

◆ setEwTextIdentifer()

EwErrorCode IEwProjectExportReportX::setEwTextIdentifer ( EwTextIdentifer  eTextIdentifier)

Update the text identifier for text export of reports.

Used only for Text export.

Parameters
[in]eTextIdentifierthe new text identifier for text export of reports.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ setEwTextSeparator()

EwErrorCode IEwProjectExportReportX::setEwTextSeparator ( EwTextSeparator  eTextSeparator)

Update the text separator for text export of reports.

Used only for Text export.

Parameters
[in]eTextSeparatorthe new text separator for text export of reports.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ setExportAllReports()

EwErrorCode IEwProjectExportReportX::setExportAllReports ( VARIANT_BOOL  bExportAllReports)

Set this flag to true to export all reports of the project.

Parameters
[in]bExportAllReportstrue or false to indicate if all reports of the project must be exported.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ setIncludeColumnHeader()

EwErrorCode IEwProjectExportReportX::setIncludeColumnHeader ( VARIANT_BOOL  bIncludeColumnHeader)

Set this flag to true if you want column header exported on the first row.

Used only for Text export.

Parameters
[in]bIncludeColumnHeaderTrue to export column header.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ setOneSheetByBreak()

EwErrorCode IEwProjectExportReportX::setOneSheetByBreak ( VARIANT_BOOL  bOneSheetByBreak)

Set this flag to true to export one sheet by break.

Used only for Excel export.

Parameters
[in]bOneSheetByBreaktrue for one sheet by break.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ setOpenFile()

EwErrorCode IEwProjectExportReportX::setOpenFile ( VARIANT_BOOL  bOpenFile)

Set this flag to true if you want to open the reports after the export.

Parameters
[in]bOpenFiletrue to open reports after the export.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ setTargetFolder()

EwErrorCode IEwProjectExportReportX::setTargetFolder ( BSTR  strFolderPath)

Update the exported target folder path.

Parameters
[in]strFolderPaththe new exported target folder path.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_FOLDER_NOT_FOUND if the path does not exist


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: IEwProjectExportReportX 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.