GO2cam Javascript API  6.11
GO2SUtil Class Reference

Class of utility functions. More...

Inherits QObject.

Static Public Member Functions

static void ExecuteProgram (String filename, Array< String > arg=Array< String >())
 
static String GenerateName (String name="", String prefix="", String suffix="")
 
static void ImportJS (String dir, String name)
 
static void ImportJS (String name)
 

Detailed Description

Class of utility functions.

Member Function Documentation

◆ ExecuteProgram()

static void GO2SUtil::ExecuteProgram ( String filename,
Array< String > arg = Array< String >() )
static

Execute an external program

GO2SUtil.ExecuteProgram("C:\\GO2cam_Intl\\GO2camV610\\GO2cam.exe");
Class of utility functions.
Definition GO2SUtil.hpp:12
static void ExecuteProgram(String filename, Array< String > arg=Array< String >())
Parameters
[in]filenamepath of the executable
[in]argarguments for the executable

◆ GenerateName()

static String GO2SUtil::GenerateName ( String name = "",
String prefix = "",
String suffix = "" )
static

Generate a name not already existing in database

var name = GO2SUtil.GenerateName("GO2cam", "robot");
static String GenerateName(String name="", String prefix="", String suffix="")

Output: GO2cam_robot, if already exist in Bdd -> GO2cam_robot_1

Returns
a String name.
Parameters
[in]name
[in]prefix
[in]suffix

◆ ImportJS() [1/2]

static void GO2SUtil::ImportJS ( String dir,
String name )
static

Import another script and execute it

Warning
if 2 variables or functions have the same name, the last one is kept
Parameters
[in]dirpath of the include file
[in]namefile name of the include file

◆ ImportJS() [2/2]

static void GO2SUtil::ImportJS ( String name)
static

Import another script and execute it

Warning
if 2 variables or functions have the same name, the last one is kept
Parameters
[in]namefullName of the include file