12-21-2020
03:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-21-2020
03:29 AM
Try this code which allows you to select the faces first and then when you run the rule it will only thicken those which are selected. You can select one or multiple faces. Make sure you select the faces first and then only run the rule. If you get an error, try to comment the last line in the loop which is renaming thicken features, because if you run again and you have the same names it may result in an error.
Dim oDef As PartComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition Dim oSB As SurfaceBody = oDef.SurfaceBodies.Item(1) ' This is first solid after derive "Laminate" MessageBox.Show(oSB.Name) Dim oThickFeat As PartFeature Dim oFaceCol As FaceCollection = ThisApplication.TransientObjects.CreateFaceCollection i = 1 Dim oSS As SelectSet = ThisApplication.ActiveDocument.SelectSet For Each oFace As Face In oSS oFaceCol.Clear oFaceCol.Add(oFace) oSS.SelectMultiple(oFaceCol) oThickFeat = oDef.Features.ThickenFeatures.Add(oFaceCol, "5", kSymmetricExtentDirection, kNewBodyOperation, False) oThickFeat.Name = "Laminate" & i i = i + 1 Next
See if it works.
Regards,
Dutt Thakar
If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!
Regards,
Dutt Thakar
LinkedIn
Regards,
Dutt Thakar