Hide Table of Contents
InsertCavity4 Method (IAssemblyDoc)

Inserts a cavity to the active part using a selected component.

.NET Syntax

Visual Basic (Declaration) 
Sub InsertCavity4( _
   ByVal ScaleFactor_x As System.Double, _
   ByVal ScaleFactor_y As System.Double, _
   ByVal ScaleFactor_z As System.Double, _
   ByVal IsUniform As System.Boolean, _
   ByVal ScaleType As System.Integer, _
   ByVal KeepPieceIndex As System.Integer _
Visual Basic (Usage) 
Dim instance As IAssemblyDoc
Dim ScaleFactor_x As System.Double
Dim ScaleFactor_y As System.Double
Dim ScaleFactor_z As System.Double
Dim IsUniform As System.Boolean
Dim ScaleType As System.Integer
Dim KeepPieceIndex As System.Integer
instance.InsertCavity4(ScaleFactor_x, ScaleFactor_y, ScaleFactor_z, IsUniform, ScaleType, KeepPieceIndex)
void InsertCavity4( 
   System.double ScaleFactor_x,
   System.double ScaleFactor_y,
   System.double ScaleFactor_z,
   System.bool IsUniform,
   System.int ScaleType,
   System.int KeepPieceIndex
void InsertCavity4( 
&   System.double ScaleFactor_x,
&   System.double ScaleFactor_y,
&   System.double ScaleFactor_z,
&   System.bool IsUniform,
&   System.int ScaleType,
&   System.int KeepPieceIndex



Scaling factor in the x direction


Scaling factor in the y direction


Scaling factor in the z direction


True to use the first scale argument as the uniform scale, false to not


Type of scaling as defined in swCavityScaleType_e


Piece to keep if there is ambiguity



This operation is performed in the context of an assembly document. The component being edited in the context of the assembly receives the new cavity feature.

Set the scaleFactor argument as appropriate for your casting material. The scaling factor is expressed as a percentage (+/- 20%) of the size of the cavity part. Pass it in as a value within the range of -20 to +20.

SOLIDWORKS uses the following formula to determine the size of the cavity:

cavitysize = partsize * (1 + scaleFactor/100)

When there is ambiguity in the result of a cut, SOLIDWORKS uses KeepPieceIndex to determine which result to use. You can set this parameter to -1 if there is no ambiguity; otherwise, you should use the index of the result, in the range between 0 and 1 less than the possible number of outcomes.



See Also


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

Subject:   Feedback on Help Topics
Page:   InsertCavity4 Method (IAssemblyDoc)
*   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) 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.