EPLAN.EPLAN21.DATABASE.IMPORT

Contents

Description

Command for importing EPLAN 21 working sets.

The EPLAN.EPLAN21.DATABASE.IMPORT command is called up via the API functions as specified in the EPLAN 21 API.

Parameters

All parameters have the prefix "EPL_PARAM_DATABASE_IMPORT_".

ParameterID Type Description
FILENAMES [IN, INDEX]
Integer/String

List containing the names of the databases to be created and the projects to be imported

Below index 0 there is an integer value containing the number of file names.
All further values from index 1 up to the last value include file names or empty entries as separators between the various databases. The file name for the database is followed by any number of file names or the projects to be imported into this database.

Example:
FILENAMES [ 0 ] = 5;
FILENAMES [ 1 ] = 'c:\test_path\db_1.db';
FILENAMES [ 2 ] = 'c:\test_path\project_1.prj';
FILENAMES [ 3 ] = ''; // Separator between databases
FILENAMES [ 4 ] = 'c:\test_path\db_2.db';
FILENAMES [ 5 ] = 'c:\test_path\project_2.prj';

DESCRIPTION [IN, OPTIONAL]
String

Description text of the working set to be created.

This text applies to all databases (main and subdatabases) belonging to a working set and can be used to clearly subdivide connected databases.

RESDBNAME [IN, OPTIONAL]
String

Name of the resource database to be used.

The specified resource database is opened or newly created.

MACRODBNAME [IN, OPTIONAL]
String

Name of the macro database to be used.

The specified macro database is opened or newly created.

USERNAME [IN, OPTIONAL]
String

User name for the main database.

PASSWORD [IN]
String

Password for the main database.

RESDBFLAG [IN, OPTIONAL]
Boolean

Read-only flag for the resource database.

1: Database is opened read-only.
0: Database is opened read-write (default).

MACRODBFLAG [IN, OPTIONAL]
Boolean

Read-only flag for the macro database.

1: Database is opened read-only.
0: Database is opened read-write (default).

USELOCALFLAG [IN, OPTIONAL]
Boolean

Flag for using local resources and macros

1: Use local resources and macros
0: Do not use local resources and macros (default)

Local resources and macros can only be used if a resource or macro database is specified, otherwise this flag is meaningless.

FORCELOCAL [IN, OPTIONAL]
Boolean

Flag enforces creation of local resources and macros

1: Only create local resources and macros
0: Create resources and macros according to the user group (default)

Local resources and macros can only be used if a resource or macro database is specified, otherwise this flag is meaningless.

DBHANDLE [OUT]
EplHandle

Handle to the generated main database.

Error Messages

The eplExecuteCommand function returns EPL_OK if the databases of the working set could be correctly imported.

If the command fails, eplExecuteCommand returns the value EPL_ERROR. In this case, the error log can contain the following errors:

ErrorID Description
EPL_ERR_DATABASE_IMPORT_DB_ALREADY_EXISTS There is already one database with one of the transferred names. The name of the already existing database can be queried via the EPL_PARAM_COMMAND_ERROR_PARAM01 property.
EPL_ERR_DATABASE_IMPORT_FILE_NOT_FOUND No project file with one of the transferred names could be found. The name of the project file, that was not found, can be queried via the EPL_PARAM_COMMAND_ERROR_PARAM01 property.

Reference