Matrix.CopyContent
------------------

Copies the content of a matrix into another matrix.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Matrix](component_Matrix.md) | [15.3](newinversion153.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Matrix.CopyContent"; Matrix1; Matrix2 ) 

**MBS**( **"Matrix.CopyContent";** /\* Copies the content of a matrix into another matrix. \*/  
**$Matrix1**; /\* The matrix reference number. \*/   
**$Matrix2**) /\* The matrix reference number. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Matrix1 | The matrix reference number. | $matrix1 |
| Matrix2 | The matrix reference number. | $matrix2 |

### Result

Returns OK or error.

### Description

Copies the content of a matrix into another matrix.  
Replaces the content of the second one with the content of the first one. The destination is resized if needed.  
### Examples

Try it:

 Let(\[  
 // new matrix  
 matrix = MBS ("[Matrix.New](MatrixNew.md)"; 3; 4);  
 // add some content  
 r = MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; matrix; 0; "00¶01¶02¶03" );  
 r = MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; matrix; 1; "10¶11¶12¶13" );  
 r = MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; matrix; 2; "20¶21¶22¶23" );  
 // creates a second matrix  
 matrix2 = MBS ("[Matrix.New](MatrixNew.md)"; 2; 2);  
 // copy content of first matrix to second  
 r = MBS ( "Matrix.CopyContent"; matrix; matrix2 );  
 // output second matrix to check  
 csv = MBS ("[Matrix.CSV](MatrixCSV.md)"; matrix2)  
\]; csv)  
### See also

- [Matrix.CopyColumn](MatrixCopyColumn.md)
- [Matrix.CSV](MatrixCSV.md)
- [Matrix.New](MatrixNew.md)
- [Matrix.SetRow](MatrixSetRow.md)

### Blog Entries

- [MBS FileMaker Plugin 15.3 News](https://www.mbsplugins.de/archive/2025-07-29/MBS_FileMaker_Plugin_153_News/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 22nd May 2025 , last changed 23th May 2025

  
[Matrix.CopyColumn](MatrixCopyColumn.md) - [Matrix.CopyRow](MatrixCopyRow.md)

[HTML Version](MatrixCopyContent.shtml)