Hi,
I use VB.NET and Apprentice to create a new assembly file from a template.
Is it possible to add part file to assembly?
This code works good without apprentice (and some changes) but the ComponentDefinition.Occurrences.Add method give me an NotImplementedException with Apprentice
Thanks for help.
Pascal
Solved! Go to Solution.
Solved by Gruff. Go to Solution.
Unless something has changed dramatically with 2012, Apprentice will not do what you want to do.
Apprentice has the ability to manipulate a very small sub set of the full Inventor API.
Adding parts to assemblies is not one of them.
Apprentice is limited to simple things like Printing Drawings, Manipulating iProperties or repointing existing assembly references to new locations. Not sure there is much beyond that.
Hi Gruff,
Is it possible to create an assembly file without opening Inventor?
Pascal
Not to my knowledge.
Typically if I want to maniplate inventor parts I write an application in Inventor VBA or as an Inventor Addin dll.
You can automate Inventor from VB.NET but it is: a) Slow and b) you are removed from environment. That is you have not control over or even know if a user changes something or shuts down inventor.
If you are familiar wth automation in VB.NET you know you must also deal with Marshalling and manual garbage collection.