Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Schneider Electric
Community
Community
Notifications
close
  • Categories
  • Forums
  • Knowledge Center
  • Blogs
  • Ideas
  • Events & Webinars
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register

Contact Support

Close

Ask our Experts

Have a question related to our products, solutions or services? Get quick support on community Forums

Email Us

For Community platform-related support, please email us

New Community Ranking System
Our Community ranking system has recently been updated. You may notice changes in user rankings and receive system messages or notifications. If you have questions about how the new ranking works, please refer to the announcement post for more details (click here).

Script Window

Digital Twin

This knowledge base is addressing usage of software Experior, Machine Expert Twin and future Automation Expert Twin. These softwares are used to create smaller instances of digital twins for use in industrial automation, warehouse management, design & engineering with more..

Search in

Improve your search experience:

  • Exact phrase → Use quotes " " (e.g., "error 404")
  • Wildcard → Use * for partial words (e.g., build*, *tion)
  • AND / OR → Combine keywords (e.g., login AND error, login OR sign‑in)
  • Keep it short → Use 2–3 relevant words , not full sentences
  • Filters → Narrow results by section (Knowledge Base, Users, Products)
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select a Country

Please select a country to continue with beta search.

  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Digital Twin
  • Script Window
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close

Related Forums

  • Intelligent Devices Forum

Previous Next
Contributors
  • Kasper.Vestrup
    Kasper.Vestrup

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Digital Twin
Start a Topic
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
217 Views

Link copied. Please paste this link to share this article on your social media post.

Trying to translate this page to your language?
Select your language from the translate dropdown in the upper right. arrow
Translate to: English
  • (Français) French
  • (Deutsche) German
  • (Italiano) Italian
  • (Português) Portuguese
  • (Русский) Russian
  • (Español) Spanish

Script Window

Kasper.Vestrup Explorer
‎2026-01-05 06:03 AM

The script window in Experior allows you to call the Experior API, within an instance of Experior.

 

It allows you to interact with Experior and e.g. stimulate the active model. An example usecase could be running a model without being connected to a physical PLC.

 

The shown model below has been set up through scripting, so that the first motor starts when a load activates the first sensor and a new load will be created when the load activates the second sensor. Gif is also attached as mp4 in this article.

 

ScriptingDemo.gif

 

The script window could contain following code:

using System;
using System.Numerics;
using System.Windows.Media;
using System.Linq;
using Experior;
using Experior.Core;
using Experior.Interfaces;
using Experior.Core.Loads;
using Experior.Core.Routes;
using Experior.Core.Communication.PLC;

public partial class Main
{
    public void On(object trigger, string symbol)
	{
		if (symbol == "SENSOR1")
		{
			Experior.Core.Motors.Motor.Get("MOTOR1").Start();
		}
		
		if (symbol == "SENSOR2")
		{
			Experior.Core.Assemblies.Assembly.Get("FEEDER1").Activate();
		}
	}
	
	public void Off(object trigger, string symbol)
	{
	}
}

 

For pre-defined script helper methods, you can right-click within the script window to insert the following methods:

 

  • Initialize
  • On (default inserted)
  • Off (default inserted)
  • Motor Started
  • Motor Stopped
  • Input Changed
  • Output Changed
  • Message Received
  • Telegram Received
  • Step
  • Activation
  • Arrived
  • Enter (Action Point/Sensor)
  • Leave (Action Point/Sensor)
  • Elapsed
  • Reset
  • Pause
  • Continue
  • Dispose
 

Dispose:

 

When you press the “Compile” button in the top left of the script window the Dispose() method is called. You can use this method to unsubscribe from events and perform other clean-up actions.

 

Note: Since the Dispose() method is called before the compilation happens, it will not be the current version of the Dispose method as that one has not been compiled yet. It will be the Dispose method from the last time you compiled.

 

To make sure the Dispose method that is called matches the most recent implementation, it is best to compile every time you make changes to your Dispose method.

 

Initialize:

 

The Initialize method, runs as soon as compiling the script finishes.

 

On:

 

This method is called when:

 

  • Receiving input through a connection and the incoming data is of the type bool and its value is “True”.
  • When a button is pressed in the “Control Panel” window.
  • When a sensor is activated by a load.
 

Off:

Same as On, but the value is “False”.

 

Motor Started:

Is called when a motor is started.

 

Motor Stopped:

Is called when a motor is stopped.

 

Input Changed:

This is called when the input changes.

 

Output Changed:

This is called when the output changes.

 

Message Received:

Called when a message is received.

 

Telegram Received:

Called when a telegram is received.

 

Step:

Called at every frame update.

 

Activation:

Called when an SRM is created.

 

Arrived:

Called when a load arrives at a node.

 

Enter:

Called when a load enters a sensor or actionpoint.

 

Leave:

Called when a load leaves a sensor or actionpoint.

 

Elapsed:

Called when a timer elapses.

 

Reset:

Called when the scene is being reset.

 

Pause:

Called when the scene or model gets paused.

 

Continue:

Called when the scene or model gets unpaused.

Labels (2)
Labels:
  • Exp-7 Developer
  • Experior 7
Attachments
ScriptingDemo.mp4

Link copied. Please paste this link to share this article on your social media post.

You’ve reached the end of your document

WHAT’S NEXT?

Ask our Experts

Didn't find what you are looking for? Ask our experts!

My Dashboard

Check out the new Feeds and activities that are relevant to you.

To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support

    Ask our Experts

    Have a question related to our products, solutions or services? Get quick support on community Forums

    Email Us

    For Community platform-related support, please email us

Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2026 Schneider Electric

Welcome!

Welcome to your new personalized space.

of

Explore