#
# This example demonstrates how to work with devices through scripting.
#
Application.NewScene( None, False )
# First make sure the device manager is active (we can't add devices if it isn't)
if Application.Devices.Enable == False:
Application.Devices.Enable = True
# Get the DeviceManager (DeviceCollection)
oDevices = Application.Devices
# Get a pointer to the PC1600 Device, if it exists
oDevice = oDevices( "PC1600" )
# If it doesn't exist, then create it
if oDevice == None:
oDevices.AddDevice( "PC1600" )
oDevice = oDevices( "PC1600" )
Application.LogMessage( "The device name is " + oDevice.FullName )
#INFO : The device name is DeviceManager.PC1600
|