Skip to main content
1-Visitor
February 15, 2017
Question

how to build a custom utility to import BOM?

  • February 15, 2017
  • 2 replies
  • 4450 views

Hi

I am building a utility to import BOM in customer format.

Requirement is:--

1. User will upload BOM in CSV format.

2. User can preview CSV in HTML and validate before uploading to windchill.

3. CSV wont be uploaded or lets say BOM wont be uploaded if there is any error in Line item.

4. Result of Upload Process should appear against CSV rows in HTML.

Please suggest.

//Rakesh

2 replies

12-Amethyst
February 20, 2017

Hi Rakesh,

so you'll have to identify the part you want to link, export the structures (with expected config) from Windchill and build the part structure in your tool for the display before validation (pre-run).

For building your merged structure (windchill + what you want to import), you'll need some strategy. The most common would be either to replace the existing links, or only add new links...

Something you could consider is whether to create a baseline object from your import or not. It can be usefull to trace which version of the part were imported.

Regards,

Loïc

rkumar-101-VisitorAuthor
1-Visitor
February 21, 2017

Hi Loïc


Thanks for the base line Idea.

I want to build logic only to update usage attributes value for existing link. UsageLink wont be created or deleted.

I cant figure out how to show error result on back to CSV upload page.

Steps are:--

  1. Upload CSV in HTML
  2. Preview and Validate with javaScript for input fields.
  3. Highlight error cells.
  4. How to Disable Ok wizard Button if CSV is not valid.
  5. Ok button will sumit wizard for processing.
  6. How to Highlight or Mark rows with error after Processing in same html load csv page?

Thank in advance for help. 🙂

//Rakesh

1-Visitor
February 21, 2017

I don't know whether you already looked at what is available out of the box - Importable spreadsheets - http://support.ptc.com/cs/help/windchill_hc/wc110_hc/index.jspx?id=WPCOverview&action=show/ Import from Excel

rkumar-101-VisitorAuthor
1-Visitor
February 21, 2017

Hi Binesh

we have explored this but we have specific format through which user will update BOM.

//Rakesh

1-Visitor
February 22, 2017

Rakesh,

The import from spreadsheet functionality is customizable, I believe you can extend this as per your import format instead writing whole new codes.