Model Samples and C#Templates in Machine Expert Twin
With the installer of ExoStruxure Machine Expert twin you get access to C# templates that you can use to setup custom catalog, controller, or plugins in Visual Studio. You also get access to a sample library that is going to grow over time.
You will find both in the installed EcoStruxure Machine Expert Twin folder.
By default the templates library will be found at:
C:\Program Files\Schneider Electric\EcoStruxure Machine Expert Twin\Templates
and the samples library will be found at:
C:\Program Files\Schneider Electric\EcoStruxure Machine Expert Twin\Samples
Templates

Samples

Using the templates
To set up the templates you first need to copy the template in the C# visual studio template folder. The standard path for this is:
C:\Users\ your username \Documents\Visual Studio 20XX\Templates\ProjectTemplates\Visual C#
Due to the problems of Visual Studio cache to refresh the templates and display them in the browser, it is necessary to open the Visual Studio command prompt, which is located in following folder:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 20XX\Visual Studio Tools
Run the ‘Developer Command Prompt for VS 20XX’ as administrator and write:
devenv /installvstemplates
The templates are now available to work with in Visual Studio, to get your projects to work in EcoStruxure Machine Expert Twin the file must start with Experior.Catalog/Plugin/Template. after the dot, you can name it whatever you wish.
The last things you need to configure, is in the solution properties.
1. We suggest that you use the same ‘Assembly name’ as the ‘default namespace’.
2. In the ‘Build’ tab, make sure that you have the ‘EcoStruxure Machine Expert Twin’ folder selected as the ‘output path’.
3. In the ‘Debug’ tab, set ‘Start action’ as ‘Start external program’ and set the ‘MachineExpertTwin.exe’ from the directory folder. This should be part of the templates already, but better make sure before starting work.
Last Note: In order to compile your project into EcoStruxure Machine Expert Twin folder, you need to run Visual Studio as adminstrator, to have the priviliges to add the .dll to the folder.
Using the Samples
To use the samples provided you simply need to open the file and it should open up in EcoStruxure Machine Expert Twin. If you want to work with the samples you should be aware that if you save EcoStruxure Machine Expert Twin will overwrite the sample. So if you want to preserve the original sample, be sure to ‘save as’ and give your project a new name before you work on the sample.