Here is my goal, Import AutoCAD 3DFACES to Solid
1) The Import routine is ok.
2) Then I would like to convert my 6 faces into a solid body
In Inventor GUI "Repair/Stich" works fine, but API doesn't seem to expose a Stich method...
The best I obtain is Creating a "NonParametricBaseFeature",
But then the KnitFeature best response is "The method as failed". It works fine in the GUI.
I'm on Win7 x64 VBA (Then I will convert it to a lovely DotNet AddIn)
Here is my code:
Sub CreateNonParametricFeature(oDef As ComponentDefinition, oSrfBodies As SurfaceBodies) ' Create a non-parametric base feature based on the transient body. Dim oTransBRep As TransientBRep Set oTransBRep = oInvApp.TransientBRep Dim oFeatureDef As NonParametricBaseFeatureDefinition Set oFeatureDef = oDef.Features.NonParametricBaseFeatures.CreateDefi
nition Dim oCollection As ObjectCollection Set oCollection = oInvApp.TransientObjects.CreateObjectCollection oCollection.Add oSrfBodies.Item(1) oFeatureDef.BRepEntities = oCollection oFeatureDef.OutputType = kCompositeOutputType Dim oBaseFeature As NonParametricBaseFeature Set oBaseFeature = oDef.Features.NonParametricBaseFeatures.AddByDefin ition(oFeatureDef) 'Knitting the NonParametricBaseFeature Dim oFacesCollection As ObjectCollection Set oFacesCollection = oInvApp.TransientObjects.CreateObjectCollection Dim I As Integer For I = 1 To oBaseFeature.SurfaceBodies.Count Call oFacesCollection.Add(oBaseFeature.SurfaceBodies.It em(I)) Next I Dim oKnitFeature As KnitFeature Set oKnitFeature = oDef.Features.KnitFeatures.Add(oFacesCollection) End Sub
The Knit sample help code works, but not mine Is there a bug somewhere in my code?
I've verified that this is a problem. I've raised the priority of the change request, but can't say when a solution might be available.
Access a broad range of knowledge to help get the most out of your products and services.