Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.
I searched for the Pro-Engineer Purge option in the Pro-Toolkit API,It is not availible.Where as there are some notification API are avail with Purge.I need to do the purge action using pro-toolkit API directly.How do i perform this action?
If you are connected to a workspace then I think you can do it with Pro/INTRALINK Toolkit but I would not advise it. Otherwise if you are not connected to a workspace then you will have to interrogate the file system and delete all previous versions of a file. For example if you have myasm.asm.1, .2, .3, .4. Then you will have to write an algorithm that deletes all myasm.asm* except the .4 version.
A small batch file might be useful.
1.Set the current directory:
CHDIR %cd%
2. Then call purge.bat
@CALL "C:\Program Files\proeWildfire 3.0\bin\purge.bat"
Here are the steps
1. Call PTK API ProFilesList() to get the files in the specified directory, filter out the unwanted files.
2. Call C function - qsort, to arrange the array of elements returned by ProFilesList().
3. Visit all the elemets of the sorted queue and call the C function remove(str), to remove the unwanted elements.
Let me know if you require the code for the same, send me your email ID.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.