Type: BCS.Sym3.ISym3Project

Common class for all Sym3 products

Properties


ActionService

  • Description: Get the action service
  • Type: IActionService
  • Access: Read

AlarmPriorities

  • Description: Gives access to the alarm priorities manager
  • Type: IAlarmPriorityManager
  • Access: Read

Alarms

  • Description: Gives access to the alarm manager
  • Type: IAlarmManager
  • Access: Read

ApplicationSavedVersion

  • Description: Get application saved version
  • Type: String
  • Access: Read

Audios

  • Description: Gets the audio resource manager
  • Type: IResourceAudioManager
  • Access: Read

Author

  • Description: Gets or sets project author - information only
  • Type: String
  • Access: Read and Write

BaseProject

  • Description: Gets the project
  • Type: IBaseProject
  • Access: Read

Cameras

  • Description: Gives access to the camera manager
  • Type: ICameraManager
  • Access: Read

ClearedIdentifiedColor

  • Description: Gets or sets the color of a product that is cleared and identified
  • Type: IResourceColor
  • Access: Read and Write

ClearedUnidentifiedColor

  • Description: Gets or sets the color of a product that is cleared and unidentified
  • Type: IResourceColor
  • Access: Read and Write

ClientScripts

  • Description: Gets the manager of client scripts
  • Type: IClientScriptManager
  • Access: Read

Colors

  • Description: Gets the color resource manager
  • Type: IResourceColorManager
  • Access: Read

ConveyorType

  • Description: Gets Conveyor type global settings
  • Type: IEquipmentTypeConveyor
  • Access: Read

CurrentProjectVersion

  • Description: Gets current project version
  • Type: Int32
  • Access: Read

Databases

  • Description: Gets the Database Device manager
  • Type: IDatabaseDeviceManager
  • Access: Read

Datalogs

  • Description: Gives access to the datalog manager
  • Type: IDatalogManager
  • Access: Read

DataSourceIOs

  • Description: Gives access to the datasource IO manager
  • Type: IDataSourceIOManager
  • Access: Read

DataSources

  • Description: Gives access to the datasource manager
  • Type: IDataSourceManager
  • Access: Read

DataTypes

  • Description: Gets the data types manager
  • Type: IUserDefinedTypeManager
  • Access: Read

Description

  • Description: Gets or sets project description - information only
  • Type: String
  • Access: Read and Write

DeviceIOs

  • Description: Gets the Device IOs manager
  • Type: IDeviceIOManager
  • Access: Read

Devices

  • Description: Gets the Device manager
  • Type: IProgammableLogicControlManager
  • Access: Read

DisplayTypeName

  • Description: Gets the display name of the type name of the object. It returns the english display name of the type name.
  • Type: String
  • Access: Read

DistanceUnit

  • Description: Gets the distance unit for the project

          This example shows you how to get the unit
    
          // get project to use foot
          if(Project.DistanceUnit == BCS.DistanceUnit.Imperial)
              print("Imperial units")
          if(Project.DistanceUnit == BCS.DistanceUnit.Metrics)
              print("Metrics units")
    
  • Type: DistanceUnit

  • Access: Read


Equipment

  • Description: Gets the equipment manager
  • Type: IEquipmentManager
  • Access: Read

EventQueueSize

  • Description: Gets event queue size
  • Type: Int32
  • Access: Read

Frames

  • Description: Gives access to the frame manager
  • Type: IFrameManager
  • Access: Read

FullPathName

  • Description: Gets the full path of the project on disk
  • Type: String
  • Access: Read

HotKeys

  • Description: Gets the hot key manager
  • Type: IHotKeyManager
  • Access: Read

Id

  • Description: 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: Guid
  • Access: Read and Write
  • 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)
            

Images

  • Description: Gets the image resource manager
  • Type: IResourceImageManager
  • Access: Read

IsDesignerProject

  • Description: Tells if this is a Designer project
  • Type: Boolean
  • Access: Read

IsIntegratorProject

  • Description: Tells if this is an Integrator project
  • Type: Boolean
  • Access: Read

IsOperatorProject

  • Description: Tells if this is an Operator project
  • Type: Boolean
  • Access: Read

