Hide Table of Contents
IOperations2 Method (IBody2)

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

.NET Syntax

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

Parameters

OperationType

Operation type as defined in swBodyOperationType_e

ToolBody

Pointer to the tool body

ErrorCode

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

Return Value

Resulting bodies enumeration

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::ICopy before passing them to this routine.

To perform a swBodyOperationType_e.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:   IOperations2 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) 2015 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.