# Edit plugins

Source: https://help.malighting.com/grandMA2/en/help/key_plugins_edit.html
This is grandocs, an unofficial mirror of MA Lighting documentation. For authoritative or safety-relevant information, cite the canonical page on help.malighting.com.

---
**Hint:**\
-To view the specific Lua commands and their structure, import plugin\_1.lua into the plugin pool or follow this path on the grandMA2 onPC:\
**C:\ProgramData\MA Lighting Technologies\grandma\gma2\_V\_x.x.x\plugins\plugin\_1.lua**\
-A plugin has always two files – an .xml and a .lua file.

Open the plugin pool:

1. Tap System in **Create Basic Window**. For more information on how to open a basic window see [Manage windows](/grandma2/key_windows_create_manage/).
2. Tap Plugin and the plugin pool opens.

![](/img/grandma2/window_plugin-pool_v3-3-a0bf34.png)

_Open the plugin pool_

3. Open the editor:\
   -Press Edit and tap an empty object in the pool.\
   -The **window Edit Plugin** opens.

   ![](/img/grandma2/window_plugin-editor_v3-3-b420c6.png)

   _Open the plugin editor_

4) To import the .xml file from the drive, tap Import and the **pop-up Import Plugins** opens.

   ![](/img/grandma2/popup_import-plugins_v3-3-fc3b22.png)

   _Import plugins_

   -Select the file and tap Import.\
   -To cancel the process, tap Cancel.

**Hint:**\
It is also possible to write the Lua code directly in the editor.

5. Label the plugin:\
   -Tap Label and type the name of the plugin in the calculator.\
   -Press Please.
6. To save the plugin, tap Save.
7. To export the plugin created, tap Export.
8. To reload the plugin engine, tap Reload.\
   -A confirmation pop-up opens.

   ![](/img/grandma2/popup_reload-plugin-engine_v3-3-eb08de.png)

   _Reload the plugin engine_

   -To reload the engine, tap Ok.\
   -To cancel the process, tap Cancel.
9. To enable execution on load, tap Execute on Load.\
   -The button is highlighted in a yellow font.

The Lua code is applied.