Message 1 of 3
sheetmetal combinefeature
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I try to add a combine feature to a sheet metal. With the user interface it works fine, but with the API I get an error in the last line (see VBA code below and the attached file).
Any hints?
Public Sub CombineFeature()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oTObj As TransientObjects
Set oTObj = ThisApplication.TransientObjects
Dim oSheetMetalDef As SheetMetalComponentDefinition
Set oSheetMetalDef = oDoc.ComponentDefinition
Dim oSheetMetalFeatures As SheetMetalFeatures
Set oSheetMetalFeatures = oSheetMetalDef.Features
Dim baseBody As SurfaceBody
Set baseBody = oSheetMetalDef.SurfaceBodies.Item(1)
Dim toolBodies As ObjectCollection
Set toolBodies = oTObj.CreateObjectCollection
Call toolBodies.Add(oSheetMetalDef.SurfaceBodies.Item(2))
Dim combFeature As CombineFeature
Set combFeature = oSheetMetalFeatures.CombineFeatures.Add(baseBody, toolBodies, kCutOperation, False)
End Sub
Andreas
etaCAD