Welcome
Expand Getting StartedGetting Started
Expand SOLIDWORKS API HelpSOLIDWORKS API Help
Collapse SOLIDWORKS Electrical API HelpSOLIDWORKS Electrical API Help
Expand Getting StartedGetting Started
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
IEwEnvironmentX
IEwInteropFactoryX
IEwLibraryManagerX
IEwLibraryX
IEwLockStringX
IEwManufacturerPartCircuitX
IEwManufacturerPartManagerX
IEwManufacturerPartTerminalX
IEwManufacturerPartX
Expand IEwObjectBaseXIEwObjectBaseX
IEwPointX
IEwProjectAutomaticArrowsX
IEwProjectBookManagerX
IEwProjectCableManagerX
IEwProjectComponentCircuitX
IEwProjectComponentManagerX
IEwProjectComponentTerminalX
IEwProjectEntity3DManagerX
IEwProjectExportDWGFilesX
IEwProjectExportPDMX
IEwProjectExportReportX
IEwProjectFileManagerX
IEwProjectFolderManagerX
IEwProjectFunctionManagerX
IEwProjectGenerateTSDrawingX
IEwProjectHarnessManagerX
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
Hide Table of Contents
SOLIDWORKS Electrical API  2020.0.5
Electrical API
IEwApplicationX Interface Reference

Use this interface to manage the application. More...

Inheritance diagram for IEwApplicationX:
[legend]

Public Member Functions

EwErrorCode runCommand (BSTR strCommand)
 Run a command. More...
 
IEwEnvironmentX getEwEnvironment (EwErrorCode *errorCode)
 
IEwEnvironmentX newEwEnvironment ()
 Create a IEwEnvironmentX object from the current API. More...
 
IEwProjectX getEwProjectCurrent (EwErrorCode *errorCode)
 To get the active project. More...
 
IEwDialogSummaryX getEwDialogSummary (EwErrorCode *errorCode)
 To get the summary dialog wrapper. More...
 
IEwDialogManufacturerPartSelectorX getEwDialogManufacturerPartSelector (EwErrorCode *errorCode)
 To get the manufacturer part selector dialog wrapper. More...
 
IEwDialogTaskX getEwDialogTask (EwErrorCode *errorCode)
 To get the task dialog wrapper. More...
 
IEwRightsManagerX getEwRightsManager (EwErrorCode *errorCode)
 To get the rights manager. More...
 
EwErrorCode openEwProjectID (LONG lID)
 Open a project in the application interface. More...
 
EwErrorCode closeEwProjectID (LONG lID)
 Close a project already opened in the application interface. More...
 
IEwDialogManufacturerPartOrderingX getEwDialogManufacturerPartOrdering (EwErrorCode *errorCode)
 To get the manufacturer part ordering dialog wrapper. More...
 
IEwDialogAlignPartsParametersSelectorX getEwDialogAlignPartsParametersSelector (EwErrorCode *errorCode)
 To get align parameters selector dialog wrapper. More...
 
EwErrorCode importFile (BSTR bstrFileToImport, BSTR bstrOutputPath)
 To import .ema, .ems files. More...
 
BSTR getApplicationVersion ()
 Get the application version as: 2016.1.2 Version 2016 is the major number, 1 is for minor number, 2 is for Service pack. More...
 
BSTR getApiDllVersion ()
 Get the version of the ActiveX dll loaded in memory. More...
 
IEwDialogLocationSelectorX getEwDialogLocationSelector (EwErrorCode *errorCode)
 To get the location selector dialog wrapper. More...
 
IEwDialogMacroSelectorX getEwDialogMacroSelector (EwErrorCode *errorCode)
 To get the macro selector dialog wrapper. More...
 
IEwApplicationSettingsX getEwApplicationSettings (EwErrorCode *errorCode)
 Get the application settings interface. More...
 
EwErrorCode loadRespan (BSTR bstrFilePath)
 Load a file with extention .respan containing the definition of a ribbon tab to be added to the application ribbon. More...
 
EwErrorCode unloadRespan (BSTR bstrFilePath)
 Unload a .respan file. More...
 
BSTR getName ()
 return name of application More...
 
IEwCommandManagerX getEwCommandManager (EwErrorCode *errorCode)
 Get the IEwCommandManagerX command manager interface. More...
 
IEwXLSBookX newEwXLSBook (EwErrorCode *errorCode)
 To get a new XLSBookX wrapper. More...
 
IEwDialogProgressX getEwDialogProgress (EwErrorCode *errorCode)
 Get the progress dialog wrapper. More...
 
IEwDialogResumeX getEwDialogResume (EwErrorCode *errorCode)
 Get the resume dialog wrapper. More...
 
IEwProjectX openProjectFromFilePath (BSTR strFilePath, EwErrorCode *errorCode)
 Open a project from the input file path. More...
 
