cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Tip: ModelCHECK DIR_REPORT path for Windows environment

JimTVancouverCa
12-Amethyst

Tip: ModelCHECK DIR_REPORT path for Windows environment

Hello all,

When configuring ModelCHECK and setting DIR_REPORT in config_init.mc the path is interpreted as Windows if you specify a static path, for example:

DIR_REPORT c:\myusershomebaseetc\subfolder\mc_reports

But let's say you want the report to live in a subfolder based on the windchill username?  You might want to do this if you don't use the windows provided %USERPROFILES% which is c:\users\<username>\ in most cases.

Here's what I found works on Windows 7 professional:

DIR_REPORT $homedrive/home/$USERNAME/mc_reports

(Note the forward slashes, this is opposite to Windows convention of '\' backslashes for paths.)

If you do want to use %USERPROFILES% you would use this:

DIR_REPORT %USERPROFILE/mc_reports

These below options do NOT work in my testing:

DIR_REPORT $homedrive\home\$USERNAME/mc_reports

DIR_REPORT $homedrive\home\$USERNAME\mc_reports

DIR_REPORT c: \home\$USERNAME/mc_reports

DIR_REPORT c:\home\$USERNAME\mc_reports

All results in Creo Parametric 2 M120 defaulting to the folder where Creo was started, as documented in the Creo help system.

Related PTC articles: TPI 31240, CS116772.

3 REPLIES 3

Hello Everyone,

Note if you turn on option: MC_METRICS it will write that as a separate file.  You specify the location of that file with: DIR_METRICS setting in config_init.mc  It does not follow DIR_REPORT.

- Jim

Hello all,

Another follow up on this.  It seems any variable set in your Creo startup script that contains valid path information can be used to set the DIR_REPORT path in config_init.mcc


I now have our set to:

DIR_REPORT $homedrive/home/$windchill_username/mc_reports

For info on HOMEDRIVE see: https://support.microsoft.com/en-us/kb/101507 ‌this seems to apply to Win 7 in our environment.

/home is just where the previous admin here parked all user local files.

$windchill_username is a set variable I set in our site's Creo startup script.  Because I do NOT use setlocal in that script, it appears to be available to the Creo sessions started from that script.  Note the script can be run from a desktop shortcut, you don't have to start it from a command line.

Hope this is useful to someone!

I tried using the %USERPROFILE% variable in different formats, but kept getting an error about write access, which makes little sense to me since I have full access on the local directory I created to store the reports. I verified this by using a static path, which worked. Eventually, I found that using $HOMEPATH works all the same.

Announcements


Top Tags