---
title: "Layer..::.SwapObjects Method (IVObject, IVObject)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_Layer_SwapObjects_2_dda1fde1.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# Layer.SwapObjects Method (IVObject, IVObject)
 
Swaps the specifed v-objects inside the layer (changes the z-order).
 
**Namespace:** [Aurigma.GraphicsMill.WinControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.WinControls.VectorObjects (in Aurigma.GraphicsMill.WinControls.VectorObjects.dll)
 
## Syntax
  
```
Public Sub SwapObjects ( _obj0 As IVObject, _obj1 As IVObject _
)
```
 
```csharp
public void SwapObjects(IVObject obj0,IVObject obj1
)
```
 
### Parameters
 
 - obj0
     - Type: [Aurigma.GraphicsMill.WinControls.IVObject](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_IVObject.htm.md)
The first object to swap.

 - obj1
     - Type: [Aurigma.GraphicsMill.WinControls.IVObject](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_IVObject.htm.md)
The second object to swap.
   
## See Also

### Reference

- [Layer Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_Layer.htm.md)
- [SwapObjects Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_Layer_SwapObjects.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