VARIANT_BOOL isEwProjectOpened (long lProjectId, EwErrorCode *errorCode)
 Return true if the project is opened in application user interface. More...
 
VARIANT_BOOL isEwMacroOpened (long lMacroId, EwErrorCode *errorCode)
 Return true if the macro is opened in application user interface. More...
 
EwErrorCode openEwMacroID (LONG lID)
 Open a macro in the application interface. More...
 
EwErrorCode closeEwMacroID (LONG lID)
 Close a macro already opened in the application interface. More...
 
BSTR findFile (BSTR bstrFileName, EwErrorCode *pErrorCode)
 Find a file in application folders. More...
 
BSTR getWinAppName ()
 return 2D application name, to substitute WIN_APP_NAME in the resource strings More...
 
IEwRibbonX getEwRibbon (EwErrorCode *errorCode)
 return an IEwRibbonX interface to EwRibbonX object. More...
 
BSTR getFolderPath (EwApplicationFolderPathValue ewApplicationFolderPathValue, EwErrorCode *errorCode)
 Return path of utility application folder, next to binary folder. More...
 
EwErrorCode activate ()
 Activate the application. More...
 
EwApISoftType getApplicationType (EwErrorCode *pErrorCode)
 Return application type. More...
 
EwErrorCode getSystemInformation (BSTR bstrPath)
 Collect information on electrical application. More...
 
EwPdmType getEwPdmType (EwErrorCode *errorCode)
 Return current EwPdmType enum type. More...
 
EwErrorCode setEwPdmType (EwPdmType ewPdmType)
 Set type of PDM integration. More...
 
EwErrorCode close ()
 Close the application. More...
 
IEwDialogProjectManagerX getEwDialogProjectManager (EwErrorCode *errorCode)
 To get the Project Manager dialog wrapper with the IEwDialogProjectManagerX interface. More...
 

Detailed Description

Use this interface to manage the application.

Since
2018 SP0

Member Function Documentation

◆ activate()

EwErrorCode IEwApplicationX::activate ( )

Activate the application.

Since
2019
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT there is no application
  • EW_UNDEFINED_ERROR if another error occurred

◆ close()

EwErrorCode IEwApplicationX::close ( )

Close the application.

It will close all opened projects and files.

Since
2020 SP0
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred

◆ closeEwMacroID()

EwErrorCode IEwApplicationX::closeEwMacroID ( LONG  lID)

Close a macro already opened in the application interface.

Since
2019
Parameters
[in]lIDID of the macro to close
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
  • EW_CANNOT_CLOSE_PROJECT if project cannot be closed

◆ closeEwProjectID()

EwErrorCode IEwApplicationX::closeEwProjectID ( LONG  lID)

Close a project already opened in the application interface.

Parameters
[in]lIDID of the project to close
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
  • EW_CANNOT_CLOSE_PROJECT if project cannot be closed

◆ findFile()

BSTR IEwApplicationX::findFile ( BSTR  bstrFileName,
EwErrorCode pErrorCode 
)

Find a file in application folders.

Since
2019
Parameters
[in]bstrFileNameFile name to find
[out]pErrorCodeError code,
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_FILE_NOT_FOUND if the file not found
Returns
Full path to the file found

◆ getApiDllVersion()

BSTR IEwApplicationX::getApiDllVersion ( )

Get the version of the ActiveX dll loaded in memory.

If Dll version is different from application version, it means that the registered dll is not the good one. formated version like 2017.1.2 (2017 for major, 1 for mino, 2 for Service pack)

Returns
"Dll version" instead of version of apix

◆ getApplicationType()

EwApISoftType IEwApplicationX::getApplicationType ( EwErrorCode pErrorCode)

Return application type.

Since
2020 SP0
Parameters
[out]EwErrorCodeenum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT there is no application
  • EW_UNDEFINED_ERROR if another error occurred
Returns
application Type (EW2D, SW2D, SW3D)

◆ getApplicationVersion()

BSTR IEwApplicationX::getApplicationVersion ( )

Get the application version as: 2016.1.2 Version 2016 is the major number, 1 is for minor number, 2 is for Service pack.

Returns
Application Version

◆ getEwApplicationSettings()

IEwApplicationSettingsX IEwApplicationX::getEwApplicationSettings ( EwErrorCode errorCode)

Get the application settings interface.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the application settings interface

◆ getEwCommandManager()

IEwCommandManagerX IEwApplicationX::getEwCommandManager ( EwErrorCode errorCode)

Get the IEwCommandManagerX command manager interface.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the IEwCommandManagerX command manager interface.

◆ getEwDialogAlignPartsParametersSelector()

IEwDialogAlignPartsParametersSelectorX IEwApplicationX::getEwDialogAlignPartsParametersSelector ( EwErrorCode errorCode)

To get align parameters selector dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the dialog wrapper

