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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

purging in creo 2.0

MichaelDouglas
8-Gravel

purging in creo 2.0

Can someone help me with this?

Mike

9 REPLIES 9
DRFaust
5-Regular Member
(To:MichaelDouglas)

Mine is:

Home tab>Utilities>Open System Window

Then I type in purge > Select Enter

Then I type Exit.

Good luck...

Create mapkey

mapkey_purge.PNG

Mike

With Creo, changes were made to how some extenal batch files are handled, e.g. PURGE

We had the same problem until we contacted our support contact

This is the extract from the email

Dear Peter,

Regarding the issue of purge command, could you please test these things

  1. Set an environment variable called PATH to bin folder (example C:\PTC\Creo 1.0\Parametric\bin)

  1. Set config.pro option terminal_command to C:\Windows\system32\cmd.exe

  1. Ensure purge.exe file is available at C:\PTC\Creo 1.0\Common Files\M040\x86e_win64\obj

  1. PTC installation folders should have write permissions

Please let us know if it fixes

Dear Peter,

Could you please environment variable like this

%SystemRoot%\system32;C:\PTC\Creo 1.0\Parametric\bin

Please let me know if it fixes the issue

After we did set the environment variable like this, PURGE worked again

The vairables they are talking about are in the computers control panel, and the path should be what your path is to reach the bin folder

Peter

Actually, with Creo 2.0, all you need to do is add the path to the bin folder to your system path statement as Peter said.

In my case, I added this to the -system variables- path statement:

;C:\Creo2-M020\Creo 2.0\Parametric\bin

To get to the path statement in Windows 7, type "path" in the start menu search; edit the system environment variables; environment variables; look for path in the system variables.

I use notepad to edit the path statement with copy and paste. Some path statements can get quite extensive.

once this is done, use purge as normal, open the command prompt in the folder you wish to purge and type "purge" and all will be done. Just remember to update the path each time you upgrade the software home folder.

error+message.png

Ok, the purge command has worked. I purged about 20 folders 2 of them returned this error and would not purge. Any thoughts?

Interesting... yes, I've seen that error too. There are actually 2 files that it has trouble finding. Oddly enough, PTC has several versions of that file floating around for different products.

I found the Creo version of the file and put it in the windows system32 location where all DLL's reside.

You might also put in a customer service ticket to find out how to avoid this error. I haven't seen it since I copied the appropriate files to the System32 folder, but it would be good to know what is actually suppose to happen.

Maybe that is what taking ownership of the Creo application folders is suppose to solve. I haven't done that on the latest install (M020)

Create a purge.bat file.

Set the envirinmentvariable.

open system window.

and use purge command.

it will work.

can you show me an example file

we have files stored in folders with these names

z:/500x

z:/510x

z:/520x

etc..

This is the batch file PTC provides with the install called purge.bat and resides in the Creo../bin folder.

@echo off

set MC=unset
if "%PROCESSOR%" == "INTEL_64" set MC=ia64_nt
if "%PROCESSOR%" == "INTEL_486" set MC=i486_nt
if "%PROCESSOR_ARCHITECTURE%" == "IA64" set MC=ia64_nt
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" set MC=x86e_win64
if "%PROCESSOR_ARCHITECTURE%" == "x86" set MC=i486_nt
REM cygwin sets this on 64bit OS
if "%PROCESSOR_ARCHITEW6432%" == "AMD64" set MC=x86e_win64
if not "%MC%" == "unset" goto mc_done
echo ERROR Cannot detect what machine type you have.
echo Please make one of the following settings:
echo.
echo set PROCESSOR=INTEL_486 - For Windows NT Intel based machines.
echo.
echo set PROCESSOR=INTEL_64 - For Windows Intel Itanium based machines.
echo.
echo set PROCESSOR_ARCHITECTURE=AMD64 - For Windows AMD 64 based machines.
echo.
exit
:mc_done

if NOT "%CREO_DIRECTORY%" == "" goto creoset
set APPDIR=%~dp0..
set cf=%~dp0..\..
set PRODIR=%cf%\Common Files\M040

goto pdirset
:creoset
set PRODIR=%CREO_DIRECTORY%\Common Files\M040
:pdirset

set PRO_MACHINE_TYPE=%MC%

set start_cmd=start ""

set PRO_DIRECTORY=%PRODIR%
set CREOAPP_DIRECTORY=%APPDIR%
if NOT "%PTCPATH%" == "" goto ptcpathset

set path=%PRO_DIRECTORY%\bin;%path%

set PTCPATH=true
:ptcpathset


"%PRODIR%\%MC%\obj\purge.exe" %1 %2 %3 %4 %5
:ptc_end
exit /B %ERRORLEVEL%

You can create a batch file that calls this file with the CD commands for an automated cleanup.

Top Tags