MKS get selected project of subprocess "si projects --gui"

296 views Asked by At

Is there a way to get the selected project of the MKS projects view gui started as a subprocess from the command line?

si.exe projects ... -g

When starting a custom tool from the MKS main gui accessing the selected project is possible by defining an environment file for that tool and parsing it for the variable name like SI_PROJECT1=... . But it is only the selected file at tool start or more precisely it is only the environment from tool start. Changes in the gui don't have an effect on the environment file. The gui itself unfortunately has no return value giving the selected project.

I'm trying to use the MKS si projects gui called as a subprocess from python or C# to select a specific project and use the selection for further processing. Is there any way to do that (on Win7)?

Thanks in advance!

1

There are 1 answers

0
vasilenicusor On

To use the GUI for selecting a specific project you can use the following command projectinfo from cli

si.exe projectinfo --settingsUI=gui

then parse the output of command and use the Project Name or Configuration Path, depending of your server configuration Also, you can use the command in combination with --xmlapi and the output will be as xml ( I know that this option is not recommended in release application, is only for developing phase)

Sample output

Project Name: t:/projects/demo/project.pj
Repository Location: t:/projects/demo/project.pj
Server: mks-host:7001
Configuration Path: #t:/projects/demo
Last Checkpoint: 1.1
Last Checkpointed: Apr 21, 2011 4:10:50 PM
Members: 2
Subprojects: 6
Description:
Attributes: none
Development Paths: none
Associated Issues: none

Depending of your server version and configuration