Integrating > Integrating with Focal Point® > Exporting and importing data > Running the Export or Import from the command line
  
Running the Export or Import from the command line
System Architect offers the following command line options that allow a user to run a profile export or import automatically at startup. This can be further configured to run silently, without UI, to allow the user to setup automated data transfers using Windows Task Scheduler.
To perform an automated export or import, you need to provide several parameters in the command line to be used for the import/export: Encyclopedia location, Workspace ID (if applicable), Focal Point® User, Focal Point® Password, and System Architect Focal Point® Profile definition. The format for these parameters is described below.
Focal Point® login
Options -fpuser and -fppassword must be used together. The specified username and password is used to log into the Focal Point® Web Services.
Option
Description
-fpuser <username>
User name for logging into Focal Point® Server.
-fppassword <password>
Password for logging into Focal Point® Server.
System Architect Encyclopedia details and Focal Point® Profile definition
Command or field
Description
-encyclopedia <*.udl>
The desired SQL connection and encyclopedia must be set in a UDL file. An easy way to find the correct UDL file format is to open System Architect to the desired Encyclopedia. Using a file browser, open C:\Users\<yourUser>\AppData\Local\Telelogic\System Architect\sa2001.ini in a text editor. Find the line that starts with "LastEncyclopedia=", and then copy the *.udl file shown in this line to a new location to be used in this command line value.
-WorkspaceID <#>
This field is necessary if your encyclopedia contains Workspaces. To identify the correct Workspace number, follow the same instructions under -encyclopedia for opening sa2001.ini, and use the number listed as "LastWorkspace=". Alternatively, use SAEM to Connect to the desired Encyclopedia, and run a new query: "select id,name from workspaces". For the WorkspaceID value, use the ID #.
-fpexport <profilename>
          or
-fpimport <profilename>
Only use one of these commands (using both will default to -fpexport). Enter the name of the Focal Point® Profile definition you want to export or import depending on which trigger you use.
Test the settings before running silently
It is suggested you first setup and run the command line without running silently until you confirm all the options work as you expect. To verify successful import or export, you can add additional logging during this setup stage using your user’s sa2001.ini file, by adding the text:
[FocalPoint]
EnableLog=T
This ini setting will create a Focal Point® data transfer log located at C:\Users\<yourUser>\AppData\Local\Temp\2\SA-FocalPoint.txt
Running the command silently for use with automation
Using this option will disable System Architect’s UI, including errors and warning messages. This should not be used until you are sure the previous settings are working as you expect.
Option
Description
-disableui
This option will start System Architect as a background process to run the Focal Point® export or import and then shutdown.
Command line examples
Testing variables:
C:\Program Files (x86)\UNICOM Systems\System Architect Suite\System Architect\sa2001.exe -encyclopedia C:\SA_9E6.udl -WorkspaceID 2 -fpuser admin -fppassword focalpoint -fpexport SAToFP
Note If SAXT is installed, you must add -enableui to the command line for the GUI to appear.
Include -disableui to run silently:
C:\Program Files (x86)\UNICOM Systems\System Architect Suite\System Architect\sa2001.exe -disableui -encyclopedia C:\SA_9E6.udl -WorkspaceID 2 -fpuser admin -fppassword focalpoint -fpexport SAToFP
See also
Exporting and importing data