Type: IEquipmentManager

Summary:

Represents the equipment manager

Remarks:

Methods:

EquipmentByInterface(System.String)

Summary:

Returns a list of equipment that implements a specific interface

Parameters:

  1. interfaceName: interface name

Returns:

list of equipment

EquipmentByTypeName(System.String)

Summary:

Returns a list of equipment by type name

Parameters:

  1. typeName: type name

Returns:

list of equipment

New(System.String,Sym3.IBaseEquipment)

Summary:

Create an equipment on another equipment

Parameters:

  1. typeName: Typename of the equipment to create
  2. parent: Parent equipment

Returns:

the created equipment

Example:

This examples shows how to create a PESensor on a conveyor

            // Create a conveyor:
            cc1 = Project.Equipment.New("Conveyor")
            
            // Create a PE Sensor on this conveyor
            Project.Equipment.New("PESensor", cc1)
            

NewBarcodeScanner

Summary:

Creates a new barcode scanner with default values;

Returns:

the created equipment

NewBasicShape

Summary:

Creates a new basic shape with default values;

Returns:

the created equipment

NewCamPusher

Summary:

Creates a new cam pusher with default values;

Returns:

the created equipment

NewChute

Summary:

Creates a new chute with default values;

Returns:

the created equipment

NewConveyor

Summary:

Creates a new conveyor with default values;

Returns:

the created equipment

NewCrossBeltSorter

Summary:

Creates a new cross belt sorter with default values;

Returns:

the created equipment

NewDiverter

Summary:

Creates a new diverter with default values;

Returns:

the created equipment

NewEStop

Summary:

Creates a new E-Stop with default values;

Returns:

the created equipment

NewGrid

Summary:

Creates a new grid with default values;

Returns:

the created equipment

NewHighSpeedDiverter

Summary:

Creates a new high speed diverter with default values;

Returns:

the created equipment

NewLabel

Summary:

Creates a new conveyor with default values;

Returns:

the created equipment

NewPESensor(Sym3.IBaseEquipment)

Summary:

Creates a new PE sensor with default values;

Returns:

the created equipment

NewPolyline

Summary:

Creates a new polyline with default values;

Returns:

the created equipment

NewShoeDiverter

Summary:

Creates a new shoe diverter with default values;

Returns:

the created equipment

NewShoeSorter

Summary:

Creates a new shoe sorter with default values;

Returns:

the created equipment

NewStaticModel

Summary:

Creates a new static model with default values;

Returns:

the created equipment

NewTiltTraySorter

Summary:

Creates a new tilt tray sorter with default values;

Returns:

the created equipment

NewVerticalSorter

Summary:

Creates a new vertical sorter with default values;

Returns:

the created equipment

NewXRayMachine

Summary:

Creates a new X-Ray machine with default values;

Returns:

the created equipment

NewRack

Summary:

Creates a new Rack with default values;

Returns:

the created equipment

NewProductGenerator

Summary:

Creates a new Product Generator with default values; Designer/Integrator only

Returns:

the created equipment

NewComposite

Summary:

Creates a new Composite with default values;

Returns:

the created equipment

NewFromComponent(System.String,Sym3.IBaseEquipment)

Summary:

Creates a new equipment attacged to its parent.Example a PE Sensor can have a conveyor as parent.

Parameters:

  1. typeName: type name of equipment to create
  2. parentEquipment: Parent equipment

Returns:

Returns the newly created equipment, null if not created.

NewFromDefinition(Sym3.ITypeEquipment,System.Double,System.Double,System.Double,Sym3.IMComponent3D,Sym3.ITypeMyEquipment,Sym3.IBaseEquipment)

Summary:

Creates a new equipment.

Parameters:

  1. userType: userType can be a standard type or user defined type
  2. x: x position where to create new equipment
  3. y: y position where to create new equipment
  4. z: z position where to create new equipment
  5. targetComponent: Target component

Returns:

new equipment

GetByType(System.String,System.String)

