Hide Table of Contents
FinishRecordingUndoObject2 Method (IModelDocExtension)

Ends recording of a SolidWorks Undo object with the specified name and visibility.

.NET Syntax

Visual Basic (Declaration) 
Function FinishRecordingUndoObject2( _
   ByVal UndoObjectName As System.String, _
   ByVal MakeHidden As System.Boolean _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IModelDocExtension
Dim UndoObjectName As System.String
Dim MakeHidden As System.Boolean
Dim value As System.Boolean
 
value = instance.FinishRecordingUndoObject2(UndoObjectName, MakeHidden)
C# 
System.bool FinishRecordingUndoObject2( 
   System.string UndoObjectName,
   System.bool MakeHidden
)
C++/CLI 
System.bool FinishRecordingUndoObject2( 
&   System.String^ UndoObjectName,
&   System.bool MakeHidden
) 

Parameters

UndoObjectName
String that appears in the SolidWorks Undo list
MakeHidden
True to hide this object in the Undo list and from the user; false to make this object visible in the Undo list and to the user

Return Value

True if recording of the SolidWorks Undo object ends, false if not

Example

Remarks

To add an object with the name UndoObjectName to the SolidWorks Undo list, place the SolidWorks API calls between IModelDocExtension::StartRecordingUndoObject and IModelDocExtension::FinishRecordingUndoObject2: 

 

For example, assume that your application creates a complex gear that requires many SolidWorks API calls and you would like your SolidWorks user to be able to undo that gear from the user interface at a later time. Your application can create an Undo object by calling:

 

  1. IModelDocExtension::StartRecordingUndoObject
  2. SolidWorks API calls that create the gear
  3. IModelDocExtension::FinishRecordingUndoObject2 with MakeHidden = False

Now assume that your application performs many temporary operations that you do not want your users to see in the SolidWorks Undo list, because they are not essential to the modeling and design process. For this case, your application can place the non-essential SolidWorks API calls between IModelDocExtension::StartRecordingUndoObject and IModelDocExtension::FinishRecordingUndoObject2 with MakeHidden = True. The Undo object is still added to the SolidWorks Undo list, but the user does not see it in the list.

 

WARNING: If your application hides an Undo object in the Undo list by setting MakeHidden = True and the Undo object is the first item in the SolidWorks Undo list, then SolidWorks discards the Undo object from the Undo list. If this happens, then the SolidWorks API calls in this Undo object cannot be undone.

 

Similarly if the last item to be redone is a hidden API Undo object, then SolidWorks discards it and the SolidWorks API calls cannot be redone.

 

Only SolidWorks operations that support Undo are undone. Both SolidWorks API and non-API operations are undone.

 

See Also

Availability

SolidWorks 2013 FCS, Revision Number 21.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:   FinishRecordingUndoObject2 Method (IModelDocExtension)
*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) 2013 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.