Add 3D viewing & CAD Download to your product pages


You can create your own application for desktop computers or mobile devices by using the TraceParts API. The most common request is to add 3D viewing and CAD download capabilities on a product page related to a part number. This documentation will list the APIs to be used to achieve that goal and the final result could look like the example below, knowing you can easily customize the User Interface (UI) to match your own graphical layout.

Here are the different API you need to implement 3D viewing and CAD download capabilities on your product page:

  • LanguagesList
  • CADDataAvailability
  • 3D Viewer
  • DownloadCADPath

1. Checking if 3D data is available or not for a given part number

To avoid requesting 3D data for a part number that does not exist in the TraceParts database, you have to use CADDataAvailability API.

It can also be used to display or not a tab or an icon linked to the CAD download feature. If the part number is available (“availability” attribute set to “true”), the web service returns the extensive list of CAD formats available for download for this specific part number. It also tells you if the 3D viewer is available or not. For instance, a part number may only have 2D CAD formats available and in that case only some 2D CAD formats will be listed as available, but the 3D viewer will not be able to display a 3D model.

Sample of the CADDataAvailability web service answer, in json format

"cadFormatName":"3D XML"
"cadFormatName":"Acis 6.3"
"cadFormatName":"AutoCAD (DWG 13) - 2D"
"cadFormatName":"STEP AP 214"

2. Page design

With the CADDataAvailability API, you can build your page with the 3D viewer embedded, the drop-down list of CAD formats available for download, and the button to download the CAD file in the selected format.

2.1. Display of the 3D viewer

In the 3D viewer API documentation, you have several display options to display or not the toolbars, to display the coordinate system, to start an automatic rotation of the model, and many more.

2.2. List of CAD formats

The list of CAD formats available for download is related to each part number. It is important to use the list provided with CADDataAvailability API for each single part number and for its related language. If you use a unique list of CAD formats for all part numbers, you may experience some errors when requesting a format which is not available for one given part number.

Therefore, we advise you to use a drop-down list for the CAD formats instead of listing all of them with a download button for each. Please note that new CAD formats are regularly added and new labels may break the design of your page if you do not use a drop-down list.


Best practice


Not recommended

2.3. Downloading a CAD file

Once the user clicks on the Download icon for one given part number, you have to dynamically request the related CAD file thanks to the DownloadCADPath API.

Time to receive the URL to download the CAD file may vary depending on the availability or not of the file inside the TraceParts cache infrastructure. For optimal results, we suggest you to use the asynchronous way with the parameter “asynchronous”. You will then be able to launch the request for the CAD file and to check it via the “JobId” returned in the first answer. The URL to the CAD file is temporary so for each single CAD download request, you have to call the DownloadCADPath API, even if the same combination of part number / language / CAD format has already been requested previously.

Each CAD file download is linked to a user through his/her email address. It is your choice to provide the download service with your visitor email address or with a generic one, keeping in mind that download events inside TraceParts Analytics will then contain more or less detailed contact information.

Developer support

Please contact us for any problem, question or comment related to this content integration.

Last updated Nov 13, 2017