ym2_env()

Read(312) Label: initialize, model,

Description:

Initialize environment.

Syntax:

ym2_env(appPath, configFile, pythonPath)

Note:

External library function (See YModel User Reference).

 

The function initializes environment. It loads related files from the specified location by configuring parameter appPath only, which is the YModel installation directory. Return 1 when the environment configuration succeeds; otherwise return 0.

Parameter:

appPath

YModel installation directory

configFile

Full path of configuration file userconfig.xml

pythonPath

Full path of the executable file .exe for starting the Python service

Return value:

1or 0

Example:

 

A

 

1

=ym2_env("F:/ymodel")

 

2

=ym2_env("F:/ymodel","F:/ymodel/config/userConfig.xml","D:/Python39/python.exe")

 

3

=ym2_env("F:/ymodel",,"D:/Python39/python.exe")

Parameter configFile is absent.

4

=ym2_env("F:/ymodel","F:/ymodel/config/userConfig.xml")

Parameter pythonPath is absent.

5

>ym2_close()