Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi,
Currently I am exploring the Smart assembly in the creo for the automation purpose but I facing one hurdle, I am not able to set the working directory (for the part of Creo) .
It would be great if somebody helps me out in these.
Below is my snap of the code which I have wrote to do this things.
Regards,
Use lowercase for the filter.
By the way, you can directly load the model without waiting for the user with the RETRIEVE_MDL command:
If you want to show it as well, add SWITCH_TO_MDL:
Thank you @TomU for helping me in loading the part it worked for me.
Can you pl. help by letting me know how to set working directory as I have tried but it doesn't work.
In setting the working directory path as my program "set_working_directory" code line is showing the error.
Regards,
Yes, I get the same error when attempting to access a folder in my Windows user profile. I'm guessing it's a permissions issue? Might also be a bug. I'll go ahead and open a case with tech support and see what they say.
On the other hand, I don't have any problem if I try to set the working directory to someplace else:
GET_WORKING_DIRECTORY dir
PRINT "Current working directory: %" dir
SET_WORKING_DIRECTORY "C:\ptc\workspaces\Build"
GET_WORKING_DIRECTORY dir
PRINT "New working directory: %" dir
Simple test to see if it is permissions is to create a file in that folder.
Okay, it wasn't a permissions issue. From tech support:
The failing path have "\t" in it which is also used to add tabs in a string. This seems to be the main cause of the error you are facing.
Please try either by adding '@' before the path, for example SET_WORKING_DIRECTORY @"path" OR use double slash "\\" instead of single "\" as a separator in the path.
My path had a \t in it. Yours has a \b in it. Adding an @ symbol before the path should fix it:
SET_WORKING_DIRECTORY @"C:\Users\t....