Message 1 of 2
Knit does not remove original surfaces

Not applicable
12-24-2015
02:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have 4 surfaces, which I wish to stitch together.
I pass those as worksurfaces to Knitfeatures.Add which cerates the result as 5th surface.
I wish the original 4 were deleted. Calling delete on them does not work either.
Private Sub stitchMidsurfaces() Dim oWorkSurfaces As ObjectCollection = _invApp.TransientObjects.CreateObjectCollection For Each ws As WorkSurface In m_partDoc.ComponentDefinition.WorkSurfaces oWorkSurfaces.Add(ws) Next Dim oSurfBodies As ObjectCollection = _invApp.TransientObjects.CreateObjectCollection For Each sb As SurfaceBody In m_partDoc.ComponentDefinition.SurfaceBodies If Not sb.IsSolid() Then oSurfBodies.Add(sb) End If Next Dim oKnitFeature As KnitFeature oKnitFeature = m_partDoc.ComponentDefinition.Features.KnitFeatures.Add(oWorkSurfaces) ' delete the original surfaces For Each ows As SurfaceBody In oSurfBodies ows.Delete() Next End Sub
Any clue?