# Drop shape masters

### Overview

The recommended way to get shapes on a page is to *drop* a *master* from a *stencil*.

### **Dropping a master**

The following code shows the simplest case. It drops a "Rectangle" shape into the current page at position 4,5.

```
$basic_u = Open-VisioDocument "basic_u.vss"
$master = Get-VisioMaster "Rectangle" -Document $basic_u
$points = New-VisioPoint 4,5
$shape = New-VisioShape -Master $master -Position $points
```

### **Dropping a master multiple times**

```
$basic_u = Open-VisioDocument "basic_u.vss"
$master = Get-VisioMaster "Rectangle" -Document $basic_u
$points = @(
    New-VisioPoint 4 5
    New-VisioPoint 6 1
    New-VisioPoint 0 0
    )
$shapes = New-VisioShape -Master $master -Position $points

Set-VisioText -Text "Hello World" -Shape $shapes
```

### **Dropping multiple masters at the same time**

In this case, we want different masters dropped all at the same time

```
$basic_u = Open-VisioDocument "basic_u.vss"
$masters = Get-VisioMaster -Name "Rectangle","Triangle","Circle"  -Document $basic_u
$points = @(
    New-VisioPoint 4 5
    New-VisioPoint 6 1
    New-VisioPoint 0 0
    )
$shape = New-VisioShape -Master $masters -Position $points

Set-VisioText -Text "Hello World" -Shape $shape
```

The `New-VisioShape` cmdlet returns a list of integers - these are the shape ids of the shapes that were created as a result of the drop operation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://saveenr.gitbook.io/visiopowershell/basics/drop-masters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
