Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

The Running Programmable Block

Malware edited this page Dec 13, 2025 · 2 revisions

DEPRECATION NOTICE

This documentation is out of date and no longer maintained.

Please visit the new documentation at: https://spaceengineers.wiki.gg/wiki/Scripting

One of the more frequently asked questions for beginners, is how to get a hold of the programmable block or the grid containing the programmable block that is running the current scripts. This is quite simple. The base class of the scripts, MyGridProgram, has a special property for this called Me.

public void Main() {
    // Write the name of the running programmable block into its detail area
    Echo(Me.CustomName);

    // Write the name of the grid containing the programmable block into its detail area
    Echo(Me.CubeGrid.CustomName);
}

Clone this wiki locally