Hide Table of Contents
Operations2 Method (IBody2)

Performs add, cut, and intersect (unite, subtract, and interfere) operations between two temporary bodies.

.NET Syntax

Visual Basic (Declaration) 
Function Operations2( _
   ByVal OperationType As Integer, _
   ByVal ToolBody As Object, _
   ByRef ErrorCode As Integer _
) As Object
Visual Basic (Usage) 
Dim instance As IBody2
Dim OperationType As Integer
Dim ToolBody As Object
Dim ErrorCode As Integer
Dim value As Object
 
value = instance.Operations2(OperationType, ToolBody, ErrorCode)
C# 
object Operations2( 
   int OperationType,
   object ToolBody,
   out int ErrorCode
)
C++/CLI 
Object^ Operations2( 
&   int OperationType,
&   Object^ ToolBody,
&   [Out] int ErrorCode
) 

Parameters

OperationType

One of the following operation types:

  • SWBODYADD

  • SWBODYCUT

  • SWBODYINTERSECT

ToolBody

Tool body

ErrorCode

Error indicator as defined in swBodyOperationError_e; returns swBodyOperationNoError if SolidWorks does not generate an error

Return Value

Array of pointers to the resulting bodies

Example

Remarks

If the target and tool bodies are the same in geometry, the result body of this method is NULL and the return value is S_false.

This method works with two temporary bodies; one is the target and one is the tool. The output is a list of bodies resulting from the operation.

The two temporary bodies used in this function (the Body2 and toolBody pointers) are invalid once the operation is complete. COM applications should release these two pointers after using this method. If your application needs to maintain these bodies, then you should make a copy of them using IBody2::Copy before passing them to this routine.

To perform a SWBODYINTERSECT between a sheet (surface) and a solid body, the sheet body must be the target body.

Use IBody2::Check3 for both bodies before using this method to ensure that both bodies are valid solids. Using this method with invalid bodies can cause unexpected results.

If a non-manifold error is returned, use IBody2::ResetEdgeTolerances to visit all of the edges in the body to reset their tolerances. Then use IBody2::Operations2 again.

 

See Also

Availability

SolidWorks 2001Plus FCS, Revision Number 10.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:   Operations2 Method (IBody2)
*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.