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!

MERGE 2 MACRO

Status
Not open for further replies.

PAT44

Mechanical
Apr 4, 2012
12
CA
Hi,
I have 2 macro that are close to what I need. The first one is to open a browser to select in wich folder you want to save the active file as pdf. The second one is for changing material in all parts within the specified path.It open each part one by one, change material and save & close it.

What I need is to open browser to select the folder where it will open each document and, if it s a part, open new part template and insert the part, close old part and overwrite it with the new part. Same with assy, and copy all sheets and paste it into the new drawing template and overwrite it as well.

I m sure something can be done with it! But I m not so good with vba and api code.

Any ideas?
(the macro are available at save as pdf with folder selection and change bulk material)
 
Replies continue below

Recommended for you

Ok, I tried to create a new module and to call it...but I dont know why, it does not work. the browser is not displaying and the module dont play.

I replace the code into the change material macro for other things (I tried to open new part template and insert the part into it, close old part and overwrite it with the new one), but nothing work. I m not able to put the path into variable or something nor the name to save it.

I m poor to assign variable..!

 
yes, and it s not an easy thing. Do you know why when I use part.getpathname=x and I use Part.InsertPart2("X", 515) it dont work? The path is correct (i test it with a msgbox and it was right!), so i dont know!

Thanks for your time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top