What's new

How to save a part when the first character in a path folder name is an integer

This is probably simple but I haven't been able to figure out how to save an Alibre part file when a sub-directory name starts with a number. The path includes a folder with this name: . . . \3D CAD\ . . . , which produces an illegal character error. I have tried various things without success. Any ideas on this? Thanks!
 
Stefan, thanks for the reply. Unfortunately, I can't open the part file that you sent. I have both v25 and v26 running under Windows 7 Pro, but I don't know if Windows 7 is the problem, or not. Anyway, I take it that you were able to save a part to folder with a name starting with a number, which is interesting! I should have posted some of the script that I was trying to use. It came from the Quick Start tutorial from the Alibre website, and started and ended with:

MyPart = Part('SHCS 5mm x 20mm')
. . . . .
MyPart.Save("C:\Dave\3D CAD\Alibre Design Expert 25\Projects\Exercises\Parts")
MyPart.Close(),

which runs fine when I use . . . \D3 CAD\ . . . So I'm puzzled! Thanks for looking into it.

Regards, Dave
 

idslk

Alibre Super User
MyPart.Save("C:\Dave\3D CAD\Alibre Design Expert 25\Projects\Exercises\Parts")
Just add an r to your save statement in front of the folder name: MyPart.Save(r"C:\Dave\3D CAD\Alibre Design Expert 25\Projects\Exercises\Parts")

Regards
Stefan
 
Stefan and Simon, thanks for the help: the "magic r" did the trick! And you are right Simon: among the errors that I got for the various things that I tried was "unexpected token 'D' ". Thanks, again!

Regards, Dave
 
Top