Summary:

Gets the object of a particular type

Parameters:

  1. typeName: the typename of object. Example: 'Conveyor' or 'Diverter'
  2. name: the name of object. Example: 'Conveyor1' or 'Diverter1'

Returns:

Returns the object of this type

Example:

This examples shows how to get the conveyor in the system.

            // get Conveyor1
            conv = Project.Equipment.GetByType("Conveyor", "Conveyor1");
            
            // this will print the Conveyor1 in the output console.
            print(conv)
            

CountByType(System.String)

Summary:

Gets the number of object of a particular type

Parameters:

  1. typeName: the typename of object. Example: 'Conveyor' or 'Diverter'

Returns:

Returns the number of object of this type

Example:

This examples shows how to get the number of conveyor in the system.

            // get number of conveyor
            count = Project.Equipment.CountByType("Conveyor");
            
            // this will print the number of conveyor in the output console.
            print(count)
            

New(System.String)

Summary:

Create a new object of a specified type name. The type name must exist.

Parameters:

  1. typeName: Typename of the object. See example

Returns:

The newly created object. Returns null if an error occrued.

Example:

This example shows how to create some equipment

            // creates a conveyor
            c1 = Project.Equipment.New("Conveyor")
            c1.Name = "MyConveyor1";
            
            // creates a diverter
            d1 = Project.Equipment.New("Diverter")
            d1.Name = "MyDiverter1";        
            

Add(IBaseObject)

Summary:

Adds an object in the manager. The object has to be of the correct type.

Parameters:

  1. value: Object to add

AddMultiple(System.Collections.ICollection)

Summary:

Adds a collection of object in the manager. Objects have to be of the correct type.

Parameters:

  1. value: The collection of objects to add

Remove(IBaseObject)

Summary:

Removes an object from the manager

Parameters:

  1. value: Object to remove

RemoveSilentlyBecauseSomethingIsNotRight(IBaseObject)

Summary:

Removes an object from the manager without calling events

Parameters:

  1. value: Object to remove

RemoveMultiple(System.Collections.ICollection)

Summary:

Removes an collection of object from the manager

Parameters:

  1. value: The collection of object to remove

RemoveAll

Summary:

Remove all objects from the manager. The manager will be empty after execution.

GetById(System.Guid)

Summary:

Gets an object by its unique ID. A better way to access an object is by using indexer. See example.

Parameters:

  1. id: Unique ID of the object to find

Returns:

Returns the object. Will return null if the object is not found.

Example:

This example shows how to find an object by its id. This example is using the 'GetById' method but also shows how to use indexer operator.

            id = ... // lets say we have an Id
            myManager = Project.Colors;
            myColor = myManager.GetById(id);
            
            // using the indexer. It is shorter but executes the same code behind the scene.
            myColor = myManager[id];
            

Get(System.String)

Summary:

Gets an object by its name. A better way to access an object is by using indexer. See example.

Parameters:

  1. id: Name of the object to find

Returns:

Returns the object. Will return null if the object is not found.

Example:

This example shows how to find an object by its name. This example is using the 'Get' method but also shows how to use indexer operator.

            myManager = Project.Colors;
            myColor = myManager.Get("Sym3 Red");
            
            // using the indexer. It is shorter but executes the same code behind the scene.
            myColor = myManager["Sym3 Red"];
            

CopyToClipboard

Summary:

Copies the object to clipboard

ToCSVString(System.Char)

Summary:

Returns the object in a CSV string.

Returns:

A string that contains properties of the object in a CSV format.

GetUserPropertyInstance(System.String)

Summary:

Gets the user property instance of the specified name

Parameters:

  1. userPropertyName: The user property name.

Returns:

Returns the user property instance object. If not found, the methods returns null.

Example:

This example shows how to set the value of a user property by using this method

            cc1 = Project.Equipment.Get("CC1");
            
            // get the value of a user property using the method
            userPropertyInstance = cc1.GetUserPropertyInstance("UserProperty1");
            if(userPropertyInstance != null) {
               userPropertyInstance.Value = 3;
            }
            