◆ getEwDialogLocationSelector()

IEwDialogLocationSelectorX IEwApplicationX::getEwDialogLocationSelector ( EwErrorCode errorCode)

To get the location selector dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the summary dialog wrapper

◆ getEwDialogMacroSelector()

IEwDialogMacroSelectorX IEwApplicationX::getEwDialogMacroSelector ( EwErrorCode errorCode)

To get the macro selector dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the macro selector dialog wrapper

◆ getEwDialogManufacturerPartOrdering()

IEwDialogManufacturerPartOrderingX IEwApplicationX::getEwDialogManufacturerPartOrdering ( EwErrorCode errorCode)

To get the manufacturer part ordering dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the dialog wrapper

◆ getEwDialogManufacturerPartSelector()

IEwDialogManufacturerPartSelectorX IEwApplicationX::getEwDialogManufacturerPartSelector ( EwErrorCode errorCode)

To get the manufacturer part selector dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the summary dialog wrapper

◆ getEwDialogProgress()

IEwDialogProgressX IEwApplicationX::getEwDialogProgress ( EwErrorCode errorCode)

Get the progress dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
Returns
the progress dialog wrapper

◆ getEwDialogProjectManager()

IEwDialogProjectManagerX IEwApplicationX::getEwDialogProjectManager ( EwErrorCode errorCode)

To get the Project Manager dialog wrapper with the IEwDialogProjectManagerX interface.

Since
2021 SP0
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the Project Manager dialog wrapper

◆ getEwDialogResume()

IEwDialogResumeX IEwApplicationX::getEwDialogResume ( EwErrorCode errorCode)

Get the resume dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
Returns
the resume dialog wrapper

◆ getEwDialogSummary()

IEwDialogSummaryX IEwApplicationX::getEwDialogSummary ( EwErrorCode errorCode)

To get the summary dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the summary dialog wrapper

◆ getEwDialogTask()

IEwDialogTaskX IEwApplicationX::getEwDialogTask ( EwErrorCode errorCode)

To get the task dialog wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the task dialog wrapper

◆ getEwEnvironment()

IEwEnvironmentX IEwApplicationX::getEwEnvironment ( EwErrorCode errorCode)
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_NO_ACTIVEPROJECT if no active project
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
An the IEwEnvironmentX of the application

◆ getEwPdmType()

EwPdmType IEwApplicationX::getEwPdmType ( EwErrorCode errorCode)

Return current EwPdmType enum type.

Since
2020 SP0
Parameters
[out]ewErrorCodeenum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_UNDEFINED_ERROR if another error occurred
Returns
EwPdmType type of PDM integration.

◆ getEwProjectCurrent()

IEwProjectX IEwApplicationX::getEwProjectCurrent ( EwErrorCode errorCode)

To get the active project.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_NO_ACTIVEPROJECT if no active project
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the current project of the application

◆ getEwRibbon()

IEwRibbonX IEwApplicationX::getEwRibbon ( EwErrorCode errorCode)

return an IEwRibbonX interface to EwRibbonX object.

Since
2019
Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT If there is no main window or main window does not have ribbon bar
  • EW_UNDEFINED_ERROR if another error occurred
Returns
an IEwRibbonX interface to EwRibbonX object.

◆ getEwRightsManager()

IEwRightsManagerX IEwApplicationX::getEwRightsManager ( EwErrorCode errorCode)

To get the rights manager.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the rights manager wrapper

◆ getFolderPath()

BSTR IEwApplicationX::getFolderPath ( EwApplicationFolderPathValue  ewApplicationFolderPathValue,
EwErrorCode errorCode 
)

Return path of utility application folder, next to binary folder.

Since
2018 SP4
Parameters
[in]ewApplicationFolderPathValueset an EwApplicationFolderPathValue enum value
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_UNDEFINED_ERROR if another error occurred
  • EW_OUT_OF_SCOPE request type is out of scope
Returns
string Folder path of request , empty if failed

◆ getName()

BSTR IEwApplicationX::getName ( )

return name of application

◆ getSystemInformation()

EwErrorCode IEwApplicationX::getSystemInformation ( BSTR  bstrPath)

Collect information on electrical application.

If the UAC is actived some informations cannot be collected.

Since
2020 SP0
Parameters
[in]bstrPathpath to copy generated files.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_BAD_INPUTS if path is empty
  • EW_DOES_NOT_EXIST_ERROR if path do not exist.
  • EW_UNDEFINED_ERROR if another error occurred

◆ getWinAppName()

BSTR IEwApplicationX::getWinAppName ( )

return 2D application name, to substitute WIN_APP_NAME in the resource strings

◆ importFile()

EwErrorCode IEwApplicationX::importFile ( BSTR  bstrFileToImport,
BSTR  bstrOutputPath 
)

To import .ema, .ems files.

