/*
This example demonstrates how to work with devices through scripting.
*/
NewScene( null, false );
// First make sure the device manager is active (we can't add devices if it isn't)
if (!Application.Devices.Enable) {
Application.Devices.Enable = true;
}
// Get the DeviceManager (DeviceCollection)
var oDevices = Application.Devices;
// Get a pointer to the PC1600 Device, if it exists
var oDevice = oDevices.Item("PC1600");
// If it doesn't exist, then create it
if (oDevice == null) {
oDevice = oDevices.AddDevice( "PC1600" );
}
LogMessage( "The device name is " + oDevice );
//INFO : The device name is DeviceManager.PC1600 |