---
name: "configClasses"
type: command
status: ok
groups: ["Config"]
arma3_since: "1.24"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/configClasses
revid: 378371
updated: 2026-04-03T16:49:12Z
---

# configClasses

*Command · Config · Arma 3 v1.24*

## Description

Returns an array of config entries which meet criteria in condition code. Command iterates through all available config sub classes of the given config class. Current looked at config is stored in _x variable (similar to alternative [count](../commands/count.md) command implementation). Condition has to return [true](../commands/true.md) in order for the looked at config to be added to the resulting array. Slightly faster than [configProperties](../commands/configProperties.md), but doesn't account for config properties or inherited entries.

> [!IMPORTANT]
> - The condition code passed to [configClasses](../commands/configClasses.md) should only be used for **simple filter expressions** and nothing more
> - Do not use `"isClass _x"` in the condition. The engine does this check already
>
> - Arma 3 v2.02 brought specific engine optimisations for the following conditions:
>   - `"true"`
>   - `"getNumber (_x >> 'scope') > 0"`

## Syntax

### Syntax 1

```sqf
condition configClasses config
```

**Parameters:**

- `condition`: [String](../topics/String.md)
- `config`: [Config](../topics/Config.md)

**Returns:** [Array](../topics/Array.md) of [Config](../topics/Config.md)s

### Syntax 2

*since arma3 2.22*

```sqf
configClasses [config, depth, includeInherited, allSubclasses, classNames]
```

**Parameters:**

- `config`: [Config](../topics/Config.md) - target config
- `depth`: [Number](../topics/Number.md) - how many levels of subclasses to go deep
- `includeInherited`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to look through inherited classes
- `allSubclasses`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to return all subclasses, [false](../commands/false.md) - to return only the last tier.
- `classNames`: [Boolean](../topics/Boolean.md) - (Optional, default: [false](../commands/false.md)) when [true](../commands/true.md) class names [String](../topics/String.md)s are returned, when [false](../commands/false.md) - [Config](../topics/Config.md)s are returned.

**Returns:** [Array](../topics/Array.md) of [Config](../topics/Config.md)s or [String](../topics/String.md)s, which represent class names.

## Examples

### Example 1

collect all CfgVehicles configs:

```sqf
_configs = "true" configClasses (configFile >> "CfgVehicles");
```

### Example 2

Return all classes that can transport 10 and more soldiers:

```sqf
_transporters = "getNumber (_x >> 'transportSoldier') >= 10" configClasses (configFile >> "CfgVehicles");
```

### Example 3

Return all classes that inherit from 'RscText':

```sqf
hint str ("inheritsFrom _x == (configFile >> 'RscText')" configClasses configFile);
```

### Example 4

Return children:

```sqf
configClasses [configFile >> "CfgGroups", 0, true, true, true]
//Returns ["West","East","Indep","Empty"]
```

## See also

[Config](../topics/Config.md) · [configFile](../commands/configFile.md) · [missionConfigFile](../commands/missionConfigFile.md) · [configProperties](../commands/configProperties.md) · [configHierarchy](../commands/configHierarchy.md) · [BIS_fnc_returnChildren](../functions/BIS_fnc_returnChildren.md)

## Community notes

**Iceman77** — 2014-10-19

A fantastic way to filter stuff. eg:

```sqf
// create an array of west vehicles and spawn then in front of the player in rows of 5

private ["_cfgArray", "_xPos", "_yPos", "_veh"];

_cfgArray = "( 
    (getNumber (_x >> 'scope') >= 2) && 
    {
        getNumber (_x >> 'side') == 1 && 
        { getText (_x >> 'vehicleClass') in ['Armored', 'Car', 'Air'] }
    }
)" configClasses (configFile >> "CfgVehicles");

_xPos = 0;
_yPos = 0;

{
    _yPos = _yPos + 20;
    _veh = createVehicle [(configName _x), player modelToWorld [_xPos, _yPos, 0], [], 0, "NONE"];
    if (_yPos >= 100) then
    {
        _yPos = 0;
        _xPos = _xPos + 20;
    };
} forEach _cfgArray;
```

---

**Benargee** — 2016-05-28

[configClasses](../commands/configClasses.md) does not account for inherited subclasses, use [configProperties](../commands/configProperties.md) with [isClass](../commands/isClass.md) filter instead

```sqf
configProperties [_config, "isClass _x", true];
```

---

**Nelis75733126** — 2017-05-28

this will get a list of ALL locations on the currently loaded world

```sqf
( "true" configClasses (configFile >> "CfgWorlds" >> worldName >> "names" ) ) apply {
    // change each config entry into a location
    nearestLocation [
        getArray ( _x >> "position" ),
        getText ( _x >> "type" )
    ]
};
```

<sub>Source: [BI Community Wiki — configClasses](https://community.bistudio.com/wiki/configClasses) (revision 378371).</sub>
