How to extract CAD documents from SolidWorks?

Hi
We are planning to extract CAD documents from SolidWorks, can you please help me with steps how to extract the Assembly, Part and Document (file) information using APIs? Also, help me with what are the prerequisites.
SolidworksApi/macros