Obtaining root component/active configuration of a drawing

Hello everyone,

I was wondering if any of you might be able to shed some insight into the following problem. I currently have a drawing open in SW2009 and am looking to get the assembly (or assemblies) root component associated with this drawing. This is the object of type IComponent2 and I use it with an assembly as follows:

pConfiguration = pModelDoc.IGetActiveConfiguration();

if (pConfiguration != null)
      { pRootComponent = pConfiguration.IGetRootComponent2(); }

The only problem is the IGetActiveConfiguration returns null for drawings. With that said does anyone have any suggestions on how to get the assembly(or assemblies) root IComponent2 from a drawing?

Thanks again,

Charles

SolidworksApi macros