{"name":"collect3DENHistory","operator":null,"title":"collect3DENHistory","type":"command","url":"https://community.bistudio.com/wiki/collect3DENHistory","revid":376415,"updated":"2025-10-11T01:38:31Z","groups":["Eden Editor"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.56"}],"since":{"game":"arma3","name":"Arma 3","version":"1.56"},"arma3_since":"1.56","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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 to ignore history entry creation.\n\n> [!NOTE]\n> In order to only change the 2nd or 3rd parameter of the alternative syntax use nil as the preceding parameters.\n\nSome useful icons are:\n\n- `\"\\a3\\3den\\data\\cfg3den\\history\\addtolayer_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\changeattributes_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\changeseat_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\connectitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\create_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\createcomment_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\deleteitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\disconnectitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\makenewlayer_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\missionnew_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\moveitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\multipleoperations_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\pasteitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\removefromlayer_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\rotateitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\scaleitems_ca.paa\"`","syntaxes":[{"syntax":"collect3DENHistory code","since":null,"effect":null,"exec":null,"params":[{"name":"code","type":"Code","optional":false,"default":null,"description":"code that is executed in **Unscheduled Environment**","types":["Code"],"since":null,"text":"code: Code - code that is executed in **Unscheduled Environment**"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"code","types":["Code"]}},{"syntax":"[text, tooltip, icon] collect3DENHistory code","since":"arma3 2.06","effect":null,"exec":null,"params":[{"name":"text","type":"String or Nothing","optional":false,"default":null,"description":"text of the entry that is added to the history list","types":["String","Nothing"],"since":null,"text":"text: String or Nothing - text of the entry that is added to the history list"},{"name":"tooltip","type":"String","optional":true,"default":"\"Batch Change\" (localized)","description":"tooltip of the entry","types":["String"],"since":null,"text":"tooltip: String - (Optional, default \"Batch Change\" (localized)) - tooltip of the entry"},{"name":"icon","type":"String","optional":true,"default":"\"a3\\3den\\data\\cfg3den\\history\\multipleoperations_ca.paa\"","description":"path to the icon that is displayed left of the *text*. **Must not start with a `\\`!**","types":["String"],"since":null,"text":"icon: String - (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 `\\`!**"},{"name":"code","type":"Code","optional":false,"default":null,"description":"code that is executed in **Unscheduled Environment**","types":["Code"],"since":null,"text":"code: Code - code that is executed in **Unscheduled Environment**"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"[text, tooltip, icon]","types":["Array"]},"right":{"text":"code","types":["Code"]}}],"examples":[{"text":"```sqf\ncollect3DENHistory \n{\n    _logic = create3DENEntity [\"Logic\", \"Logic\", position player];\n    add3DENConnection [\"Sync\", [_logic], player];\n}; // Creates a logic and connects it to player in one history step.\n```","code":["collect3DENHistory \n{\n\t_logic = create3DENEntity [\"Logic\", \"Logic\", position player];\n\tadd3DENConnection [\"Sync\", [_logic], player];\n}; // Creates a logic and connects it to player in one history step."]},{"text":"```sqf\n[\"Create Entity\", \"B_Soldier_F\", \"a3\\3den\\data\\cfg3den\\history\\create_ca.paa\"] collect3DENHistory \n{\n    create3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n};\n```","code":["[\"Create Entity\", \"B_Soldier_F\", \"a3\\3den\\data\\cfg3den\\history\\create_ca.paa\"] collect3DENHistory \n{\n\tcreate3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n};"]},{"text":"```sqf\n[nil, nil, \"a3\\3den\\data\\cfg3den\\history\\moveitems_ca.paa\"] collect3DENHistory \n{\n    create3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n}; // Change only the icon\n```","code":["[nil, nil, \"a3\\3den\\data\\cfg3den\\history\\moveitems_ca.paa\"] collect3DENHistory \n{\n\tcreate3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n}; // Change only the icon"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ignore3DENHistory","add3DENConnection","create3DENComposition","create3DENEntity","delete3DENEntities","do3DENAction","remove3DENConnection","set3DENAttributes","set3DENObjectType"],"notes":[{"user":"7erra","date":"2020-10-26T01:15:00Z","text":"Contrary to other code block structures (call, if/then/exitWith, switch/case/default, etc.) the code block of collect3DENHistory will not return any value:\n\n```sqf\n_unit = collect3DENHistory {\n    create3DENEntity [\"Object\", \"C_Protagonist_VR_F\", screenToWorld [0.5, 0.5]];\n};\n_unit // <null>\n```"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Eden Editor","Introduced with Arma 3 version 1.56","Scripting Commands"]}