- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I maintain a model generator. (This is an addin in Inventor) One of the steps in the generator process is to delete browser folders (and the Occurrences in the folder) from the assembly. That works fine for the last years. That looks something like this:
But I want the generator to run as a custom job on the job server. Therefore I need to use the InventorServer object that I get from the job server. (Because of that I did run in to some problems but I could work around them.) Except for BrowserPanes object (which I need to get the BrowserFolder object). I have this code:
Private Function GetTopNode(oAsmDoc As AssemblyDocument) As BrowserNode
Dim t = oAsmDoc.BrowserPanes
Dim oPane = oAsmDoc.BrowserPanes("Model")
Return oPane.TopNode
End Function
line 2 is only there for testing purposes but is also the line where Inventor throws an exception! (The actual line that is not for testing but also throws an exception is on line 3)
I found this post by @Markus.Koechl. He writes that the BrowserPanes object is an UI object and therefore should not be used by the InventorServer. I understand this comment but I don't know of any other way to target the occurrences in the folder. I'm hooping that there is an other object that holds the occurrences in a folder. (Maybe a hidden iProperty??)
Of course, I could add attributes those occurrences and find them that way. But the point is that we already have a lot of assemblies with folder that work that way. Updating all of those will not be "pleasant"... Furthermore, these assemblies are made/maintained by people that do not have the tools to add those attributes. So that would not be a sufficient solution
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
Solved! Go to Solution.