Hide Table of Contents
AddPartExplodeStep Method (IConfiguration)

Adds an explode step to the specified explode view of a multibody part.

.NET Syntax

Visual Basic (Declaration) 
Function AddPartExplodeStep( _
   ByVal ExplodeView As System.String, _
   ByVal ExplDist As System.Double, _
   ByVal ExplDirIndex As System.Integer, _
   ByVal ReverseDir As System.Boolean, _
   ByVal AutoSpaceBodiesOnDrag As System.Boolean, _
   ByRef Error As System.Integer _
) As System.Object
Visual Basic (Usage) 
Dim instance As IConfiguration
Dim ExplodeView As System.String
Dim ExplDist As System.Double
Dim ExplDirIndex As System.Integer
Dim ReverseDir As System.Boolean
Dim AutoSpaceBodiesOnDrag As System.Boolean
Dim Error As System.Integer
Dim value As System.Object
 
value = instance.AddPartExplodeStep(ExplodeView, ExplDist, ExplDirIndex, ReverseDir, AutoSpaceBodiesOnDrag, Error)
C# 
System.object AddPartExplodeStep( 
   System.string ExplodeView,
   System.double ExplDist,
   System.int ExplDirIndex,
   System.bool ReverseDir,
   System.bool AutoSpaceBodiesOnDrag,
   out System.int Error
)
C++/CLI 
System.Object^ AddPartExplodeStep( 
&   System.String^ ExplodeView,
&   System.double ExplDist,
&   System.int ExplDirIndex,
&   System.bool ReverseDir,
&   System.bool AutoSpaceBodiesOnDrag,
&   [Out] System.int Error
) 

Parameters

ExplodeView
Name of the explode view to which to add this explode step
ExplDist
Distance in meters to move the selected bodies in this explode step
ExplDirIndex
Explode direction manipulator index as defined in swExplodeDirectionIndex_e (see Remarks)
ReverseDir
True to reverse the explode direction, false to not
AutoSpaceBodiesOnDrag
True to automatically space selected bodies on drag, false to not
Error
Error code as defined in swCreatePartExplodeStepError_e

Return Value

IPartExplodeStep

Example

See the IPartExplodeStep example.

Remarks

This method:

  • Is valid only for an active, current explode view of a multibody part.
  • Always clears the selection list.
  • Does not work if the Explode PropertyManager is open.
  • Does not work if any body is being edited in the context of the part.

Before calling this method, you must:

  1. Create an explode view in the active, current configuration of the multibody part. To create an explode view, call IPartDoc::CreateExplodedView.
  2. Populate ExplodeView with IConfiguration::GetCurrentPartExplodeViewName.
  3. Call IPartDoc::ShowExploded to activate the explode view to which to add an explode step.
  4. Call IModelDocExtension::SelectByID2 to select:
  • Bodies to move with Mark = 1.
  • (Optionally) An explode direction entity (cylindrical face, conical face, linear edge, or axis) with Mark = 2. Either, both, or neither of the direction entity and ExplDirIndex can be set. If neither, then the Z-direction manipulator index is used.

After calling this method, call IModelDoc2::EditRebuild3.

For C++, specify VARIANT_TRUE or VARIANT_FALSE for ReverseDir.

To edit an explode step, see the IPartExplodeStep remarks.

To create an explode step for the explode view of an assembly, see IConfiguration::AddExplodeStep2 and IConfiguration::AddRadialExplodeStep.

 

See Also

Availability

SOLIDWORKS 2020 FCS, Revision Number 28.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:   AddPartExplodeStep Method (IConfiguration)
*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) 2020 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.