Hi,
I'm writing a C# application that uses Document Manager to analyze parts and assemblies and I want to show the preview bitmap of each file. Here is a code snippet (swDoc is a SolidWorks part or assembly file already opened with Document Manager):
swCfgMgr = swDoc.ConfigurationManager;
cfgName = swCfgMgr.GetActiveConfigurationName();
swCfg = swCfgMgr.GetConfigurationByName(cfgName) as SwDMConfiguration;
SwDmPreviewError result;
Object prevw = swCfg.GetPreviewBitmap(out result);
When I run it, I get this error on the last line:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
I am running on a 64-bit Windows 7 machine and I am using Visual Studio 2010. We have SolidWorks 2010 SP4.
Any idea why I'm getting this error? Am I doing something wrong?
Thanks,
Tom