IsUserProperty(System.String)

Summary:

Indicates if the object contains a user property with the name you specify

Parameters:

  1. userPropertyName: user property name

Returns:

Returns true if the object contains a user property with the name you specified in parameter.

GetUserPropertyValue(System.String)

Summary:

Gets the value of a user property. A better way to get the value of a user property is to use the indexer operator [], see example. Instead of using the method 'GetUserPropertyInstance' and then access the 'Value' property of the returned value, this method simplifies the way we get the value of a user property.

Parameters:

  1. userPropertyName: The name of the user property to set.

Returns:

Returns null if user property is not found. Otherwise returns the value of the user property.

Example:

This example shows how to get the value of a user property using this method and also by using the indexer

            cc1 = Project.Equipment.Get("CC1");
            
            // get the value of a user property using the method
            val = cc1.GetUserPropertyValue("UserProperty1");
            
            // get the value of a user property using the indexer operator
            val = cc1["UserProperty1"];
            

SetUserPropertyValue(System.String,System.Object)

Summary:

Sets the value of a user property. A better way to set the value of a user property is to use the indexer operator [], see example. Instead of using the method 'GetUserPropertyInstance' and then access the 'Value' property of the returned value, this method simplifies the way we set the value of a user property.

Parameters:

  1. userPropertyName: The name of the user property to set.
  2. value: If the user property is not found, this methods does nothing.

Example:

This example shows how to set the value of a user property using this method and also by using the indexer

            cc1 = Project.Equipment.Get("CC1");
            
            // set the value of a user property using the method
            cc1.SetUserPropertyValue("UserProperty1", 3);
            
            // set the value of a user property using the indexer operator
            cc1["UserProperty1"] = 3;
            

ToXmlString

Summary:

Converts the object in an xml string

Returns:

the string that contains xml version of the object

FromXmlString(System.String)

Summary:

Init object from xml. All properties found in the xml will be set with the value in the xml file

Parameters:

  1. xmlText: Xml string

Properties

BarcodeScanners

Summary:

Gets a list of all existing barcode scanners

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IATR]

Access:

Read

BasicShapes

Summary:

Gets a list of all existing basic shapes

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IBasicShape]

Access:

Read

CamPushers

Summary:

Gets a list of all existing cam pushers

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.ICamPusher]

Access:

Read

Chutes

Summary:

Gets a list of all existing chutes

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IChute]

Access:

Read

Conveyors

Summary:

Gets a list of all existing conveyors

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IConveyor]

Access:

Read

CrossBeltSorters

Summary:

Gets a list of all existing cross belt sorters

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.ICrossBeltSorter]

Access:

Read

Diverters

Summary:

Gets a list of all existing diverters

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IDiverter]

Access:

Read

EStops

Summary:

Gets a list of all existing E-Stops

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IEStop]

Access:

Read

Grids

Summary:

Gets a list of all existing grids

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IGrid]

Access:

Read

HighSpeedDiverters

Summary:

Gets a list of all existing high speed diverters

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IHighSpeedDiverter]

Access:

Read

Labels

Summary:

Gets a list of all existing labels

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.ILabel]

Access:

Read

PESensors

Summary:

Gets a list of all existing PE sensors

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IPESensor]

Access:

Read

Polylines

Summary:

Gets a list of all existing polylines

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IPolyline]

Access:

Read

ShoeDiverters

Summary:

Gets a list of all existing shoe diverters

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IShoeDiverter]

Access:

Read

ShoeSorters

Summary:

Gets a list of all existing shoe sorters

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IShoeSorter]

Access:

Read

StaticModels

Summary:

Gets a list of all existing shoe static models

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IStaticModel]

Access:

Read

TiltTraySorters

Summary:

Gets a list of all existing shoe tilt tray sorters

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.ITiltTraySorter]

Access:

Read

VerticalSorters

Summary:

Gets a list of all existing vertical sorters

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IVerticalSorter]

Access:

Read

XRayMachines

Summary:

Gets a list of all existing X-Ray machines

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IXRayMachine]

Access:

Read

Racks

Summary:

Gets a list of all existing Racks

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IRack]

Access:

Read

Paths

Summary:

Gets a list of all existing Paths

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IPath]

Access:

Read

ProductGenerators

Summary:

Gets a list of all existing Product Generators

Type:

System.Collections.Generic.List`1[BCS.Sym3.Equipment.IProductGenerator]

Access:

Read

Objects

Summary:

Gets the list of objects

Type:

System.Collections.ObjectModel.ObservableCollection`1[BCS.IBaseObject]

Access:

Read

Example:

This example shows how to loop through every object of the manager

            count = Project.Colors.Count;
            for(i=0; i

Count

Summary:

Get number of objects

Type:

System.Int32

Access:

Read

Id

Summary:

Gets the globally unique identifier (GUID) id of the object. This unique identifier is generated once at the object creation. This id will be kept unique for the entire life of the object, event after saving/loading the project.

Type:

System.Guid

Access:

Read

Example:

This example shows how to get the id of an object in a string format. The following script will output a string like 'b3122ae0-dcf7-43b6-b17c-5381afaca5cb'

            strid = Project.Colors.Get("myColor").Id.ToString();
            print(strid)
            

Name

Summary:

Gets or sets the name of the object. All objects of the same type have a unique name.

Type:

System.String

Access:

Read and Write

Example:

This example shows how to get and set the name of an object.

            // get the color name
            colorname = Project.Colors.Get("myColor").Name;
            
            // set the color name
            Project.Colors.Get("myColor").Name = "myNewName";
            

TypeName

Summary:

Gets the typename of the object. A type name doesn't contain any space characters.

Type:

System.String

Access:

Read

DisplayTypeName

Summary:

Gets the display name of the type name of the object. It returns the english display name of the type name.

Type:

System.String

Access:

Read

BaseProject

Summary:

Gets the project

Type:

IBaseProject

Access:

Read

UserPropertyInstances

Summary:

Gets a list of all the instances of user properties.

Type:

System.Collections.ObjectModel.ObservableCollection`1[BCS.IUserPropertyInstance]

Access:

Read

Examples:

//******************************************************************************
// HOW TO : Equipment - General and common properties
//******************************************************************************


//------------------------------------------------------------------------------
// How to create equipment
//------------------------------------------------------------------------------

// create a new barcode scanner (also called ATR)
var newEntity = Project.Equipment.NewBarcodeScanner()

// create a new basic shape
var newEntity = Project.Equipment.NewBasicShape()

// create a new cam pusher
var newEntity = Project.Equipment.NewCamPusher()

// create a new chute
var newEntity = Project.Equipment.NewChute()

// create a new conveyor
var newEntity = Project.Equipment.NewConveyor()

// create a new cross belt sorter
var newEntity = Project.Equipment.NewCrossBeltSorter()

// create a new diverter
var newEntity = Project.Equipment.NewDiverter()

// create a new grid
var newEntity = Project.Equipment.NewGrid()

// create a new label
var newEntity = Project.Equipment.NewLabel()

// create a new PE sensor
var conveyor = Project.Equipment.Get("CC1")
var newEntity = Project.Equipment.NewPESensor(conveyor)

// create a new polyline
var newEntity = Project.Equipment.NewPolyline()

// create a new shoe diverter
var newEntity = Project.Equipment.NewShoeDiverter()

// create a new static model
var newEntity = Project.Equipment.NewStaticModel()

// create a new tilt tray sorter
var newEntity = Project.Equipment.NewTiltTraySorter()

// create a new vertical sorter
var newEntity = Project.Equipment.NewVerticalSorter()

// create a new x-ray machine
var newEntity = Project.Equipment.NewXRayMachine()


//------------------------------------------------------------------------------
// How to access equipment
//------------------------------------------------------------------------------

// get by name using method 'Get'
var entity1 = Project.Equipment.Get("CC1")
print("Get entity by name: " + entity1.Name)

// get by name using operator []
var entity2 = Project.Equipment["CC1"]
print("Get entity by name: " + entity2.Name)

// get by index:
var entity3 = Project.Equipment[0]
print("Get entity by index: " + entity3.Name)


// get all barcode scanners
var entities = Project.Equipment.BarcodeScanners;
if (entities != null) { print(entities.Count); }

// get all basic shapes
var entities = Project.Equipment.BasicShapes;
if (entities != null) { print(entities.Count); }

// get all Chutes
var entities = Project.Equipment.Chutes;
if (entities != null) { print(entities.Count); }

// get all conveyors
var entities = Project.Equipment.Conveyors;
if (entities != null) { print(entities.Count); }

// get all cross belt sorters
var entities = Project.Equipment.CrossBeltSorters;
if (entities != null) { print(entities.Count); }

// get all diverters
var entities = Project.Equipment.Diverters;
if (entities != null) { print(entities.Count); }

// get all EStops
var entities = Project.Equipment.EStops;
if (entities != null) { print(entities.Count); }

// get all Grids
var entities = Project.Equipment.Grids;
if (entities != null) { print(entities.Count); }

// get all High speed diverters
var entities = Project.Equipment.HighSpeedDiverters;
if (entities != null) { print(entities.Count); }

// get all Labels
var entities = Project.Equipment.Labels;
if (entities != null) { print(entities.Count); }

// get all PE sensors
var entities = Project.Equipment.PESensors;
if (entities != null) { print(entities.Count); }

// get all cam pushers
var entities = Project.Equipment.CamPushers;
if (entities != null) { print(entities.Count); }

// get all shoe sorters
var entities = Project.Equipment.ShoeSorters;
if (entities != null) { print(entities.Count); }

// get all tilt tray sorters
var entities = Project.Equipment.TiltTraySorters;
if (entities != null) { print(entities.Count); }

// get all vertical sorters
var entities = Project.Equipment.VerticalSorters;
if (entities != null) { print(entities.Count); }

// get all x-ray machines
var entities = Project.Equipment.XRayMachines;
if (entities != null) { print(entities.Count); }



//------------------------------------------------------------------------------
// How to loop
//------------------------------------------------------------------------------

// loop through all equipment types:
var entities = Project.Equipment.Objects;
for (var i = 0; i < entities.Count; i++) {

    print(entities[i].Name);
}

// loop through all conveyors
var entities = Project.Equipment.Conveyors;
if (entities != null) {

    for (var i = 0; i < entities.Count; i++) {

        print(entities[i].Name);
    }
}




//------------------------------------------------------------------------------
// How to delete
//------------------------------------------------------------------------------

// remove entity
var equipment = Project.Equipment.Get("CC1")
Project.Equipment.Remove(equipment)


//------------------------------------------------------------------------------
// How to edit common properties
//------------------------------------------------------------------------------


equipment.Alias = "the alias";


equipment.X = 1;
equipment.Y = 2;
equipment.Z = 3;
equipment.Direction = 4;
equipment.Tilt = 5;
equipment.Roll = 6;
equipment.Selectable = false;
equipment.Layer = Project.Layers.Get("Layer1");
equipment.DisplayBackFace = false;
equipment.XOffset = 1;
equipment.YOffset = 1;
equipment.ZOffset = 1;
equipment.DirectionOffset = 1;
equipment.TiltOffset = 1;
equipment.RollOffset = 1;

// get parent name
print(equipment.Parent);

// set operation mode:
equipment.OperationMode = "ScreeningStationController";
equipment.OperationMode = "CascadeController";
equipment.OperationMode = "MergeSourceController";
equipment.OperationMode = "InductorController";
equipment.OperationMode = "ExternalController";