The Smart 3D Web API configuration utility offers much of the same functionality through the command line. The same executable can be invoked by command line using the following format:
[exe folder]>start /wait Smart3DWebApiConfigurationUtility.exe [argument(s)]
The start command with the /wait argument is necessary to run the program in command line mode; otherwise, the command window immediately prompts for the next line to be entered, and might cause issues with future user input.
Arguments Overview
Command |
Argument |
Description |
---|---|---|
Help |
/? |
Used to request usage information about the available commands |
Import |
/i |
Used to import a saved configuration |
Export |
/x |
Used to export the current configuration |
Metadata |
/m |
Used to regenerate the metadata for the enabled plants |
Database |
/w |
Used to create a configuration database |
Validate |
/v |
Used to validate the current setup through a series of tests |
You cannot combine commands. For example, /i (Import) cannot be combined with /w (Database) or /m (Metadata).
Qualifiers |
Argument |
Description |
---|---|---|
Encrypt |
/e |
Used to encrypt a file |
Decrypt |
/d |
Used to decrypt a file |
Password |
/p |
Used to supply a password for a command |
File |
/f |
Used to supply the file path for a command |
Name |
/n |
Used to supply the name of an item for a command |
UserName |
/u |
Used to supply the username for a command |
Server |
/s |
Used to supply the server name for the database |
Type |
/t |
Database type (MSSQL or Oracle) |
Migrate Database |
/migrate |
Used to migrate the Web API configuration database if it is out-of-date |
Help Command
Use /? to bring up a quick reference guide to the commands, arguments, and needed parameters for different actions.
Example
start /wait Smart3DWebApiConfigurationUtility.exe /?
Encrypt Command
Use /e to encrypt a file.
Parameters
-
File, /f [file path], required, file path is the path to the file to encrypt.
-
Password, /p [password], optional; password is the encryption key to use.
-
If not given, then the password will be prompted in a character hidden input.
-
Remember this key for later to use as the password for decrypting the file.
-
Examples
start /wait Smart3DWebApiConfigurationUtility.exe /e /f C:\MyConfig.json
start /wait Smart3DWebApiConfigurationUtility.exe /e /f C:\MyConfig.json /p MyPassword
Decrypt Command
Use /d to decrypt a file. The resulting decrypted file overwrites the encrypted file.
Parameters
-
File, /f [file path], required; file path is the path to the encrypted file to decrypt.
-
Password, /p [password], optional; password is the key that was used to encrypt.
-
If not given, then the password will be prompted in a character hidden input.
-
Examples
start /wait Smart3DWebApiConfigurationUtility.exe /d /f C:\MyConfig.json
start /wait Smart3DWebApiConfigurationUtility.exe /d /f C:\MyConfig.json /p MyPassword
Database Command
Use /w to create or set up the Smart 3D Web API configuration database.
Parameters
-
Type, /t, the type of database to use (DB Provider)
-
Server, /s, the server where the database exists
-
Name, /n, name of the database to use
-
User, /u, optional; use to provide admin credentials. If not given, then integrated Windows Authentication is used
-
Password, "/p", optional, password corresponding to user
-
Migrate Database, /migrate, optional, used to migrate an out-of-date Web API configuration database. If not given, you are prompted to press Y to migrate or N to abort.
Examples
start /wait Smart3DWebApiConfigurationUtility.exe /w /t MSSQL /s MyServer /n DbName
start /wait Smart3DWebApiConfigurationUtility.exe /w /t MSSQL /s MyServer /n DbName /u UserName /p Password
start /wait Smart3DWebApiConfigurationUtility.exe /w /t MSSQL /s MyServer /n DbName /migrate
Import Command
Use /i to import a saved configuration from file to replace the current setup. Run this command on the computer that will act as the Web Server. If the configuration database referenced in the file does not exist or does not have the Web API tables, run the Database command and try again.
Parameters
-
File, /f [file path], required, file path is the path to the saved configuration.
-
Password, /p [password], optional, password is the key that was used to encrypt.
-
If not given and encrypted, then the password will be prompted in a character hidden input.
-
-
Migrate Database, /migrate, optional, used to migrate out-of-date Web API configuration databases. If not given, you are prompted to press Y to migrate or N to abort.
Examples
start /wait Smart3DWebApiConfigurationUtility.exe /i /f C:\MyConfig.json
start /wait Smart3DWebApiConfigurationUtility.exe /i /f C:\MyConfig.json /p MyPassword
start /wait Smart3DWebApiConfigurationUtility.exe /i /f C:\MyConfig.json /migrate
Export Command
Use /x to export the current configuration to a file. Run this command on the computer that acts as the Web Server to have access to the Web.config file.
Parameters
-
File, /f [file path], required; file path is the path to the saved configuration.
-
Decrypt, /d, optional; used to indicate that the exported configuration file should be unencrypted.
-
Password, /p [password], optional; password is the key that was used to encrypt.
-
If not given and decrypt argument is not given, then the password will be prompted in a character hidden input.
-
Examples
start /wait Smart3DWebApiConfigurationUtility.exe /x /f C:\MyConfig.json
start /wait Smart3DWebApiConfigurationUtility.exe /x /f C:\MyConfig.json /p MyPassword
start /wait Smart3DWebApiConfigurationUtility.exe /x /f C:\MyConfig.json /d
Metadata Command
Use /m to regenerate the metadata for enabled plants.
Parameters
-
File, /n [name of plant], optional; used to restrict regeneration of metadata to a given plant.
-
If not given, then the metadata for all currently enabled plants is regenerated.
-
Example
start /wait Smart3DWebApiConfigurationUtility.exe /m
start /wait Smart3DWebApiConfigurationUtility.exe /m /n MyPlant