Edit trail file to use a current directoy
Edit trail file to use a current directoy
(OP)
I have created an Excel file with some data entry fields and a button. Clicking the button opens Pro/E with a trial file which imports the data and makes changes to the part based on the Excel file. Basically it is a graphic calculator that runs an analysis on the part based on the Excel values.
My problem is that I need to pass this on to other people. Currently it works fine in the directory I was originally using when I created the trail file. If I move the file or rename the folder, the trail file no longer points to a valid location. I need a way to go back and edit the file to have it use the current directory so anyone can run it no matter what computer they are on.
Thanks to anyone who can help
My problem is that I need to pass this on to other people. Currently it works fine in the directory I was originally using when I created the trail file. If I move the file or rename the folder, the trail file no longer points to a valid location. I need a way to go back and edit the file to have it use the current directory so anyone can run it no matter what computer they are on.
Thanks to anyone who can help





RE: Edit trail file to use a current directoy
The only reference to a path name is in the trail file as follows:
#READ FILE
!%CPEnter file name [Quit]
!%TR
C:\path\data.txt
(I shortened the path name down to \path\ for this post)
Other places it says `Current Dir` rather than listing a path. I need a way to get C:\path\data.txt to become something like `Current Dir` & \data.txt.
RE: Edit trail file to use a current directoy
http
RE: Edit trail file to use a current directoy
I noticed in the trail file already there are lines saying 'Current Dir' so I figured there must be a way to use this right in the file.
RE: Edit trail file to use a current directoy
Peter Stockhausen
Senior Design Analyst (Checker)
Infotech Aerospace Services
www.infotechpr.net
RE: Edit trail file to use a current directoy
The ways to do this would be:
Substitute a 'Current Dir' type line into the trail file, which I am not sure is possible and if it is I dont know the syntax
or
Have excel open the trail file and replace the line with the current directory path of the trail file (ActiveWorkbook.Path & '\trail.txt'). I cant figure out how to do this either though. I have found several examples using FileSystemObject, which isnt working for me.
I have vb 6.5 and WF 4.0 M090.
RE: Edit trail file to use a current directoy
I have excel import my trail file as a sheet in the excel file. It then goes to the cell where the file path is and changes the value to the active path. It then exports this file back out and saves it.
Thanks for the pointers.
RE: Edit trail file to use a current directoy
RE: Edit trail file to use a current directoy
http
RE: Edit trail file to use a current directoy
http://www.proe.net/group/vbapi