Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: Anonymous

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

EESignature

(Not an Autodesk Employee)