Message 1 of 3

Not applicable
10-21-2019
01:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Through API (currently debugging through an application that latches into our Inventor application) I am extruding a cut into a part within an assembly and everything is working fine up until when i want to mirror that cut across the XY Plane. Normally, I'd expect an invalid input error or something when something like a "createDefinition" fails, however my code below is showing my mirrorFeatureDefinition is simply not being populated by MirrorFeatures.CreateDefinition and it's not erroring out unitil it tries to "AddByDefinition" due to the mfd being nothing. I've verified that the extrude works, it can find that XY Plane and I'm able to do the mirror feature by hand. Any ideas?
My code:
'note: my EFD is valid and the extrude is constructing... Dim objcol As ObjectCollection = app.TransientObjects.CreateObjectCollection() objcol.Add(assydoc.ComponentDefinition.Features.ExtrudeFeatures.Add(efd)) MsgBox(objcol(1).ToString) Dim mfd As MirrorFeatureDefinition = assydoc.ComponentDefinition.Features.MirrorFeatures.CreateDefinition( objcol, assydoc.ComponentDefinition.WorkPlanes("XY Plane"), PatternComputeTypeEnum.kIdenticalCompute) '^ mfd is showing as null when i get to the line below... assydoc.ComponentDefinition.Features.MirrorFeatures.AddByDefinition(mfd)
Solved! Go to Solution.