Skip to main content
Version: Current

SmartStation.DeleteSmartStationAsync

Description​

Deletes an existing Smart Station with a specified station Id from the connected AI Command Center.

Signature [C#]​

Task DeleteSmartStationAsync(int stationId);

Properties​

Input​

ParameterTypeRequired / defaultDescription
stationIdintRequiredSpecify the station Id to delete the smartstation.

Remarks​

Use DeleteSmartStationAsync API to delete the SmartStation with specified station Id from the connected AI Command Center.

Example​

C#
public async Task DeleteSmartStation()
{
IControlRoomContext context = LoginControlRoom();
try
{
int stationId = 1;
await context.Machines.DeleteSmartStationAsync(stationId);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}

See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.