Importing CSV connectivity into VeSys 2.0 Harness

Document created by Nuri on Nov 14, 2010Last modified by Elisa on Feb 10, 2016
Version 4Show Document
  • View in full screen mode


Harness Manufacturers often develop connectivity in spreadsheet form, or they receive a CSV file containing the connectivity from the OEM (this is usually in the form of a "from-to-list").


This Excel VBA macro provides the ability to convert a from/to wirelist in Excel into Capital Harness XML, which can be imported into VeSys 2.0 Harness or Capital HarnessXC. The macro is configured using a Setup worksheet that allows the user to specify the data that is contained in each column.


With VeSys 2.0 Harness it is possible to bridge in connectivity using one of two formats, DSI (*.dsi) or Capital 3D Harness (*.xml).  These formated / structured files can be generated by the OEM if they too are using VeSys Classic, VeSys 2.0 or Capital, but for the harness manufacturer to import connectivity from 3rd party tool that connectivity must be reformatted into a Capital 3D Harness (*.xml) file.


The attached Excel spreadsheet contains a simple macro to automate this process.


  • It can be used to author connectivity in spreadsheet format, or
  • It can be used to import CSV connectivity from an external file


Please follow the following steps to configure and use this Excel spreadsheet (note this is based on Microsoft Office 2007).


  1. Open the spreadsheet
    • Depending on your systems security configuration, Macros are likely to be disabled
      ScreenClip [2].png
      This content must be enabled.
      ScreenClip [3].png
    • Once enabled the "Add-Ins" menu will become active, with Custom Toolbar commands for exporting "VeSys 2.0 Harness XML" and "Importing" CSV data that you want to convert for export to VeSys 2.0 Harness.
      ScreenClip [4].png
  2. The Excel spreadsheet contains two worksheet tabs
    • ScreenClip [5].png
    • Setup - used to configure the data columns from the imported or manually generated connectivity
      • The name of this worksheet cannot be changed, the cells filled yellow can be changed to match the incoming or manually generated data.  Each yellow cell referrs to a column in the data worksheet
      • Note the default configuration matches the example connectivity
    • example - example connectivity (data worksheet), containing a list of wires
      • Column A: wire name
      • Column B: wire CSA
      • Column C: wire material
      • Column D: wire specification
      • Column E: wire color code
      • Column F: From connector name
      • Column G: From connector cavity name
      • Column H: From connector part name
      • Column I: To connector name
      • Column J: To connector cavity name
      • Column K: To connector part name
  3. To create new connectivity, manually, in the Excel document
    • create a new data worksheet (delete the example worksheet first)
    • start to enter data manually, one row for each wire or conductor, noting the columns for each attribute
    • configure the Setup worksheet to match the manually entered data
    • select "Add-ins" tab and press "VeSys 2.0 Harness XML"
    • note the location of the exported file (the default folder location is taken from the Setup worksheet in cell E11)
  4. Or, to import connectivity, into the Excel document
    • delete all existing data worksheets first (keep the Setup worksheet, this is mandatory)
    • select "Add-ins" tab and press "Import File"
    • enter the name of the incoming CSV file, then press OK
    • for each imported CSV file a new worksheet will appear in the Excel document
    • configure the Setup worksheet to match the imported data
    • select "Add-ins" tab and press "VeSys 2.0 Harness XML" - this will process the data from each worksheet into a single XML file
    • note the location of the exported file (the default folder location is taken from the setup worksheet in cell E11)
  5. To import the XML connectivity into VeSys 2.0 Harness
    • Create a new VeSys 2.0 Harness Design, open the diagram (noting it will be empty)
    • From VeSys 2.0, select File --> Import --> Import From...
    • Browse for the generated XML file (step 3 or step 4)
  6. Note the connectivity will be imported into VeSys 2.0 Harness
    • All unique connectors will be placed on the diagram
    • Now sketch the bundle topology, then use the "Move" action to place each connector to a bundle end
    • Complete the harness by processing wire lengths and select any outstanding components
    • ScreenClip.pngScreenClip [1].png


For further assistance please contact the author (or just have a go).


Update:August 2013

The macro has been updated to support the definition and creation of complex multicore structures.  Here's an example of the result of importing spreadsheet data which defines two shielded-twisted-pair multicores plus 3 wires connected to a splice.   If you want to reproduce this example, a library XML file containing the shielded twisted pair is provided below, all other parts are already in the QuickStart library.  Note: there were no bundles on the original harness diagram so the 3 connectors and the splice are positioned in their default locations.


The shielded twisted pair looks like this in the Library


We recommend that you build the multicore in Library first, to ensure you define the correct structure.   You can then use this to reference the parent:parent:etc naming in the spreadsheet.  Here's the corresponding parent:parent:etc definition from the spreadsheet:


Notice that, although the same MC Part Number is used for both multicores (MC-STP-1 and MC-STP-2), the names of their children twisted pairs are different - TW1-1 and TW1-2 - you cannot use TW1-1 for both multicores.





Copyright 2009 Mentor Graphics Corporation. All Rights Reserved. Recipients who obtain this code directly from Mentor Graphics use it solely for internal purposes to serve as example Java or Java Script plugins. This code may not be used in a commercial distribution. Recipients may duplicate the code provided that all notices are fully reproduced with and remain in the code. No part of this code may be modified, reproduced, translated, used, distributed, disclosed or provided to third parties without the prior written consent of Mentor Graphics, except as expressly authorized above. THE CODE IS MADE AVAILABLE "AS IS" WITHOUT WARRANTY OR SUPPORT OF ANY KIND. MENTOR GRAPHICS OFFERS NO EXPRESS OR IMPLIED WARRANTIES AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR WARRANTY OF NON-INFRINGEMENT. IN NO EVENT SHALL MENTOR GRAPHICS OR ITS LICENSORS BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS) WHETHER BASED ON CONTRACT, TORT OR ANY OTHER LEGAL THEORY, EVEN IF MENTOR GRAPHICS OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES..