---
title: "getNumModules"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737252/getNumModules"
format: markdown
---
# Description

Used to determine the number of modules that currently exist in Shogun Post. The command, without any flags, returns a count of every module in the scene.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getNumModules [-type string] [-selected]` |

### Arguments

None

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `type` | 1 | string | — | Returns the number of modules of the specified type. |
| `selected` | 0 | — | — | Returns the number of currently selected modules. |

## Return value

integer 

> Macro (scroll-pagebreak)

## Examples

```plaintext
$i = `getNumModules`; 
print $i; //Output "1243"
 
$i = `getNumModules -type Marker`; 
print $i; //Output "828"
 
$i = `getNumModules -type Bone`; 
print $i; //Output "123";
 
select RightUpLeg RKNE; 
$i = `getNumModules -selected`; 
print $i; //Output "2";
 
$i = `getNumModules -type Bone -selected`; 
print $i; //Output "1";
```