In addition to Jason's suggestion if you are using 2014 you can use the SolidWorks method as well: ModelDocExtension::ToolBoxPartType. Here is the sample:
Otherwise you can only go with Document Manager API.
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
translationXpert – SolidWorks files language translator
Thank you both Jason and Artem for the suggestions.
I had neglected to search the document manager API but that method will work.
As we have not upgraded to 2014 yet I will have to use the DM for now.