Solved! Go to Solution.
Hi all,
From toolkit app :
getenv(…)
environment variables to look at PTC_D_LICENSE_FILE, PROE_START, PRO_DIRECTORY.
then get a path to ptcstatus.bat which is usually in the same directory as $PROE_START command...
then pipe out from 'ptcstatus.bat -nopause'
_popen ( full_path_to_ptcstatus_with_switch, "rt");
process output with fgets(…)
HIH.
FV.
Hi all,
From toolkit app :
getenv(…)
environment variables to look at PTC_D_LICENSE_FILE, PROE_START, PRO_DIRECTORY.
then get a path to ptcstatus.bat which is usually in the same directory as $PROE_START command...
then pipe out from 'ptcstatus.bat -nopause'
_popen ( full_path_to_ptcstatus_with_switch, "rt");
process output with fgets(…)
HIH.
FV.
Hi, @FV
environment variables to look at PTC_D_LICENSE_FILE, PROE_START, PRO_DIRECTORY.
As I know, by default Creo don't create this variables.
Or I miss something?
Hi all,
For synchronous types of Pro/Toolkit - getenv(…) will work in the context of the parent process, which is xtop.exe, and that process will have those environment variables automagically initiated. To test this, you could try calling pro/e UI command 'Open System Window' and list environment variables.
For async type apps one has to resort to tricks involving ProToolkitDllLoad() or ProMacro… to force execution in xtop context...
HIH.
FV