Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,All.
I'm trying to trim SolidBody with SurfaceBody, but an error occurs.
In the case of using WorkSurface ,this code works.
Whats wrong with this code?
Sub Trim_Solid() Dim oDoc As PartDocument Set oDoc = ThisApplication.ActiveDocument Dim oDef As PartComponentDefinition Set oDef = oDoc.ComponentDefinition Dim oFace As Face Set oFace = ThisApplication.CommandManager.Pick _ (SelectionFilterEnum.kAllEntitiesFilter, "Select a surface") Dim oSBody As SurfaceBody Set oSBody = oFace.Parent Dim oSplitFeature As SplitFeature Set oSplitFeature = oDef.Features.SplitFeatures.TrimSolid(oSBody, oDef.SurfaceBodies.Item(1), True) End Sub
Solved! Go to Solution.