I am trying to accomplish something similar and I am just getting started. I have a closed 3D sketch that was created by converting entitles along the edge of my solid model and I need to export it as XYZ points to a Notepad/text file. Is there any chance you would be willing to share what you have cobbled together so far?
My current progress isn't impressive, unfortunately. It involves the Point, Convert Entities, and Split Entities tools, and a macro that I linked in the original post. Here is an album I made some time ago after I first figured out a method:
and here is the macro I use to pull the points out of SolidWorks:
Best of luck to you, and please do share any progress or improvements you make on this current method.