05-06-2020
11:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-06-2020
11:59 AM
Have you tried playing around with the Sketch.Profiles.AddForSolid() function's optional settings?
For example:
Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
Dim oSketch As PlanarSketch = oPDef.Sketches.Item(1)
Dim oProfilePathSegments As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection
For Each oProfileOption As Profile In oSketch.Profiles
If oProfileOption.RegionProperties.Area = 56 Then
oProfilePathSegments.Add(oProfileOption)
End If
Next
Dim oProfile As Profile = oSketch.Profiles.AddForSolid(False,oProfilePathSegments)
Dim oExtFeats As ExtrudeFeatures = oPDef.Features.ExtrudeFeatures
Dim oExtDef As ExtrudeDefinition = oExtFeats.CreateExtrudeDefinition(oProfile,PartFeatureOperationEnum.kNewBodyOperation)
Dim oExtFeat As ExtrudeFeature = oPDef.Features.ExtrudeFeatures.Add(oExtDef)
Wesley Crihfield
(Not an Autodesk Employee)