Hide Table of Contents
CopyWithMates2 Method (IAssemblyDoc)

Copies one or more components with mates in this assembly.

.NET Syntax

Visual Basic (Declaration) 
Function CopyWithMates2( _
   ByVal ComponentsToCopy As System.Object, _
   ByVal Repeat As System.Object, _
   ByVal NewEnityToMateTo As System.Object, _
   ByVal Values As System.Object, _
   ByVal FlipAlignment As System.Object, _
   ByVal FlipDimension As System.Object, _
   ByVal LockRotation As System.Object, _
   ByVal Orientation As System.Object _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IAssemblyDoc
Dim ComponentsToCopy As System.Object
Dim Repeat As System.Object
Dim NewEnityToMateTo As System.Object
Dim Values As System.Object
Dim FlipAlignment As System.Object
Dim FlipDimension As System.Object
Dim LockRotation As System.Object
Dim Orientation As System.Object
Dim value As System.Boolean
 
value = instance.CopyWithMates2(ComponentsToCopy, Repeat, NewEnityToMateTo, Values, FlipAlignment, FlipDimension, LockRotation, Orientation)
C# 
System.bool CopyWithMates2( 
   System.object ComponentsToCopy,
   System.object Repeat,
   System.object NewEnityToMateTo,
   System.object Values,
   System.object FlipAlignment,
   System.object FlipDimension,
   System.object LockRotation,
   System.object Orientation
)
C++/CLI 
System.bool CopyWithMates2( 
&   System.Object^ ComponentsToCopy,
&   System.Object^ Repeat,
&   System.Object^ NewEnityToMateTo,
&   System.Object^ Values,
&   System.Object^ FlipAlignment,
&   System.Object^ FlipDimension,
&   System.Object^ LockRotation,
&   System.Object^ Orientation
) 

Parameters

ComponentsToCopy
Array of components to copy
Repeat
Array of boolean values; each value indicates whether to use the existing mate reference for the corresponding component to copy; if true, copies the existing mate reference; if false, uses the corresponding entry in the NewEntityToMateTo array for the new mate reference
NewEnityToMateTo
Array of new mate references that map to the Repeat array; if an entry in the Repeat array is false, then the corresponding entry in this array is the new entity with which to mate the component to copy
Values
Array of distance or angle values for the mate references; specify distance in meters and angle in radians; valid for distance, angle, and profile center mates only
FlipAlignment
Array of booleans that map to the NewEntityToMateTo array; each value indicates the corresponding mate's alignment; true to flip alignment, false to not
FlipDimension
Array of booleans that map to the Values array; each value indicates the corresponding mate's distance; true for a positive distance dimension, false for a negative distance dimension; valid for distance, angle, and profile center mates only
LockRotation
Array of booleans that map to the NewEntityToMateTo array; true to prevent the components from rotating, false to allow the components to rotate; valid for concentric and profile center mates only
Orientation
Array of longs or integers that map to the Values array; each long or integer indicates the number of clicks in the user interface with which to orient the mate; a positive value indicates to orient the mate clockwise, a negative value indicates to orient the mate counterclockwise; valid for profile center mates only

Return Value

True if calling this method succeeded, false if it failed

Example

 

See Also

Availability

SOLIDWORKS 2016 FCS, Revision Number 24.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:   CopyWithMates2 Method (IAssemblyDoc)
*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) 2025 SP2

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.