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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Invoke wt.load.util.CSV2XML and wt.load.LoadFromFile commands from a java code

PLM1
7-Bedrock

Invoke wt.load.util.CSV2XML and wt.load.LoadFromFile commands from a java code

Hi All,

I am trying to bulk load wtdocuments into Windchill for which I have the content files and the attributes (name, number, description, version, state, IBAs etc) in an excel file. The usual method for bulk load is to create a CSV using the data in the excel file, then create an XML from the CSV (wt.load.util.CSV2XML) and finally load the documents into Windchill using the XML file (wt.load.LoadFromFile).

I am trying to create a java file which will read the excel file with the raw data, create a CSV and subsequently the XML file using it and then finally invoke the load command using the XML file. Before I put all of these together, I am trying out each step individually and am not able to figure out a way to invoke the wt.load.util.CSV2XML and wt.load.LoadFromFile from a java file. Has anyone tried that? Any ideas?

2 REPLIES 2
vuchekar
10-Marble
(To:PLM1)

Hi,

CSV2XML. class present in Windchill,

de-compile it and save as CSV2XML_.java in your package.

simply call this CSV2XML_.main method in your class, it will convert csv to xml,

to LoadFromFile, use below

LoadFromFile.doFileLoad(filepath, null, null, null,cmd_line);

here, filepath= actual path of .xml file.

cmd_line = CONT_PATH.

Regards,

Vivek

pk08
5-Regular Member
(To:PLM1)

Hi,

 

My scenario is same. we are migrating documents from network drives to Windchill 11.0. I want to know how to create a CSV (that can be used for CSV2XML utility) for bulk load using the excel file with attribute values in columns. 

 

Many Thanks

Announcements

Top Tags