Basic information needed on using SolidWorks API for stand-alone C++ application

Hi everyone,

I'm new to this, so my apologies for asking simple questions. I'm trying to write a stand-alone application in C++ (using Visual Studio 2010) that will communicate with SolidWorks. However, before doing so I'd like to get a basic overview on the various structures available in the SolidWorks API. For example, I've found that I can use OpenDoc6 under swApp to open up a SolidWorks file. But what is the correct way to figure out what parts are located in that file? And how do I get the values for the dimensions of each part? I found some documentation on using IPartDoc and IFeature, but I'm not sure how these calls specifically work.

Specifically, let's say that I've opened a *.SLDPRT file (passed in as "sPartName") using OpenDoc6:

CComPtr swModel;

long fileError, fileWarning;

HRESUT hres = NOERROR;

CComBSTR sDefaultConfiguration(L"Default");

hres = swApp->OpenDoc6(sPartName, swDocPART, swOpenDocOptions_Silent, sDefaultConfiguration, &fileError, &fileWarning, &swModel);

What is the next step to figure out how many parts are in this file? And then the step after that to figure out how many dimensions are associated with each part? Thanks in advance for your help!

SolidworksApi macros