09-12-2022
07:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-12-2022
07:26 AM
Hi @WCrihfield . Thank you for your reply.
Here's a simplified example of what I'm trying to do.
In this example, I select the reference face, the part is fully unfolded and then the part is refolded.
I wish I could select just one bend for refolding. The oBends objectCollection would only contain the selected bend.
Do I have to select a face that belongs to the bend and from there find the FlatBendResult?
Sub main() Dim oPartDoc As PartDocument = ThisApplication.ActiveDocument Dim oSMCD As SheetMetalComponentDefinition = oPartDoc.ComponentDefinition Dim oSMF As SheetMetalFeatures = oSMCD.Features Dim oBends As Inventor.ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection Dim oFace As Face oFace = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities,"Sélectionner la face de référence") oSMF.UnfoldFeatures.Add(oFace) MessageBox.Show("refold") For i = 1 To oSMCD.FlatPattern.FlatBendResults.Count oBends.Add(oSMCD.FlatPattern.FlatBendResults.Item(i).Bend) Next oSMF.RefoldFeatures.Add(oFace,oBends) End Sub