ExtrudeFeature failure on sketch edit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having an issue where bodies created by AddByDistanceExtent fail after editing the sketch.
I create a new part file, create a closed profile in a new sketch, close the sketch, and run the following code to create a new solid body from the selected sketch profile. If the sketch profile is later edited it will return an error "Profile geometry not found for this feature" and the extrusion will fail. This happens when editing the part in the assembly environment (always), and in the part environment (most of the time, but not always). If I double click the extrusion tree feature to re-select the sketch profile, this error does not reoccur. I've attached a test part created in this manner. This error has occurred on three different computers with different project files.
There must be something I'm doing wrong and it is driving me batty. I would appreciate any help.
'ilogic code
Dim oPartDoc As PartDocument = ThisApplication.ActiveDocument Dim oCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition Dim oProfile As Profile Dim oSketch As Sketch Dim oExtrude As ExtrudeFeature oProfile = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kSketchProfileFilter, "Pick a closed sketch region...") oExtrude = oCompDef.Features.ExtrudeFeatures.AddByDistanceExtent(oProfile, "0.25", kPositiveExtentDirection, kNewBodyOperation)
Thanks!