---
name: "collect3DENHistory"
type: command
status: ok
groups: ["Eden Editor"]
arma3_since: "1.56"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/collect3DENHistory
revid: 376415
updated: 2025-10-11T01:38:31Z
---

# collect3DENHistory

*Command · Eden Editor · Arma 3 v1.56*

## Description

Execute a block of code in which all Eden Editor operations will be recorded as one history step. For example creating an entity, setting its attributes and then connections would normally be recorded as three different steps. Calling them all within single **collect3DENHistory** block will group them together and the user will need to undo only once to revert the changes. Use [ignore3DENHistory](../commands/ignore3DENHistory.md) to ignore history entry creation.

> [!NOTE]
> In order to only change the 2nd or 3rd parameter of the alternative syntax use [nil](../commands/nil.md) as the preceding parameters.

Some useful icons are:

- `"\a3\3den\data\cfg3den\history\addtolayer_ca.paa"`
- `"\a3\3den\data\cfg3den\history\changeattributes_ca.paa"`
- `"\a3\3den\data\cfg3den\history\changeseat_ca.paa"`
- `"\a3\3den\data\cfg3den\history\connectitems_ca.paa"`
- `"\a3\3den\data\cfg3den\history\create_ca.paa"`
- `"\a3\3den\data\cfg3den\history\createcomment_ca.paa"`
- `"\a3\3den\data\cfg3den\history\deleteitems_ca.paa"`
- `"\a3\3den\data\cfg3den\history\disconnectitems_ca.paa"`
- `"\a3\3den\data\cfg3den\history\makenewlayer_ca.paa"`
- `"\a3\3den\data\cfg3den\history\missionnew_ca.paa"`
- `"\a3\3den\data\cfg3den\history\moveitems_ca.paa"`
- `"\a3\3den\data\cfg3den\history\multipleoperations_ca.paa"`
- `"\a3\3den\data\cfg3den\history\pasteitems_ca.paa"`
- `"\a3\3den\data\cfg3den\history\removefromlayer_ca.paa"`
- `"\a3\3den\data\cfg3den\history\rotateitems_ca.paa"`
- `"\a3\3den\data\cfg3den\history\scaleitems_ca.paa"`

## Syntax

### Syntax 1

```sqf
collect3DENHistory code
```

**Parameters:**

- `code`: [Code](../topics/Code.md) - code that is executed in **[Unscheduled Environment](../topics/Scheduler.md#unscheduled_environment)**

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

*since arma3 2.06*

```sqf
[text, tooltip, icon] collect3DENHistory code
```

**Parameters:**

- `text`: [String](../topics/String.md) or [Nothing](../topics/Nothing.md) - text of the entry that is added to the history list
- `tooltip`: [String](../topics/String.md) - (Optional, default "Batch Change" ([localized](../commands/isLocalized.md))) - tooltip of the entry
- `icon`: [String](../topics/String.md) - (Optional, default "a3\3den\data\cfg3den\history\multipleoperations_ca.paa") - path to the icon that is displayed left of the *text*. **Must not start with a `\`!**
- `code`: [Code](../topics/Code.md) - code that is executed in **[Unscheduled Environment](../topics/Scheduler.md#unscheduled_environment)**

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
collect3DENHistory 
{
    _logic = create3DENEntity ["Logic", "Logic", position player];
    add3DENConnection ["Sync", [_logic], player];
}; // Creates a logic and connects it to player in one history step.
```

### Example 2

```sqf
["Create Entity", "B_Soldier_F", "a3\3den\data\cfg3den\history\create_ca.paa"] collect3DENHistory 
{
    create3DENEntity ["Object","B_Soldier_F", screenToWorld [0.5,0.5]];
};
```

### Example 3

```sqf
[nil, nil, "a3\3den\data\cfg3den\history\moveitems_ca.paa"] collect3DENHistory 
{
    create3DENEntity ["Object","B_Soldier_F", screenToWorld [0.5,0.5]];
}; // Change only the icon
```

## See also

[ignore3DENHistory](../commands/ignore3DENHistory.md) · [add3DENConnection](../commands/add3DENConnection.md) · [create3DENComposition](../commands/create3DENComposition.md) · [create3DENEntity](../commands/create3DENEntity.md) · [delete3DENEntities](../commands/delete3DENEntities.md) · [do3DENAction](../commands/do3DENAction.md) · [remove3DENConnection](../commands/remove3DENConnection.md) · [set3DENAttributes](../commands/set3DENAttributes.md) · [set3DENObjectType](../commands/set3DENObjectType.md)

## Community notes

**7erra** — 2020-10-26

Contrary to other code block structures ([call](../commands/call.md), [if](../commands/if.md)/[then](../commands/then.md)/[exitWith](../commands/exitWith.md), [switch](../commands/switch.md)/[case](../commands/case.md)/[default](../commands/default.md), etc.) the code block of [collect3DENHistory](../commands/collect3DENHistory.md) will not return any value:

```sqf
_unit = collect3DENHistory {
    create3DENEntity ["Object", "C_Protagonist_VR_F", screenToWorld [0.5, 0.5]];
};
_unit // <null>
```

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