Package wt.load
Class LoadFromFile
java.lang.Object
wt.load.LoadFromFile
USAGE:
windchill wt.load.LoadFromFile -d [data file name] -u [user name] -p [user password] -CONT_PATH [container path]
The LoadFromFile loads test case data into Windchill.
Note: On Windows operating systems, if a LoadFromFile argument includes spaces, you must enclose the argument in double quotes (" ") and precede the quotes (escaped) with a backslash (\). For example, where "part 4" includes spaces in the CONT_PATH argument
windchill wt.load.LoadFromFile
-d D:\Dev\LoadfileforTesting\Part.xml
-CONT_PATH \"/wt.inf.container.OrgContainer=TST/wt.pdmlink.PDMLinkProduct=part 4\"
LoadFromFile Arguments:
d [data file name] Specifies the name of the object file that contains the objects to be loaded into the Windchill database. It is recommended that you provide the full path name of the data file. The file must reside on the Windchill server. Data file should be in xml format. If you have old csv load file, refer to
u [user name] Specifies the name of the user to authenticate the additions being made to the database. The user argument is optional for the command line; however, the LoadFromFile utility will prompt for user authentication using a pop-up window. This argument is optional.
p [user password] Specifies the password for the authenticating user. The password argument is optional for the command line, however, the LoadFromFile utility will prompt for user authentication using a pop-up window. This argument is optional.
CONT_PATH [target container path] Specifies the target container for the data when the target container is not "Exchange". By default, the target container is "Exchange". This argument is optional.
Supported API: true
windchill wt.load.LoadFromFile -d [data file name] -u [user name] -p [user password] -CONT_PATH [container path]
The LoadFromFile loads test case data into Windchill.
Note: On Windows operating systems, if a LoadFromFile argument includes spaces, you must enclose the argument in double quotes (" ") and precede the quotes (escaped) with a backslash (\). For example, where "part 4" includes spaces in the CONT_PATH argument
windchill wt.load.LoadFromFile
-d D:\Dev\LoadfileforTesting\Part.xml
-CONT_PATH \"/wt.inf.container.OrgContainer=TST/wt.pdmlink.PDMLinkProduct=part 4\"
LoadFromFile Arguments:
d [data file name] Specifies the name of the object file that contains the objects to be loaded into the Windchill database. It is recommended that you provide the full path name of the data file. The file must reside on the Windchill server. Data file should be in xml format. If you have old csv load file, refer to
CSV2XML for converting it to xml before loading.
This argument is required.
u [user name] Specifies the name of the user to authenticate the additions being made to the database. The user argument is optional for the command line; however, the LoadFromFile utility will prompt for user authentication using a pop-up window. This argument is optional.
p [user password] Specifies the password for the authenticating user. The password argument is optional for the command line, however, the LoadFromFile utility will prompt for user authentication using a pop-up window. This argument is optional.
CONT_PATH [target container path] Specifies the target container for the data when the target container is not "Exchange". By default, the target container is "Exchange". This argument is optional.
Supported API: true
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddoFileImport(String data_filename, String map_filename, String out_filename, String token, String method, String user, Hashtable cmd_line) Method used by other methods to load data into the Windchill system.static voiddoFileLoad(String data_filename, String map_filename, String out_filename, String token, String method, String user, Hashtable cmd_line) Method used by other methods to load data into the Windchill system.static voiddoFileLoad(String data_filename, String out_filename, String method, String user, Hashtable cmd_line) Method used by other methods to load data into the Windchill system.static voidCommand line method to load data into the Windchill system.
-
Method Details
-
main
Command line method to load data into the Windchill system.- Parameters:
args- Parameters passed in on the command line.- Throws:
WTException-
Supported API: true
-
doFileLoad
public static void doFileLoad(String data_filename, String out_filename, String method, String user, Hashtable cmd_line) Method used by other methods to load data into the Windchill system. The user should be an authenticated user before calling this method.- Parameters:
data_filename- Full pathname of file with data to be loaded.map_filename- Full pathname of file with mapping of attribute names to sequence of data in the data file.out_filename- Not currently implemented. To be a trace or recovery file.token- The token used to delimit fields of data in the data file.method- A string used with the object name (the first field) from the data file to key into the mapdata file. The line in the map data file will then contain the method name to pass this information to and the ordered list of fieldnames to match with the line in the data file.user- The user to execute the method, if no user is given in the line from the data file.cmd_line- Name/Value variables that can be substituted into the data from the data file.
Supported API: true
-
doFileLoad
public static void doFileLoad(String data_filename, String map_filename, String out_filename, String token, String method, String user, Hashtable cmd_line) Method used by other methods to load data into the Windchill system. The user should be an authenticated user before calling this method.- Parameters:
data_filename- Full pathname of file with data to be loaded.out_filename- Not currently implemented. To be a trace or recovery file.method- A string used with the object name (the first field) from the data file to key into the mapdata file. The line in the map data file will then contain the method name to pass this information to and the ordered list of fieldnames to match with the line in the data file.user- The user to execute the method, if no user is given in the line from the data file.cmd_line- Name/Value variables that can be substituted into the data from the data file.
Supported API: true
-
doFileImport
public static void doFileImport(String data_filename, String map_filename, String out_filename, String token, String method, String user, Hashtable cmd_line) throws WTException Method used by other methods to load data into the Windchill system. The user should be an authenticated user before calling this method. This method is very similar to doFileLoad. The only difference is that this method throws the exceptions.- Parameters:
data_filename- Full pathname of file with data to be loaded.map_filename- Full pathname of file with mapping of attribute names to sequence of data in the data file.out_filename- Not currently implemented. To be a trace or recovery file.token- The token used to delimit fields of data in the data file.method- A string used with the object name (the first field) from the data file to key into the mapdata file. The line in the map data file will then contain the method name to pass this information to and the ordered list of fieldnames to match with the line in the data file.user- The user to execute the method, if no user is given in the line from the data file.cmd_line- Name/Value variables that can be substituted into the data from the data file.
Supported API: true- Throws:
WTException
-