AnsweredAssumed Answered

Editing a Macro Program

Question asked by Marcos Nieto on Jan 8, 2015
Latest reply on Jan 8, 2015 by Marcos Nieto

Hello everyone!

 

This is my first time creating/editing/debugging a Macro Program, so please bare with me.

 

I am currently in the process of editing a Macro Program that I have created that saves a drawing into a PDF and DXF file simultaneously. However, when I run the program, it will save the PDF and the DXF file into my desktop, which is how I recorded the Macro originally. Here is how the line of code looks like:

 

longstatus = Part.SaveAs3("C:\Users\MNieto\Desktop\Cube.PDF", 0, 0)

 

longstatus = Part.SaveAs3("C:\Users\MNieto\Desktop\Cube.DXF", 0, 0)

 

However, I would like to know if I can edit these two lines in where it will save the PDF and the DXF into the folder where the drawing is originally located and name the DXF and the PDF files how the drawling is originally named as.

 

Any help will be greatly appreciated!

 

- Marcos

Outcomes