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

Retrieves a module's type. When retrieving an array of modules from a command, the module types will need to be determined from a script.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getModuleType moduleName` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `moduleName` | string | yes | The module to get the type for. |

### Flags

None

## Return value

string 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Get the selected modules in the scene and print out their types.
string $modules[];
string $type;
int $i, $count;
 
// First get the modules
$modules = `getModules -s`;
 
// Iterate through and print out their types
$count = `getCount $modules`;
for( $i = 0; 
 $i < $count; 
 $i += 1 )
   {
 $type = `getModuleType $modules[ $i ]`;
 print $type;
   } 
```

# Additional information

## Related commands

- [getChildren](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738310)
- [getModules](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736739)
- [getParent](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737101)