Hide Table of Contents
SetBody2 Method (IFeature)

Replaces an imported base feature body.

.NET Syntax

Visual Basic (Declaration) 
Function SetBody2( _
   ByVal BodyIn As Object, _
   ByVal ApplyUserIds As Boolean _
) As Boolean
Visual Basic (Usage) 
Dim instance As IFeature
Dim BodyIn As Object
Dim ApplyUserIds As Boolean
Dim value As Boolean
 
value = instance.SetBody2(BodyIn, ApplyUserIds)
C# 
bool SetBody2( 
   object BodyIn,
   bool ApplyUserIds
)
C++/CLI 
bool SetBody2( 
&   Object^ BodyIn,
&   bool ApplyUserIds
) 

Parameters

BodyIn

Temporary body that replaces the base feature body

ApplyUserIds

True applies user-defined face IDs, false does not

Return Value

True if the original body was successfully replaced, false if not

Example

Remarks

You must create the replacement body as an imported body using IBody2::CreateBodyFromSurfaces or IBody2::CreateTempBodyFromSurfaces, as a copy of an imported body generated by these methods, or using translation from IGES in, STEP in, and so on.

If this feature is not the base feature or the body is not an imported body, then the method returns false.

This method replaces the base body or ref-surface body if you created either of these features from imported geometry. If child features exist, then you can use IFace2::GetFaceId to set the face IDs to both the old body and the replacement body before calling IFeature::SetBody2. For example, if you are expecting a child feature on a face of the old body to be mapped to a face on the replacement body, you need to set the same ID (integer) to these two faces. This mechanism enables child features to re-attach themselves to the replacement body because IFeature::ISetBody3 cannot do this automatically.

If applyUserIds...

Then Feature::SetBodyw...

True

Tries to match the face IDs on the replacement body with IDs on the child features. This helps when re-attaching the features to the replacement body.

false

Replaces the original body with the replacement body. Face IDs are not be used to match up new faces with child features.

 

See Also

Availability

SolidWorks 2000 FCS, Revision Number 8.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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   SetBody2 Method (IFeature)
*Comment:  
*   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:



x

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
x

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.