referencing active document when saving out configurations as IGES

I used the SW macro recorder to create a program that will save out 3 different configurations in an assembly to IGES format for programming. From what I can tell, the macro does what it should, except for referencing the open or current document. I tried to run the macro on another assembly with the same configurations and it worked, but it saved to the original file location that I used to record the macro. I assume this is a relatively easy fix, I just don't know the call out for the macro to reference the active or open file location. any help is greatly appreciated. Thanks!

SolidworksApi macros