Hide Table of Contents
Replace Method (ISwDMComponent6)

Replace this component with the specified component.

.NET Syntax

Visual Basic (Declaration) 
Function Replace( _
   ByVal fileName As System.String, _
   ByVal ConfigurationName As System.String, _
   ByVal ReattachMates As System.Boolean _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As ISwDMComponent6
Dim fileName As System.String
Dim ConfigurationName As System.String
Dim ReattachMates As System.Boolean
Dim value As System.Boolean
 
value = instance.Replace(fileName, ConfigurationName, ReattachMates)
C# 
System.bool Replace( 
   System.string fileName,
   System.string ConfigurationName,
   System.bool ReattachMates
)
C++/CLI 
System.bool Replace( 
&   System.String^ fileName,
&   System.String^ ConfigurationName,
&   System.bool ReattachMates
) 

Parameters

fileName
Path and file name of the component to replace this component
ConfigurationName
Configuration of the component to replace this component
ReattachMates
True to reattach mates to the component that replaced this component, false to not

Return Value

True if the operation succeeds, false if it fails

Example

Remarks

Call ISwDMConfiguration11::GetReplacedComponents to get information about replaced components in an assembly.

NOTE: If you call ISwComponent6::PathName after calling ISwDMComponent6::Replace and before opening and saving an assembly, then the path to the original component is returned, not the path to the replaced component. References to replaced components are not updated until the assembly is opened and saved in SOLIDWORKS. 

 

See Also

Availability

SOLIDWORKS Document Manager API 2009 SP0


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:   Replace Method (ISwDMComponent6)
*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) 2022 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.