- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I work as engineer for a company that makes electric motors.
There are alot of combinations possible creating electric motors (flanges, sizes, shafts).
I have recieved all variant parts of these motors as 3D file, instead of manually adding them thogether for every request i want to make an automated Inventor model. I am trying to make a proof of concept for this.
A motor model always consists of 5 parts;
- Front Flange
- Rear shield
- Body
- Connection box
- Shaft
I thought of using i-mates combined with i-logic to add the parts into an assembly, however i can't get it work properly;
For some reason the flange, body & rear shield are placed correctly. But the shaft and connection box aren't.
I triple checked the i-mates on the shaft, which are only 2 mates, i just don't understand why it get's placed incorrectly....
I added the files for generating 1 simple motor.
The code i use i pretty plane so far;
Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oACD As AssemblyComponentDefinition = oDoc.ComponentDefinition
Dim oParts(0 To 4) As String
oParts(0) = "DN71-B"
oParts(1) = "DN71-C"
oParts(2) = "DN71-A-F120"
oParts(3)= "DN71-F"
oParts(4)= "DN71-E"
For Each item In oParts
oACD.Occurrences.AddUsingiMates("C:\Data\Werkmap\animatie\K met ratio\" & item & ".ipt", False)
InventorVb.DocumentUpdate()
Next
Thanks in advance ![]()
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
After more than an hour i found out the problem.
Using i mates is a good solution, just make sure your origins are matched and pay very close attention to the mate type and direction.
Doing any of the above wrong will result in an unexpected result/auto-generated mate. This made finding the problem diffecult since you get put on the wrong foot.
The result simply isn't a direct result of your own actions, but it's the result of Inventor trying to solve the conflicting input you gave it, leading to an unexpected outcome.