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

We are troubleshooting an issue impacting community login, and it may be intermittently unavailable. Sorry for any inconvenience.

Working Directory in Creo\ ProE

ErikZabokrtsky
9-Granite

Working Directory in Creo\ ProE

I am having some problems trying to get the working directory to set to the proper folder. I have two batch files wrote, one for network install and one for local computer install.

On the local computer install I can't get the working directory to set right. Whatever I put in the "Start In" box in the Properties tab for the shortcut, is where it always defaults to. However in my batch file I have it set to look at username and designate the working directory based off of who is logged in... This works fine in the network install. the only difference between the two batch files is the Pro E Load Point. The rest is exactly the same. Both load Pro E perfectly with configs and mapkeys. Only difference is I can't get the Working directory to set per user.

I know you can go to File and Set Working Directory but I don't want my users to have to do this everytime so I'm looking for a shortcut and don't understand why it is not working.

Any Help would be greatly appreciated.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

Accepted Solutions

Hi Erik...

Here's what I see... in no particular order:

What is "localdrive" doing? Why is it just "c:" when your "homedrive" is set to "x:\" I don't see localdrive being used anywhere but it doesn't have the same backslash in it. Does this variable come into play elsewhere? If so, maybe this is the issue.

Why is "HOME" being set twice? Right beneath the "localdrive" line, your set HOME equal to \\landoll-eng\cadadm\wildfire5\config. Then later you reset it to %HOMEDRIVE%%HOMEPATH%. Is this intentional?

And finally I think this is your answer... after you check for the existence of the %startupdir% path (and make it if it doesn't exist), add this line:

cd %startupdir%

Literally I think this will fix your problem. Pro/E is inheriting the "startup" location from the shortcut. This is default functionality. The only way to override it, is to change directories within your script. That when when Pro/E fires up, the directory is pre-set to the "startupdir" location. This should do the trick.

Also... if you're in WF5, remember when you hit "File>Open", the menu defaults to the users' "Documents" directory but the working directory should still be set to "Startupdir". I double checked this and it works on my end. Let me know if it does anything for you.

Good luck!!

-Brian

View solution in original post

6 REPLIES 6

I was noticed on Windows 7 64 bit that when space sign " " appear somewhere inside working directory path - the rest after space will be ejected and results of the batch files ore wrong. It was tested and confirmed during modifying postprocessor lists, so maybe in your case this info helps a little...

I thought that this might be it so I went through and renamed all the folders in the path name to either use a - or _ instead of a space. This corrected a couple issues but no help with the Working Directory. I can upload the Batch file for you to look at...

Hi Erik...

Here's what I see... in no particular order:

What is "localdrive" doing? Why is it just "c:" when your "homedrive" is set to "x:\" I don't see localdrive being used anywhere but it doesn't have the same backslash in it. Does this variable come into play elsewhere? If so, maybe this is the issue.

Why is "HOME" being set twice? Right beneath the "localdrive" line, your set HOME equal to \\landoll-eng\cadadm\wildfire5\config. Then later you reset it to %HOMEDRIVE%%HOMEPATH%. Is this intentional?

And finally I think this is your answer... after you check for the existence of the %startupdir% path (and make it if it doesn't exist), add this line:

cd %startupdir%

Literally I think this will fix your problem. Pro/E is inheriting the "startup" location from the shortcut. This is default functionality. The only way to override it, is to change directories within your script. That when when Pro/E fires up, the directory is pre-set to the "startupdir" location. This should do the trick.

Also... if you're in WF5, remember when you hit "File>Open", the menu defaults to the users' "Documents" directory but the working directory should still be set to "Startupdir". I double checked this and it works on my end. Let me know if it does anything for you.

Good luck!!

-Brian

Thanks Brian! The last part was actually my problem... I found that earlier today but wasn't sure what the reason was behind why it fixed the issue.

As for the rest of it I really have no idea what the localdrive command is doing. I am an IT person that really got thrown in to ProE and I am trying to learn on the go the best I can. I really appreciate the post and it clears up a few issues that I was trying to figure out.

Is there any place that offers like ProE Administration courses of any type?

Hi Erik...

Unfortunately no, most of the Pro/E Admins that have any experience won it the hard way. If you have questions, feel free to toss 'em out there. I'll try to help. I considered trying to create an admin class at one time but there was so little interest, I never pursued it.

PTC may offer something but I wouldn't count on it. Like most Pro/ENGINEER topics, you can read a manual or take a class but these don't help too much. They give you a basic orientation and you're left to figure the rest out yourself. The software is so powerful and complex that it's difficult to "teach" it.

Groups like this are probably your best bet. I feel your pain being thrown into the admin role with little background or training. Good luck!!

-Brian

Thank you.

The setting of startup directory value in batch file fixed our issue on VDI.

Thanks you once again!!!

Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags