---
title: "getModuleType"
canonical: "https://help.vicon.com/space/Shogun17/13536569/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

|  |
| --- |
| `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/Shogun17/pages/13536343)
- [getModules](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536571)
- [getParent](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536593)