AnsweredAssumed Answered

c# FeatureExtrusionThin2 not creating bends

Question asked by Christopher Elyassi on May 30, 2018
Latest reply on May 31, 2018 by Christopher Elyassi

Hi all,

 

I have a c# SolidWorks API project I'm working on where I need to create a couple of mid-plane thin feature extrudes.

I wrote the method below that works perfectly except for the bends:

 

        public static void ExtrudeSketch_Thin(string SketchName, double value, double thickness, bool fillet, double filletRadius)
        {
            ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;
            SelectionMgr swSelectionMgr = swModel.SelectionManager;
            Feature swFeature;


            swModel.Extension.SelectByID2(SketchName, "SKETCH", 0, 0, 0, false, 0, null, 0);
            swFeature = swSelectionMgr.GetSelectedObject6(1, -1);
            swModel.FeatureManager.FeatureExtrusionThin2
                (true, false, true, 6, 6, value / 1000, 0, false, false, false, false, 0, 0, false, false, false, false, true, thickness / 1000, 0, 0, 2, 1, fillet, filletRadius, false, false, (int)swStartConditions_e.swStartSketchPlane, 0.0, false);
            swModel.ClearSelection2(true);
        }




 

(2016 SOLIDWORKS API Help - FeatureExtrusionThin2 Method (IFeatureManager)

 

The bends do not appear on the part despite being in the PropertyManager. So once the model is created I can open the PropertyManager for a specific thin feature extrude, close it (without making any changes) and only then will the bends appear. My usual hack of calling swModel.ForceRebuild3(true); an ungodly amount of times doesn't make any difference here.

 

Any thoughts?

 

Thanks!

Chris (SW16 x64 SP 4.0)

Outcomes