Purpose
This document explains how to use some useful commands in the application.
Scope
Following activities are within the scope of this document:
- Open file from file path.
- Create new project.
- Open help topic.
- Collect information on Electrical Software.
- more soon
commands
Open a project file
This command open a file from a project
- Command Name:
- EWOPENFILE
- Parameters:
- Name:
strPathFile
Data Type: string
Field: Required
Description: The full path of the file to open.
Example: "D:\\ProgramData\\...\\Projects\\1216\\Drawings\\11319.ewg"
- Note
- To obtain the path use the getFilePath API from EwProjectFileX object.
...
\\ ewProjectFile: the file to open.
string strFilePath = ewProjectFile.getFilePath();
string strCommand = "EWOPEN ";
strCommand += strFilePath;
mEwApplicationX.runcommand(strCommand);
Create new project
This command creates automatically a new project without displaying any dialog.
- Command Name:
- ewNewProjectNoProperties
- Parameters:
- Name:
strTemplate
Data Type: string
Field: Required
Description: The template file name to create the new project. This name is the file name stored in the template directory of the data folder.
Example: "AINSI"
- Name:
strLanguage
Data Type: string
Field: Required
Description: The language name used for the new project. EN for English, FR for French, ...
Example: "FR"
...
mEwApplicationX.runCommand("ewNewProjectNoProperties IEC EN");
...
open help topic
This section launch automatically the help
- Command Name:
- showContextHelp
- Parameters:
- Name:
strKeyWord
Data Type: string
Field: Required
Description: The key word to find.
Example: "EwAPI"
...
mEwApplicationX.
runCommand(
"showContextHelp EwEnvironmentArchiverDlg");
...
Collect information
This command collect in a text file all information related to the application, like computer configuration, installation type...
- Command Name:
- EWCOLLECTINFORMATION
- Parameters: None.
...
mEwApplicationX.runCommand("EWCOLLECTINFORMATION");
...