Parameters
[in]bstrFileToImportThe file name to import
[in]bstrOutputPathOutput folder path where tewzip file will be generated. Folder path must exists. \ If folder path is empty no file will be created but macro will be imported in application database.
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
  • EW_NO_EWLIBRARY_EXIST if the necessary import folder doesn't exists.
  • EW_BAD_INPUTS if the file to import is not found.

◆ isEwMacroOpened()

VARIANT_BOOL IEwApplicationX::isEwMacroOpened ( long  lMacroId,
EwErrorCode errorCode 
)

Return true if the macro is opened in application user interface.

Since
2019
Parameters
[in]lMacroIdthe id of the macro to test
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUT if the lMacroId is negative
  • EW_OBJECT_NOT_FOUND if the lMacroId is not found in the project
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true if the macro is opened in application user interface.

◆ isEwProjectOpened()

VARIANT_BOOL IEwApplicationX::isEwProjectOpened ( long  lProjectId,
EwErrorCode errorCode 
)

Return true if the project is opened in application user interface.

Since
2019
Parameters
[in]lProjectIdthe id of the project to test
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUT if the lProjectId is negative
  • EW_OBJECT_NOT_FOUND if the lProjectId is not found in the project
  • EW_UNDEFINED_ERROR if another error occurred
Returns
true if the project is opened in application user interface.

◆ loadRespan()

EwErrorCode IEwApplicationX::loadRespan ( BSTR  bstrFilePath)

Load a file with extention .respan containing the definition of a ribbon tab to be added to the application ribbon.

Parameters
[in]bstrFilePath,thefile path of the custom pane
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_FILE_NOT_FOUND if bstrFilePath doesn't exist

◆ newEwEnvironment()

IEwEnvironmentX IEwApplicationX::newEwEnvironment ( )

Create a IEwEnvironmentX object from the current API.

Returns
An IEwEnvironmentX connected to the current API

◆ newEwXLSBook()

IEwXLSBookX IEwApplicationX::newEwXLSBook ( EwErrorCode errorCode)

To get a new XLSBookX wrapper.

Parameters
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
Returns
the XLSBookX wrapper

◆ openEwMacroID()

EwErrorCode IEwApplicationX::openEwMacroID ( LONG  lID)

Open a macro in the application interface.

Since
2019
Parameters
[in]lIDID of the macro to open
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUT if the lID is negative
  • EW_OBJECT_NOT_FOUND if the lID is not found in the project
  • EW_CANNOT_OPEN_PROJECT if macro cannot be opened

◆ openEwProjectID()

EwErrorCode IEwApplicationX::openEwProjectID ( LONG  lID)

Open a project in the application interface.

Parameters
[in]lIDID of the project to open
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_BAD_INPUT if the lID is negative
  • EW_OBJECT_NOT_FOUND if the lID is not found in the project
  • EW_CANNOT_OPEN_PROJECT if project cannot be opened

◆ openProjectFromFilePath()

IEwProjectX IEwApplicationX::openProjectFromFilePath ( BSTR  strFilePath,
EwErrorCode errorCode 
)

Open a project from the input file path.

Since
2019
Parameters
[in]strFilePathFull file path
[out]errorCodeEwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_FILE_NOT_FOUND The file path does not exist
  • EW_UNDEFINED_ERROR if another error occurred
Returns
A valid object if the project is opened, null object otherwise.

◆ runCommand()

EwErrorCode IEwApplicationX::runCommand ( BSTR  strCommand)

Run a command.

Parameters
[in]strCommandThe command to run
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_API_NOT_SUPPORTED if the API is not available for this application
  • EW_BAD_INPUTS if the command to run is not existing
  • EW_OPERATION_CANCELED if user cancel the command
  • EW_UNDEFINED_ERROR if an error occurred

◆ setEwPdmType()

EwErrorCode IEwApplicationX::setEwPdmType ( EwPdmType  ewPdmType)

Set type of PDM integration.

Since
2020 SP0
Parameters
[in]ewPdmTypenew enum value for PDM integration. \kPdmSwEntreprise , kPdmBasic , kPdmThirdParty
Returns
ewErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected \EW_BAD_INPUTS ewPdmType is invalid (only use: kPdmSwEntreprise , kPdmBasic , kPdmThirdParty)
  • EW_UNDEFINED_ERROR if another error occurred

◆ unloadRespan()

EwErrorCode IEwApplicationX::unloadRespan ( BSTR  bstrFilePath)

Unload a .respan file.

Parameters
[in]bstrFilePath,thefile path of the custom pane
Returns
EwErrorCode enum type, can be:
  • EW_NO_ERROR if no error detected
  • EW_INVALID_OBJECT if object is not initialized
  • EW_FILE_NOT_FOUND if bstrFilePath doesn't 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: IEwApplicationX 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) 2020 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.