Skip to main content
Version: Current

SmartStation.CreateSmartStationAsync

Description​

Creates a new Smart Station with specified NewSmartStation details inside the connected AI Command Center.

Signature [C#]​

Task<SmartStation> CreateSmartStationAsync(NewSmartStation newSmartStation);

Properties​

Input​

ParameterTypeRequired / defaultDescription
newSmartStationNewSmartStationRequiredSpecify the details to create new smart station.

Output​

PropertyDescription
Task<SmartStation>Returns newly created smartstation details.

Remarks​

Use CreateSmartStationAsync API to create new Smart Station with specified NewSmartStation details from the connected AI Command Center.

Example​

C#
public async Task CreateSmartStation()
{
IControlRoomContext context = LoginControlRoom();
try
{
NewSmartStation newSmartStation = new NewSmartStation()
{
Name = "APISmartStation",
Key = "23374568-24B5-F3D8-5093-CD7B7344C9FH",
Description = "Smart Station"
};
SmartStation smartStation = await context.Machines.CreateSmartStationAsync(newSmartStation);
System.Console.WriteLine("SmartStation Name: " + smartStation.Name);
}
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.