Simulator mode detection using scripting

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
pepijn_h
Posts: 6
Joined: Mon Sep 17, 2018 2:50 am

Simulator mode detection using scripting

Post by pepijn_h »

Hi all,

I was wondering if there is a way in iX developer to determine if the project is in the simulator mode.
Use case: Automatically change the com port number to another defined COM port if the simulator is launched. The com port numbers differ between PC and Beijer terminal.

P.S. I currently use a define to select the simulator mode but that is still a manual process to change between simulator and real terminal.

Cheers and thanks in advance,

Pepijn Hogervorst

kim
Posts: 15
Joined: Fri Feb 03, 2012 11:38 am

Re: Simulator mode detection using scripting

Post by kim »

Hi

Below a code I am using successfully (X2 Pro terminal, not PC)

Code: Select all

	if(System.Environment.OSVersion.Platform == PlatformID.WinCE)
				sXmlFiles = @"\Hard Disk\Parameters\";		
			else
				sXmlFiles = @"C:\Parameters\";

pepijn_h
Posts: 6
Joined: Mon Sep 17, 2018 2:50 am

Re: Simulator mode detection using scripting

Post by pepijn_h »

Thanks that is exactly what I need!

Post Reply