Hi
I currently loop through my assembly and get iProperties using the AllLeafOccurrences method. I now need to do the exact same, but using apprentice so that the file doesnt open.
Reason:
I use the apprentice method to get a collection of file names and iproperties and populate a datagrid. This is super fast. When i iterate through my assembly as a normal document, the iteration is very slow compared to the apprentice iteration.
The only thing i cannot get working is my loop using Apprentice. Can it be done? I thought that once the document was opened by apprentice, you could access everything in the same way as you would if it was opened directly.
Dim apprentice As Inventor.ApprenticeServerComponent = New ApprenticeServerComponent Dim apprenticeDoc As Inventor.ApprenticeServerDocument = apprentice.Open(AssemblyPath) Dim oasmdef As ComponentDefinition = apprenticeDoc.ComponentDefinition Dim oLeafOccs As ComponentOccurrencesEnumerator = oasmdef.Occurrences.AllLeafOccurrences For Each oCompOcc As ComponentOccurrence In oLeafOccs
'EVERYTHING FROM HERE DOES NOT WORK
Nacho
Automation & Design Engineer
Inventor Programmer (C#, VB.Net / iLogic)
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.
Hello,
can you explain what is not working cause from here, when I try your code, everything is fine.
Best regards,
It's hard to troubleshoot when you only give us the working part of your code..... ha!