kbrault said:
How about adding some lines like this to your batch file:
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
echo.c:\path_to_whatever_1 >search.pro
echo.c:\path_to_whatever_2 >>search.pro
dir /ad /s /b >>search.pro</BLOCKQUOTE>
Whenever the batch file is run the first line will delete the old search.pro and add the first path to a new one. The second line can be repeated as much as required. The third line will add the current and all sub folders to the search.pro file.
Please note that the third line will only add correct paths if there is no spaces in any of the folder names. If you have spaces ProE will ignore the format this command provides. To make it work the batch file get much more complicated.
Ignoring the paths with spaces in the name is handy though. Our uses will create folders with spaces and copy files into them knowing that the search path will not find these files.
Kevin
This is different than what I had in mind, but I will give it a try as it may be a better way to do what I am trying to do. Just so I understand this correctly, this will do the following:
1) Delete the old search.pro file that I have (assuming I store the search.pro in the same folder as my config file (not in the folder where the assembly is).
2) Copy the path of the assembly/part I am opening to a new search.pro file
3) Copy the path of the folder containing the assembly/part to search.pro and all of the sub-folders that do not contain a " " in their name.
I am guessing that I can then referance only the one search.pro file in my config.pro file and have my startup batch run this first, and then run proe.exe.
So, as an example, if I direct the "ProE" icon on my desktop to "c:\ptc\bin\this file.bat" and then have the following in the "thisfile.bat"
echo.c:\ProE_Projects\P2112 >search.pro !This is the path to the old project main folder
echo.c:\ProE_Projects\P1278 >>search.pro !This is the path to the new project main folder of the assembly I double clicked on.
dir /ad /s /b >>search.pro
@echo off
cd C:\PTC\Text !Location of the Config.pro and Search.pro files
"C:\PTC\bin\proe.exe" %* !Runs ProE
The last three lines are what I have in there now, as I understand it to direct ProE to the config file and then to run it. The config file has a search_path_file ".\Search.pro"setting in itto direct it to the search.pro file that is in the same main folder as the main assembly. I do not have search.pro for subassemblies as the part files are in the same folder as the assembly files. So far I have only had a project that had a main assembly of subassemblies. I haven't had to go any farther than that.
I hope what I am trying to do makes sense as I am trying to setup ProE to work as seemlesly as possible like I had in the past. Also, the bat file I had used previously was for WF2, I do not know if this will make a difference.
Thanks,
SEBNN