Inserting sketch text in assembly component?

Hello everyone!

I have created a macro that will insert sketch text at the selected point based on userform parameters.  It works exactly how I wanted it to within part documents but I want to be able to use this within assemblies when do in 'in-assembly part edits'.  It works great for part files and great for assembly sketches...but when I am editing a part within an assembly the insertion point is way out of whack. If someone could please take a look at my macro and help me figure out how to make it work for both part and assembly files that would be great!!!

Thank you,

Evan

SolidworksApi macros