To Convert Data to a Turnout Catalogue

You can use a Python script to convert a Microsoft Excel file into a rail turnout catalogue.

  1. If you don't already have Python installed on your computer, navigate to the Python download site, https://www.python.org/downloads/ and download and install the latest version of Python.
    Note: When you install Python, ensure that you select the option to add Python to PATH.
  2. Open a command window and change the directory to C:\ProgramData\Autodesk\C3D <version>\eng\Data\Railway Design Standards\Turnout\USCatalogSampleTool.
  3. Execute "pip install xlrd==1.2.0" to install the xlrd package.
  4. Prepare an Excel file of the data that you want to convert and place it in the C:\ProgramData\Autodesk\C3D <version>\eng\Data\Railway Design Standards\Turnout\USCatalogSampleTool folder.

    A sample Excel file named US-Turnout-Catalogue-Sample-920-18.xlsx has been included in C:\ProgramData\Autodesk\C3D <version>\eng\Data\Railway Design Standards\Turnout\USCatalogSampleTool that you can use as a basis for your own file and for testing.

  5. If you are converting your own data, edit the convert_C3D_US_TurnOut.py file so that it refers to your customised Excel file.

    If you want to try converting the sample file, you do not need to edit the convert_C3D_US_TurnOut.py file.

  6. In C:\ProgramData\Autodesk\C3D <version>\eng\Data\Railway Design Standards\Turnout\USCatalogSampleTool, double-click on the convert_C3D_US_TurnOut.py file to run the script.

    The data is converted into US_Metric.json and US_Imperial.json files that you can load and use as turnout catalogues.