I am using the Navisworks API for listing the clashes in C#.
But I get the error message.
[ERROR MESSAGE]
Unable to cast COM object of type 'System.__ComObject' to interface type 'NavisWorksAPI6.InwPluginsColl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D74F889B-01BA-11D5-A066-00B0D011BBC8}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
and source code is...
foreach (InwPlugin plugin in m_state.Plugins())
{
if (plugin.ObjectName == "nwOpClashElement")
{
m_clash = (InwOpClashElement)plugin;
return;
}
}
Solved! Go to Solution.
Solved by xiaodong_liang. Go to Solution.
Hi bnn987654321 ,
Which version you are using? The following C# code works well at my side on Navisworks 2011:
NavisworksAPI8.InwOpClashElement m_clash = null;
foreach (NavisworksAPI8.InwBase oPlugin in oState.Plugins())
{
if (oPlugin.ObjectName == "nwOpClashElement")
{
m_clash = ( NavisworksAPI8.InwOpClashElement)oPlugin;
break;
}
}
If you still have the problem, could you share a small, non-confidential sample?
Best regards,
Xiaodong Liang
Developer Consultant
Autodesk Developer Technical Services
i the same occur for me also. am using navisworks 2019 version .please help us to resolve
currently i am exporting a file using ifc exporter in navisworks manage 2019. the attached error pop ups once start exporting. please help