GetComponentByNameAndType
Called to retrieve a component object.
Function
object GetComponentByNameAndType(name: string, typeName: string);
Parameters
Name | Type | Description |
---|---|---|
name | String | The name assigned to the component |
typeName | String | The type name of the required component |
Return Value
Returns the requested component as a javascript object, or null if the component is not found.
Example
var ATR1 = GetComponentByNameAndType('ATR1', 'Barcode Scanner');
var BasicShape1 = GetComponentByNameAndType('BasicShape1', 'Basic Shape');
var CamPusher1 = GetComponentByNameAndType('CamPusher1', 'Cam Pusher');
var Chute1 = GetComponentByNameAndType('Chute1', 'Chute');
var Conveyor1 = GetComponentByNameAndType('Conveyor1', 'Conveyor');
var ConveyorController1 = GetComponentByNameAndType('ConveyorController1', 'Conveyor Controller');
var CrossBeltSorter1 = GetComponentByNameAndType('CrossBeltSorter1', 'Cross Belt Sorter');
var DivertRule1 = GetComponentByNameAndType('DivertRule1', 'Divert Rule');
var Diverter1 = GetComponentByNameAndType('Diverter1', 'Diverter');
var EStop1 = GetComponentByNameAndType('EStop1', 'EStop');
var FreeRollerConveyor1 = GetComponentByNameAndType('FreeRollerConveyor1', 'Free Roller Conveyor');
var Grid1 = GetComponentByNameAndType('Grid1', 'Grid');
var HandlerGroup1 = GetComponentByNameAndType('HandlerGroup1', 'Handler Group');
var HighSpeedDiverter1 = GetComponentByNameAndType('HighSpeedDiverter1', 'High Speed Diverter');
var Label1 = GetComponentByNameAndType('Label1', 'Label');
var Path1 = GetComponentByNameAndType('Path1', 'Path');
var PESensor1 = GetComponentByNameAndType('PESensor1', 'PE Sensor');
var Polyline1 = GetComponentByNameAndType('Polyline1', 'Polyline');
var ProductGenerator1 = GetComponentByNameAndType('ProductGenerator1', 'Product Generator');
var ProductSchedule1 = GetComponentByNameAndType('ProductSchedule1', 'Product Schedule');
var Rack1 = GetComponentByNameAndType('Rack1', 'Rack');
var ScreeningOperatorGroup1 = GetComponentByNameAndType('OperatorGroup1', 'Screening Operator Group');
var ShoeSorter1 = GetComponentByNameAndType('ShoeSorter1', 'Shoe Sorter');
var TiltTraySorter1 = GetComponentByNameAndType('TiltTraySorter1', 'Tilt Tray Sorter');
var VerticalSorter1 = GetComponentByNameAndType('VerticalSorter1', 'Vertical Sorter');
var XRayMachine1 = GetComponentByNameAndType('XRayMachine1', 'X-Ray Machine');
var PhysicsPESensor1 = GetComponentByNameAndType('PhysicsPESensor1', 'Physics PE Sensor');
My Equipment
When accessing ‘My Equipment’, utilize the inherited component type if it inherits from an existing type. For instance, to retrieve ‘Box1’ that inherits from ‘BasicShape’, you should use the inherited type ‘Basic Shape’.
var box = GetComponentByNameAndType("Box1", "Basic Shape");