Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro for open and save a file with different name

Status
Not open for further replies.

akhtar07

Mechanical
Mar 8, 2015
59
AE
Greeting Guys,

I would like to generate a macro which will save a file with existing name and adding a suffix to it. The location of Save As should be the same for that folder.

E.g.

Suppose I want to save a file 84440-904, it is located in C:\Desktop\Folder
I want to save it as 84440-904-Alu in the same directory as given above.

I would really appreciate ur help on this guys, i have like 800 parts to rename and link drawings to them.

Warm regards,
Akhtar Aziz
 
Replies continue below

Recommended for you

This is a perfect example of why a macro is never the solution to the problem and always seeks to fix the symptoms of the problem, in this case the necessity to rename over 800 parts and re-link the drawings.

Don't think I'm just a jerk though I honestly can't assist you writing the correct macro to do this task.
 
@akhtar07
This thread has some good code to start with for creating a macro to do save as:
[URL unfurl="true"]http://www.eng-tips.com/viewthread.cfm?qid=347231[/url]

Check this post for re-linking drawing views:
[URL unfurl="true"]http://www.eng-tips.com/viewthread.cfm?qid=356588[/url]

There are several different ways to go about writing a macro to rename a large number of CATIA documents.



Regards,
Drew Mumaw
 
hi drewmumaw,

that script looks really nice but it's having the same lacking ... I don't want to have some particular location for those files, I want to open them and macro saves it where it was before.

I did one macro for PDF, it auto-generates the PDF and closes the document as well but you have to set one particular path for that.

Can it be done like macro saves it where it was before?

Warm regards,
Akhtar Aziz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top