Unable to get ContentTreeViewNode by API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am struggling to get the ContentTreeViewNode object filled correctly. I set Category="Fasteners"
Public Class SearchCC #Region "Properties" Dim IU As New InventorUtils Private _PartNames As New Collection Private _tvNodeTop As ContentTreeViewNode = Nothing ...
... 'top of tree view to start searching in Content Center Private _TopNodeName As String = "" Public Property TopNodeName() As String Get Return _TopNodeName End Get Set(ByVal value As String) _TopNodeName = value End Set End Property Private _Category As String = "" Public Property Category As String Get Return _Category End Get Set(ByVal value As String) _Category = value If value <> "" Then _tvNodeTop = IU.CC.TreeViewTopNode.ChildNodes.Item(_Category) <---- line 45 End If End Set End Property
============================================
I receive the following error:
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147467259
HResult=-2147467259
Message=Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
Source=""
StackTrace:
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.ContentCenter.get_TreeViewTopNode()
at OpenVault_CopyCC.SearchCC.set_Category(String value) in C:\vb\Parker.Weers.CAD.OpenVault_CopyCC\OpenVault_CopyCC\OpenVault_CopyCC\Class\SearchCC.vb:line 45
at OpenVault_CopyCC.Module1.Main() in C:\vb\Parker.Weers.CAD.OpenVault_CopyCC\OpenVault_CopyCC\OpenVault_CopyCC\Module1.vb:line 11
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, S
tring[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
============================================
All examples I can find forward a string as category name, so what am I overlooking here?
Best regards,
Maarten Weers