HowToCreateYourCommandLinePlugin

From user's Wiki!
Jump to: navigation, search

This section describes how to create a new Command Line Plugin (CLP) for GIMIAS.

Create CLP Container Folders and templates

In order to generate the folder structure and the basic files needed, run the StartNewModule tool.

  1. Specify the name of your new CLP in the Name field (e.g. RTSTRUCTReader)
  2. Specify the folder where you want to put your new CLP in the Root path (e.g.C:\Code\src\MyProject\MyProject_src\Modules\MyModule). Usually this will be the folder of a Module inside the Modules folder.
  3. Select CommandLine Plugin in the Type combo box
  4. Press the Start New Module button
StartNewModule fields for new CLP

This steps will create the folder Applications\RTSTRUCTReader with the files RTSTRUCTReader.xml and RTSTRUCTReader.cxx and the file csnRTSTRUCTReader.py in the Module folder.

Build your CLP

Use CSnake to build the solution containing only your new CLP. :

  1. Open CSnake and specify csnRTSTRUCTReader.py as the CSnake file
  2. Press Update and select the CSnake Instance rtstructreaderCLP
  3. Press Create CMake files and Run CMake
  4. Press Launch IDE
  5. Compile your CLP

To get further information about Command Line Plugins you can go HowToDevelopACommandLinePlugin.

Note Note: Execute your CLP in Windows

To execute the CLP you need to set the working directory to the GIMIAS\bin folder, in order to find the dependent DLLs. For example if your build folder is C:\Code\bin\GIMIAS_1_3, you need to set the working directory to C:\Code\bin\GIMIAS_1_3\bin\$(OutDir).

To access to the properties of your CLP project, you need to right click on the project in your Visual Studio solution, select Properties->Debugging.

Next/Previous Steps:

Go back to Developers