AnsweredAssumed Answered

Macro to Saves As, Reopen, Update Properties, Save, Close

Question asked by Jonathan Westcott on Jan 12, 2018
Latest reply on Jan 16, 2018 by Jonathan Westcott

Below is a section of a macro I am currency working that dependant up file type runs a save as.

What I am looking to do after this section of code is to open the document that has been saved in order to make changes to the custom properties programmatically.

 

Select Case swModel.GetType       

            Case swDocPART

                 swModel.Extension.SaveAs Path & FileName & ".sldprt", swSaveAsVersion_e.swSaveAsCurrentVersion, swSaveAsOptions_e.swSaveAsOptions_Silent, Nothing, 0, 0

            Case swDocASSEMBLY

                 swModel.Extension.SaveAs Path & FileName & ".sldasm", swSaveAsVersion_e.swSaveAsCurrentVersion, swSaveAsOptions_e.swSaveAsOptions_Silent, Nothing, 0, 0

            Case swDocDRAWING

                swModel.Extension.SaveAs Path & FileName & ".slddrw", swSaveAsVersion_e.swSaveAsCurrentVersion, swSaveAsOptions_e.swSaveAsOptions_Silent, Nothing, 0, 0

End Select

 

I'm guessing that I need to use the Open6 call to do this but that requires that you know the path.

My question is how do I record/retrieve the save destination of the Save As call so that I can then use it for the Open6 location?

 

Assuming that I have to push this to a variable before/after save as?

 

Outcomes