# Examples

#### Example 1 <a href="#example-1" id="example-1"></a>

```
Import-Module Visio
$visio = New-VisioApplication
$doc = New-VisioDocument
$stencil = Open-VisioDocument "basic_u.vss"

$master1 = Get-VisioMaster "Rounded Rectangle" $stencil 

# Drop multiple shapes at the same time
$shapes = New-VisioShape $master1 -Points 1,5.2,3,5.2,5,5.2

#Ensure that Nothing is Selected - just to demonstrate this feature
Select-VisioShape -Operation None

#Select the first and third shapes dropped
Select-VisioShape -Shapes $shapes[0],$shapes[2]

# Group the selected shapes
$g1 = New-VisioGroup

# Ungroup them
Split-VisioShape -Shapes $g1

# Group by specifying the shapes (ignore whatever is selected)
$g1 = Join-VisioShape -Shapes $shapes[0],$shapes[1]
```


---

# 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/visiosps3.4.0docs/shapes/groups/examples.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.