Languages

  • Description: Gives access to the language manager
  • Type: ILanguageManager
  • Access: Read

Layers

  • Description: Gets the layer manager
  • Type: ILayerManager
  • Access: Read

LineRunningBackwardColor

  • Description: Gets or sets the line color of a conveyor when the conveyor is running backward
  • Type: IResourceColor
  • Access: Read and Write

LineRunningForwardColor

  • Description: Gets or sets the line color of a conveyor when the conveyor is running forward
  • Type: IResourceColor
  • Access: Read and Write

LineStoppedColor

  • Description: Gets or sets the line color of a conveyor when the conveyor is stopped
  • Type: IResourceColor
  • Access: Read and Write

LiveValueService

  • Description: Get the live value service
  • Type: ILiveValueService
  • Access: Read

LogicalProcessors

  • Description: Gets the logical processor manager
  • Type: ILogicalProcessorManager
  • Access: Read

Macros

  • Description: Gets the manager of macros
  • Type: IMacroManager
  • Access: Read

Managers

  • Description: Gets a dictionnary of all instance of managers
  • Type: IDictionary
  • Access: Read

Messages

  • Description: Gets the message manager
  • Type: IMessageManager
  • Access: Read

ModificationState

  • Description: Gets or sets project state (modified or not)
  • Type: ProjectModificationState
  • Access: Read and Write

MyEquipmentTypes

  • Description: Gets the MyEquipment type manager
  • Type: IMyEquipmentTypeManager
  • Access: Read

Name

  • Description: Gets or sets the name of the object. All objects of the same type have a unique name.
  • Type: 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";
            

NameSuffix

  • Description: The project explorer will display this after the Name of this object.
  • Type: String
  • Access: Read

Permissions

  • Description: Gives access to the permission manager
  • Type: IPermissionManager
  • Access: Read

PESensorDefaultHeight

  • Description: Get/set the default height(Z) of physics / standard PE sensor
  • Type: Double
  • Access: Read and Write

PhysicsFloorZLevel

  • Description: Gets or sets the (invisible) physics floor that catches products on physics equipment when they fall off.
  • Type: Double
  • Access: Read and Write

PhysicsProductDefaultFriction

  • Description: Get/set the default friction of newly created products.
  • Type: Double
  • Access: Read and Write

PhysicsProductDefaultMass

  • Description: Get/set the default mass of newly created products.
  • Type: Double
  • Access: Read and Write

Product

  • Description: Gets product
  • Type: Sym3SuiteProduct
  • Access: Read

ProductMenu

  • Description: Get/set menu associated to a product
  • Type: IResourceMenu
  • Access: Read and Write

Products

  • Description: Gets access to product manager
  • Type: IProductManager
  • Access: Read

ProductShape

  • Description: Get/set global product shape
  • Type: IProductShape
  • Access: Read and Write

ProductShapes

  • Description: Gets the product shape manager
  • Type: IProductShapeManager
  • Access: Read

ProductType

  • Description: Gets Product type global settings
  • Type: IEquipmentTypeProduct
  • Access: Read

ProjectFileVersion

  • Description: Gets project file version. This version is incremented each time a modification is done in the project file structure/format
  • Type: Int32
  • Access: Read

ProjectGuid

  • Description: Gets project global ID
  • Type: String
  • Access: Read

RejectedIdentifiedColor

  • Description: Gets or sets the color of a product that is rejected and identified
  • Type: IResourceColor
  • Access: Read and Write

RejectedUnidentifiedColor

  • Description: Gets or sets the color of a product that is rejected and unidentified
  • Type: IResourceColor
  • Access: Read and Write

Reports

  • Description: Gets the report manager
  • Type: IReportManager
  • Access: Read

Roles

  • Description: Gives access to the role manager
  • Type: IRoleManager
  • Access: Read

SelectionService

  • Description: Gets the selection service
  • Type: IObjectSelectionService
  • Access: Read

ServerScripts

  • Description: Gets the manager of server scripts
  • Type: IServerScriptManager
  • Access: Read

Services

  • Description: Gets the Service manager
  • Type: IServiceManager
  • Access: Read

