Hide Table of Contents
CreateByExplode Method (IMotionStudy)

Creates an animation in which a collapsed view of an assembly is exploded.

.NET Syntax

Visual Basic (Declaration) 
Function CreateByExplode( _
   ByVal DeleteExistingPath As System.Boolean, _
   ByVal Duration As System.Double, _
   ByVal StartTime As System.Double _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IMotionStudy
Dim DeleteExistingPath As System.Boolean
Dim Duration As System.Double
Dim StartTime As System.Double
Dim value As System.Boolean
 
value = instance.CreateByExplode(DeleteExistingPath, Duration, StartTime)
C# 
System.bool CreateByExplode( 
   System.bool DeleteExistingPath,
   System.double Duration,
   System.double StartTime
)
C++/CLI 
System.bool CreateByExplode( 
&   System.bool DeleteExistingPath,
&   System.double Duration,
&   System.double StartTime
) 

Parameters

DeleteExistingPath
True to delete any existing animation sequences, false to not
Duration
Length of time of the animation in seconds
StartTime
Time to start this animation (see Remarks)

Return Value

True if the animation is created, false if not

Example

Remarks

If you have existing animation sequences, then the start time of this animation should account for the total time of all previous sequences. If this is a new animation sequence, set StartTime to 0 to start the animation immediately, or type a value to delay the start of the sequence.

 

Example:

' Precondition: Active document contains an exploded view of an assembly.

 

Option Explicit

 

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Dim swModelDocExt As SldWorks.ModelDocExtension

Dim swMotionMgr As SwMotionStudy.MotionStudyManager

Dim swMotion As SwMotionStudy.MotionStudy

Dim boolstatus As Boolean

 

Sub main()

 

Set swApp = Application.SldWorks

'Active document contains an exploded view of an assembly

Set swModel = swApp.ActiveDoc

Set swModelDocExt = swModel.Extension

Set swMotionMgr = swModelDocExt.GetMotionStudyManager

' Create a new motion study

Set swMotion = swMotionMgr.CreateMotionStudy

' Delete any existing animation sequences,

' set the animation duration to 5 seconds, and play

' the animation immediately when IMotionStudy::Play is called

boolstatus = swMotion.CreateByExplode(True, 5, 0)

' Play the animation

swMotion.Play

 

End Sub

 

See Also

Availability

SOLIDWORKS 2008 FCS, Revision Number 16.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:   CreateByExplode Method (IMotionStudy)
*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) 2019 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.