cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling LoadFromFile utility in Custom java class ??

Granite

Calling LoadFromFile utility in Custom java class ??

Hello All, Normally for Legacy data loading we use LoadFromFile Utility from Windchill shell.

I made .csv file. now i want to pass this csv file to this LoadFromFile utility in a seprate java programe without using Windchill shell.

first i need to call wt.load.util.CSV2XML and then wt.load.LoadFromFile.

How i can achieve this by java program.

Regards,

Vivek

Tags (1)
3 REPLIES 3

Re: Calling LoadFromFile utility in Custom java class ??

You can use the LoadFromFile.doFileLoad methods or doLoadFileSet method.

e.g.

LoadFromFile.doFileLoad(filepath, null, null, null, new Hashtable());

where "filepath" is the full path to the file generated by CSV2XML or otherwise created.

Re: Calling LoadFromFile utility in Custom java class ??

Hello Patrick,

Thanks for your guidence,

I use "LoadFromFile.doFileLoad(filepath, null, null, null, new Hashtable());" this method in my program.

it works good.

i need some more little help on same.

this method creates Documents and parts in Site/default folder.

i want to create docs annd parts in Product/Test Product/Default folder location.

how i can do this..

and in above method what is required value at the place of "null, null, null,";

Thanks,

Vivek

Re: Calling LoadFromFile utility in Custom java class ??

You can't make that change with this call. You need to update the XML you are loading. Since you are using CSV2XML, there is probably a way to put the info into the CSV before you generate the XML. Take a look at the CSV and try updating there.