Message 1 of 2

Not applicable
08-28-2020
01:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Need help to create a sculpt feature.
I would like to use 2 or more workplane (using their names) but dont know how to make a collection of workplanes. The code below only works for one.
'reference to the part document Dim oDoc As Document = ThisApplication.ActiveDocument Dim oDef As PartComponentDefinition = oDoc.ComponentDefinition 'List of work planes to use Dim xyPlane As WorkPlane = oDef.WorkPlanes.Item("XY Plane") Dim yzPlane As WorkPlane = oDef.WorkPlanes.Item("XY Plane") 'features collection Dim oFeatures As PartFeatures = oDef.Features 'surfaces collection Dim oSurfaces As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection() 'For Each osurface As WorkSurface In oDef.WorkSurfaces ' oSurfaces.Add(oFeatures.SculptFeatures.CreateSculptSurface(osurface, PartFeatureExtentDirectionEnum.kNegativeExtentDirection)) 'Next oSurfaces.Add(oFeatures.SculptFeatures.CreateSculptSurface(yzPlane, PartFeatureExtentDirectionEnum.kNegativeExtentDirection)) 'create sculpt feature Dim oSculpt As SculptFeature = oFeatures.SculptFeatures.Add(oSurfaces, PartFeatureOperationEnum.kCutOperation)

Solved! Go to Solution.