Go BackGo Forward Index Home  

Project
CodeMeter

Command line parameters and IDE integration

When launched, ProjectCodeMeter can optionally accept several command line parameters for automating some tasks, such as a weekly scan of project files.
These commands can be used from any one of these places:
- Typed from the command prompt
- In a the "Target" of a shortcut properties
- A batch file (for example filename.bat)
- The Windows Start menu "Run" box
- The execution command of any software which supports external applications (such as the Tools menu of Microsoft Visual Studio).

Parameters

/NOFLASH
Prevent ProjectCodeMeter from using Adobe Flash graphics, in case flash isn't installed or doesn't function properly, this also speeds up loading a bit and uses less memory, but graphic charts will not be displayed.

/S:SettingsName
This command will load a setting called SettingsName. You should save a setting with that name before using this command (by using the Save Settings toolbar button). Please state only the name, not the path nor extension. Note that loading a setting will load all ProjectCodeMeter settings, including the Project Folder, and the When analysis ends Action, for example, if the "When analysis ends" Action of "Exit application" was selected when that settings was saved,
ProjectCodeMeter automatically exit when done.

/A
Automatically start the Analysis process when ProjectCodeMeter launchs. Note that it will use the previous Settings unless you also use the /S command described above.

/X
Makes ProjectCodeMeter automatically exit when the analysis process finishs. Note that this is independent of any "When analysis ends" action loaded by the /S command described above (so you can use a settings that opens a report in Excel, and still exits when finished).

/Q
Quiet mode, which won't popup any errors, rather write them to the log file "projectcodemeter_log.txt" in the reports folder of that project

/H
Hides the main window, especially useful when called from a batch script. Please note it also auto adds these options (so no need to explicitly add them): /X /Q /A /NOFLASH
Note that ProjectCodeMeter steals the keyboard focus for a split second when loaded, so if you want to work on your PC while running it in a batch, it's best doing so in another virtual desktop or screen (Ctrl-Tab in Windows 10)

/P:"folder"
Sets the current Project folder. Use a fully qualified path to the folder of the project you wish to analyze. Can optionally use single quotes /P:'folder' in case of trouble.

/D
This command will enable Differential comparison mode of analysis

/D:"folder"
This command will enable Differential comparison mode of analysis, and set the Old Version folder


Examples
The following examples assume you installed ProjectCodeMeter into C:\Program Files\ProjectCodeMeter , if that's not the case, simply use the path you installed to instead.

A typical execution command can look like this:
"C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe"  /S:MyFirstProjectSetting  /P:"C:\MyProjects\MyApp"  /A
This will load a setting called MyFirstProjectSetting, set the Project folder to C:\MyProjects\MyApp , and then start the analysis.

Another example may be:
"C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe" /P:"C:\MyProjects\MyApp" /D:"C:\MyProjects\MyAppPrevious" /A
This will start a differential analysis between the project version in C:\MyProjects\MyApp and the older version in C:\MyProjects\MyAppPrevious



Integration with Microsoft Visual Studio 6

Under the Tools - Customize... menu:

visual studio 6 tools

Manual analysis of the entire project:
Title: ProjectCodeMeter
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:"$(WkspDir)"
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.

Automatic cumulative analysis milestone (differential from the last analysis):
Title: ProjectCodeMeter Cumulative Milestone
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:"$(WkspDir)" /D /A
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.


Integration with Microsoft Visual Studio 2003 - 2010

Under the Tools - External Tools.. menu (you may need to first click Tools - Settings - Expert Settings):

visual studio 2003 - 2010 tools

Manual analysis of the entire project:
Title: ProjectCodeMeter
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'$(SolutionDir)'
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.

Automatic cumulative analysis milestone (differential from the last analysis):
Title: ProjectCodeMeter Cumulative Milestone
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'$(SolutionDir)' /D /A
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.


Integration with CodeBlocks

Under the Tools - Configure Tools.. - Add menu:

Manual analysis of the entire project:
Name: ProjectCodeMeter
Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'${PROJECT_DIR}'
Working Directory: C:\Program Files\ProjectCodeMeter
Select Launch tool visible detached (without output redirection)

Automatic cumulative analysis milestone (differential from the last analysis):
Name: ProjectCodeMeter Cumulative Milestone
Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'${PROJECT_DIR}' /D /A
Working Directory: C:\Program Files\ProjectCodeMeter
Select Launch tool visible detached (without output redirection)


Integration with Eclipse

Under the Run - External Tools.. - External Tools... - Program - New - Main menu:

Manual analysis of the entire project:
Name: ProjectCodeMeter
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}'
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes

Automatic cumulative analysis milestone (differential from the last analysis):
Name: ProjectCodeMeter Cumulative Milestone
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}' /D /A
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes


Integration with Aptana Studio

Under the Run - External Tools - External Tools Configurations... - Program - New - Main menu:

Manual analysis of the entire project:
Name: ProjectCodeMeter
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}'
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes

Automatic cumulative analysis milestone (differential from the last analysis):
Name: ProjectCodeMeter Cumulative Milestone
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}' /D /A
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes

Integration with Oracle JDeveloper

Under the Tools - External Tools.. - New External Program -  menu:

Manual analysis of the entire project:
Program Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${project.dir}'
Run Directory: "C:\Program Files\ProjectCodeMeter"
Caption: ProjectCodeMeter

Automatic cumulative analysis milestone (differential from the last analysis):
Program Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${project.dir}' /D /A
Run Directory: C:\Program Files\ProjectCodeMeter
Caption: ProjectCodeMeter Cumulative Milestone


Integration with JBuilder

Under the Tools - Configure Tools.. - Add menu:

Manual analysis of the entire project:
Title: ProjectCodeMeter
Program: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'($ProjectDir)'
Unselect Service checkbox, select the Save all checkbox

Automatic cumulative analysis milestone (differential from the last analysis):
Title: ProjectCodeMeter Cumulative Milestone
Program: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'($ProjectDir)' /D /A
Unselect Service checkbox, select the Save all checkbox