Working directory

Discussion in 'Pro/Engineer & Creo Elements/Pro' started by piearesquared2, May 13, 2005.

  1. How does one find out what the current working directory<path> is
    outside of ProE? Other than just seeing what is is off the title bar

    Or even passing the path info as a parameter.... &path or
    &working_directory???? there's &model_name.... but no full path

    I'm using r2001 , is this in WF

    Thanks
     
    piearesquared2, May 13, 2005
    #1
  2. checked the achives but don't see that there is one... question has
    been posed quite a few times.. is it in WF now?
     
    piearesquared2, May 13, 2005
    #2
  3. A solution....open system window.. batch file to write out or use set
    statement
    use that point the app back to the working directory
     
    piearesquared2, May 13, 2005
    #3
  4. piearesquared2

    David Janes Guest

    Seems like it might work, but kind of a roundabout way. Since you have the system
    window open anyway and the system window opens in the working directory, why not
    start your app from there. If you type notepad, for instance, notepad will open
    pointing to the working directory for file open/save functions. No special set or
    path statements required.
     
    David Janes, May 15, 2005
    #4
  5. What I wanting to do is to get Word and some other apps. to follow ProE
    around based on what ProE's current working directory is.


    I like keeping all the associated files that I might be using in the
    same directory, makes it soooo much easier when you have to go back and
    find something. It's a pain in the neck, really it's a pain somewhere
    else :) to have to keep changing the path on the other programs..
    would like something that a little more automagic. and in doing so one
    should also be able to drop a path note in a drawing since the working
    dir <path> is the key to the rest.

    Sure I could just have a folder open with explorer to wherever I had
    set my WD and go from there and tweakui is GREAT for setting that up
    and getting rid of some of those create new program that you never use.

    There are certainly methods to get it done, I'd like a mapkey that will
    manage it
     
    piearesquared2, May 15, 2005
    #5
  6. I did manage to get this to do what i was looking for and can use it to
    paste in a path note in a drawing too, left the mapkey for note out as
    it is pretty straight forward
    Now when I launch Word off quick launch, it has the macro command line
    edits.. it is running in the wd and looks there for files and pictures

    Stu.. I'll try your method on some of these apps that don't have the
    marco option..Thanks All :)

    1. mapkey-----------------

    mapkey wd @SYSTEMC:\\proe2001\\batch\\workdir.bat;


    2. batch file--------------

    cd > c:\workdir.txt




    if you want Word to follow the working dir around then add this macro
    to normal.dot or template of your choice
    create shortcut- add space after .exe /mmacro1 and /ttemplatename if
    you use other than normal, might have to have
    the /ttemplatename before the macro part

    Sub Macro1()
    Open "c:\workdir.txt" For Input As #1
    Input #1, fstr
    Options.DefaultFilePath(wdDocumentsPath) = fstr
    Options.DefaultFilePath(wdPicturesPath) = fstr
    Close #1
    End Sub
     
    piearesquared2, May 16, 2005
    #6
  7. Thanks to all that helped in this, it has made my life much easier.
    This forum and the others is what it is all about
    Helping each other out.You hit that brick wall that you don't seem to
    be able to get around, post the question and behold before you know it
    there is a alternative that gets you going again. That old proverb "Two
    Head are Better than One" certainly is kicked up a notch :)
     
    piearesquared2, May 16, 2005
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.