Message 1 of 2
ContentCenter edit through InventorServer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have a problem. I'm trying to integrate Content Center with an ERP system. I wasn't sure if I could edit the Content Center database from the application level. I managed to do it by writing this test code:
Dim oInvApp As Inventor.Application = ThisApplication Dim oContentKsztal As ContentTreeViewNode Dim oContentProfile As ContentTreeViewNode For Each oContentTree As ContentTreeViewNode In oInvApp.ContentCenter.TreeViewTopNode.ChildNodes If oContentTree.DisplayName = "Kształtowniki konstrukcyjne" oContentKsztal = oContentTree End If Next For Each item1 As ContentTreeViewNode In oContentKsztal.ChildNodes If item1.DisplayName = "Rury kwadratowe/prostokątne" oContentProfile = item1 End If Next Dim profileStalowe As ContentFamily For Each item3 As ContentFamily In oContentProfile.Families If item3.DisplayName = "KRATKI PROFILE STALOWE S235JRH" profileStalowe = item3 End If Next Dim listParam As List(Of String) = New List(Of String) From {"32","54", "4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "S235JR", "", "", "", "", ""} profileStalowe.TableRows.Add(listParam.ToArray(),profileStalowe.TableRows.Count+1) profileStalowe.Save
When I try to transfer this to Vault as a job processor task, where I'm using Inventor.Server, I unfortunately get an unspecified error. I cant define ContentCenter object.
private void mTestMethod(IJobProcessorServices context, IJob job)
{
InventorServerObject mInv = context.InventorObject as InventorServerObject;
DesignProject designProject = mInv.DesignProjectManager.DesignProjects.AddExisting("C:\\xxxx\\xxx.ipj");
designProject.Activate();
ContentCenter CC = mInv.ContentCenter; // <--- error
Has anyone ever encountered this problem or knows how to approach it?