Settings

  • Description: Gets global settings
  • Type: IGlobalProjectSettings
  • Access: Read

SimulationIsRunning

  • Description: Indicates if the simulation is running
  • Type: Boolean
  • Access: Read

SimulationScripts

  • Description: Gets the manager of simulation scripts
  • Type: ISimulationScriptManager
  • Access: Read

SimulationState

  • Description: Gets or sets the simulation state (stopped, running, paused)
  • Type: SimulationRunningState
  • Access: Read and Write

SimulationStateToString

  • Description: Gets project status in a display string
  • Type: String
  • Access: Read

SimulationTime

  • Description: Gets the current simulation time
  • Type: Int64
  • Access: Read

SubSystems

  • Description: Gets the Sub Systems Manager
  • Type: ISubSystemManager
  • Access: Read

SystemProperties

  • Description: Gets the system properties manager
  • Type: ISystemPropertyManager
  • Access: Read

Tags

  • Description: Gives access to the tag manager
  • Type: ITagManager
  • Access: Read

Templates

  • Description: Gets the template manager
  • Type: ITemplateManager
  • Access: Read

Texts

  • Description: Gets the text resource manager
  • Type: IResourceTextManager
  • Access: Read

TimeoutIdentifiedColor

  • Description: Gets or sets the color of a product that is time-out and identified
  • Type: IResourceColor
  • Access: Read and Write

TimeoutUnidentifiedColor

  • Description: Gets or sets the color of a product that is time-out and unidentified
  • Type: IResourceColor
  • Access: Read and Write

TypeName

  • Description: Gets the typename of the object. A type name doesn’t contain any space characters.
  • Type: String
  • Access: Read

Types

  • Description: Gets the Type manager.
  • Type: ITypeManager
  • Access: Read

UnknownIdentifiedColor

  • Description: Gets or sets the color of a product that is unknown and identified
  • Type: IResourceColor
  • Access: Read and Write

UnknownUnidentifiedColor

  • Description: Gets or sets the color of a product that is unknown and unidentified
  • Type: IResourceColor
  • Access: Read and Write

UserEquipmentTypes

  • Description: Gets the user equipment type manager. Kept for backward compatibility. Please use MyEquipmentTypes instead.
  • Type: IMyEquipmentTypeManager
  • Access: Read

UserProperties

  • Description: Gets the user properties manager
  • Type: IUserPropertyManager
  • Access: Read

