Hide Table of Contents
InsertMidSurface Method (IFeatureManager)

Inserts a midsurface feature.

.NET Syntax

Visual Basic (Declaration) 
Function InsertMidSurface( _
   ByVal PBodyIn As Body2, _
   ByVal PPartDocIn As ModelDoc2, _
   ByVal Placement As Double, _
   ByVal KnitFlag As Boolean _
) As Object
Visual Basic (Usage) 
Dim instance As IFeatureManager
Dim PBodyIn As Body2
Dim PPartDocIn As ModelDoc2
Dim Placement As Double
Dim KnitFlag As Boolean
Dim value As Object
value = instance.InsertMidSurface(PBodyIn, PPartDocIn, Placement, KnitFlag)
object InsertMidSurface( 
   Body2 PBodyIn,
   ModelDoc2 PPartDocIn,
   double Placement,
   bool KnitFlag
Object^ InsertMidSurface( 
&   Body2^ PBodyIn,
&   ModelDoc2^ PPartDocIn,
&   double Placement,
&   bool KnitFlag


Body in the context of an assembly; otherwise, NULL or Nothing (see Remarks)
Model document in the context of an assembly; otherwise, NULL or Nothing (see Remarks)

Value from -1 to 1 that indicates the desired location of the midsurface relative to the face pair; a value of 0.0 places the midsurface equally between the face pair


True to sew all the reference surfaces (neutral sheets) into a single sheet (surface) body, false for the midsurface feature to contain individual reference surface geometry

Return Value

Newly created midsurface feature



The pPartDocIn parameter is the component's model document where you want to add the midsurface feature, and the pBody parameter is the body of that component.

A midsurface feature is calculated from the solid body in your part document. This method first finds all parallel pairs of faces from the part solid. For each pair of parallel faces found, it creates a neutral reference surface between the two faces. The placement position of the reference surface is controlled by the placement parameter. This process repeats itself until all parallel body faces are processed. At the end of this process, all the reference surfaces are sewn into a single reference surface if knitFlag is set to true.

The hierarchy of a midsurface feature is:

A midsurface feature contains one or more reference surfaces. If sewn successfully using the KnitFlag = True option, then the midsurface feature contains only one reference surface. Each reference surface is considered a sheet body. The sheet body has the normal topology that you would expect to find on a body object (for example, faces, edges, and so on). See IMidSurface3 for methods that provide access to this topology.


See Also


SolidWorks 2009 FCS, Revision Number 17.0

Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

Subject:   Feedback on Help Topics
Page:   InsertMidSurface Method (IFeatureManager)
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:


We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again

Web Help Content Version: API Help (English only) 2010 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.