How to keep Bend Part Features suppressed in a base part in a new derived part
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm in need of some help or advice with trying to suppress a few Bend Part Features in an iLogic part before deriving this part via an iLogic rule.
To briefly describe my part:
It is a flat plate part that is oblong, with two circular ends that I am utilizing the "Bend Part" feature to bend/form one direction and then bend/form again perpendicular to the first. I've tried to model this part using the "Sheet Metal" environment and I can only perform one fold/action similar to Bend Part. I'm assuming Inventor cannot perform complex or compound bends/folds and then be flattened.
To briefly describe my intent:
I want to be able to create a rule that will keep the "Bend Part" features from base part, suppressed in the new derived part. I have some code that I someone else on the forums had created, which works great if you did not have anything to modify after deriving. I think I'm going the right direction with code but I'm failing 😞
Thanks in advance
Hear is my snippet of code...
Dim sTemplatePart As String sTemplatePart = "C:\VaultWork\Documents\Templates\Vessel\Part_template_Vessel.ipt" doc = ThisDoc.Document path_and_name = ThisDoc.PathAndFileName(False) ' without extension oQuestion = MessageBox.Show("Do you want to derive this file?", "iLogic",MessageBoxButtons.YesNo) If oQuestion = vbNo Then Return Else ' Create a new part file to derive the selected part into ' Note: kPartDocumentObject is the default template ' Note: If you want to use a custom template, set the path and filename of sTemplatePart Dim oPartDoc As PartDocument oPartDoc = ThisApplication.Documents.Add(kPartDocumentObject, sTemplatePart, True) Dim sTurnOffBendFeature As Boolean sTurnOffBendFeature = PartFeature.BendPartFeature.Suppressed(True) For Each BendPartFeature In ThisDoc BendPartFeature = sTurnOffBendFeature Next ' Create a derived definition for the selected part Dim oDerivedPartDef As DerivedPartUniformScaleDef oDerivedPartDef = oPartDoc.ComponentDefinition.ReferenceComponents.DerivedPartComponents.CreateUniformScaleDef(ThisDoc.PathAndFileName(True) ) ' set the scale to use oDerivedPartDef.ScaleFactor = 1 ''define the mirror plane ''kDerivedPartMirrorPlaneXY = 27393 ''kDerivedPartMirrorPlaneYZ = 27394 ''kDerivedPartMirrorPlaneXZ = 27395 'oDerivedPartDef.MirrorPlane = 27394 ' Create the derived part. oPartDoc.ComponentDefinition.ReferenceComponents.DerivedPartComponents.Add(oDerivedPartDef) 'Copy the iProperties from the assembly to the part ' Save the new derived part. oPartDoc.SaveAs(path_and_name & "_derived.ipt", False) oPartDoc.Close MessageBox.Show("New file created at:" & vbLf & path_and_name & "_derived.ipt", "iLogic") End If