UserPropertyInstances

  • Description: Gets a list of all the instances of user properties.
  • Type: ObservableCollection`1
  • Access: Read

Users

  • Description: Gives access to the user manager
  • Type: IUserManager
  • Access: Read

Version

  • Description: Gets or sets project version - information only
  • Type: String
  • Access: Read and Write

Views

  • Description: Gets access to the view manager.
  • Type: IViewManager
  • Access: Read

WarpSpeed

  • Description: Gets or sets the warp speed
  • Type: Double
  • Access: Read and Write

Windows

  • Description: Gives access to the window manager
  • Type: IWindowManager
  • Access: Read

Methods


AddManager(BCS.IBaseManager)

Adds a manager to the project

  • Parameters:
    • managerToAdd: manager to add

CallSimulationScriptFunction(System.String)

Call a simulation script function. Will log a warning if function not found works only when simulation is running

  • Parameters:
    • functionName: Name of function to call

Close

Closes the project


ConnectEquipment(System.Action{System.Int32,System.String})

Connects neighbouring equipments of the project with source and destination


CopyToClipboard(System.Collections.ICollection)

Copies a collection of object to clipboard

  • Parameters:
    • objects:

DumpEventQueue(System.String)

Dump event queue in a CSV file

  • Parameters:
    • file: Where to save file

ForceRename(System.String,System.Boolean)

Rename the object.

  • Parameters:
    • value: The new name.
    • fireChangingEvent: If false, no change event will fire. In particular, this disables the check for duplicate names, which can be costly as it has to check every equipment. The caller is responsible for ensuring that value is a unique name, or Bad Things will happen.

FromXmlString(BCS.IToolXmlToObjectHelper)

Init object from IToolXmlToObjectHelper. All properties found in the RootElement of IToolXmlToObjectHelper will be set with the value in the rootElement

  • Parameters:
    • xmlHelperObj: xmlHelperObj IToolXmlToObjectHelper

FromXmlString(System.String)

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

  • Parameters:
    • xmlText: Xml string

FromXmlString(System.Xml.Linq.XElement)

Init object from root element. All properties found in the XElement will be set with the value in the XElement

  • Parameters:
    • objXml: objXml XElement

Get(System.String)

Gets an object by name (in all the project)

  • Parameters:
    • name: name to serach for
  • Returns:
    • Found object. Will be null if not found

GetAllDeviceIOs

Gets all the device IO


GetCopyPasteXml

Converts the object into an XML string including overrides for for copy/paste functionality

  • Returns:
    • the string that contains xml version of the object for copy/paste

GetManagerByObjectTypeName(System.String)

Gets a manager by the object type name

  • Parameters:
    • objectTypeName:

GetObjectById(System.Guid)

Gets an object by Global ID (in all the project)

  • Parameters:
    • guid: global id to search for
  • Returns:
    • Found object. Will be null if not found

GetObjectManager(BCS.IBaseObject)

Gets a manager from an object

  • Parameters:
    • obj:

GetObjectXml(System.Collections.ICollection)

Get xml string of collection of object

  • Parameters:
    • objects:

GetPerformanceStats

Get (Logical Processor) performance stats for the simulation

  • Returns:
    • xml string with stats values

GetUserPropertyInstance(System.String)

Gets the user property instance of the specified name

  • Parameters:
    • 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;
            }
            

GetUserPropertyValue(System.String)

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:
    • 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"];
            

IsUserProperty(System.String)

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

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

Open(System.String,BCS.ObjectReadCallback,System.Collections.Generic.List{System.String}@)

Open project file

  • Parameters:
    • fileName: project file to open
    • callBack: a callback each time an object is read from the project file
    • errorList: a list of all error found during loading.

PauseResumeSimulation

Pauses or resumes simulation

  • Example:
This example shows you how to pause/resume a simulation

            Project.PauseResumeSimulation();
            

RemoveObject(BCS.IBaseObject)

Removes an object form the project

  • Parameters:
    • obj: Object to remove
  • Returns:
    • true if success

RemoveObjects(System.Collections.IList)

Removes a list of object from the project

  • Parameters:
    • objects: list of objects to remove
  • Returns:
    • true if success

Save

Save current project to existing file name


SaveAs(System.String)

save project as

  • Parameters:
    • fileName: filename where to save project

SaveSubSystems(System.String,System.Collections.Generic.List{System.String})

Save one or more subsystems to a separate project.

  • Parameters:
    • filename: The filename of the project to save the subsystems to.
    • subSystemNames: The names of the subsystems to save.

SetUserPropertyValue(System.String,System.Object)

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:
    • userPropertyName: The name of the user property to set.
    • 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;
            

StartSimulation(System.Boolean)

Start the simulation.

  • Parameters:
    • enableReplayRecording: If true, record a replay.
  • Example:
Starting a simulation with recording disabled:

            Project.StartSimulation(false);
            

StartSimulation(System.DateTime,System.Boolean)

Starts the simulation at a specified time

  • Parameters:
    • time: Datetime. Please refer to .Net documentation about the DateTime class
    • enableReplayRecording: If true, record a replay.
  • Example:
Starting a simulation at a specified datetime with recording disabled:

            // start in 1 hour
            var dt = System.DateTime.Now();
            dt.AddHours(1);
            Project.StartSimulation(dt, false);
            

StopSimulation

Stops the simulation

  • Example:
This example shows you how to stop a simulation.

            Project.StopSimulation();
            

StopSimulation(System.Boolean)

Stops the simulation

  • Parameters:
    • silent: if silent is true, the UI will not be notified and will not pop up a confirmation message
  • Example:
This example shows you how to stop a simulation.

            Project.StopSimulation(true);
            

ToCSVString(System.Char)

Returns the object in a CSV string.

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

ToXmlString

Converts the object in an xml string

  • Returns:
    • the string that contains xml version of the object