I'm trying to create a sketch, then a fill surface based on that sketch using the code below. If I create a fill surface using a sketch in SolidWorks normally, the sketch appears as a child to the surface in the feature tree. However, when I do it via the API, the sketch stays where it is in the tree, and the surface appears right below it (not as a child). Is there a way to create the surface such that the parent/child relation is shown in the feature tree (sketch as a child to the fill surface)?
If I look at the parent/child viewer, the relation is correct, the surface is a child to the sketch (same for the API method and the manual method).
Any help would be appreciated.
SketchManagersketchManager = doc.SketchManager; ... sketchManager.CreateSplinesByEqnParams2(paramData); ... IFeatureManager featMan = doc.FeatureManager; int [] curvatureControlTypes = new int[] { (int)swContactType_e.swContact }; Sketch[] sketchBoundaries = new Sketch[] { sketchManager.ActiveSketch }; featMan.InsertFillSurface2(3, (int)swFeatureFillSurfaceOptions_e.swMergeResult, sketchBoundaries, curvatureControlTypes, null, null ); ... sketchManager.InsertSketch(true);
SolidworksApi macros