CADViewer Technical Documentation, Installation Guide and Reference Samples Library

.NET core

Windows

Folder Structure

For a CADViewer dotNetcore installation on Windows, the base file-structure should be as below: CADViewer and AutoXchange is included in this repository, but it can be recreated by downloading the components directly from: https://cadviewer.com/download

c:\cadviewer-testapp-dotnet-core-01\cadviewer\cadviewer\
       └─── wwwroot
               ├── app
               │    ├── cv
               │    │    ├── cv-pro 
               │    │    │   ├── menu_config
               │    │    │   ├── language_table
               │    │    │   └── space
               │    │    │         ├── css 
               │    │    │         └── html
               │    │    ├── cv-core
               │    │    │   ├── menu_config
               │    │    │   └── language_table
               │    │    └── cv-custom_commands
               │    ├── fonts
               │    ├── images
               │    ├── js
               │    ├── css
               │    └── user_resources	
               ├── converters
               │    ├── ax2020
               │    │     ├── windows 
               │    │     │      └── fonts
               │    │     └── linux
               │    │            └── fonts
               │    ├── dwgmerge2020
               │    │         ├── windows 
               │    │         │      └── fonts
               │    │         └── linux
               │    │            └── fonts
               │    ├── linklist2020
               │    │         ├── windows 
               │    │         │     └── fonts
               │    │         └── linux
               │    │               └── fonts
               │    └── files
               ├── content
               ├── html
               └── temp_print

Note that folders for controller configuration are set as part of the dotNet core main project

Windows - dotNETcore Configuration - set paths

In folder:

c:\cadviewer-testapp-dotnet-core-01\cadviewer
         └─── cadviewer
               └── appsettings.json

locate the configuration file: appsettings.json , edit the key settings that controls Converter and CADViewer paths to reflect your installation.

Windows - dotNETcore Controller

In folder:

c:\cadviewer-testapp-dotnet-core-01\cadviewer
         └─── cadviewer
                   └─── Controllers
                             └── CADViewerController.cs

The file CADViewerController.cs contains the controllers that CADViewer uses to manipulate content on the server and to control CAD conversion.

HTML

In folder:

c:\cadviewer-testapp-dotnet-core-01\cadviewer
                                       └─── cadviewer
                                                └── html

identify your sample mysample.html file, and ensure that it correctly sets the ServerLocation and ServeUrl parameters

Open a web-browser pointing to your sample html file: http:/localhost:44374/html/mysample.html

Use the server traces and browser development console for debugging, alternatively contact our Support

For debugging, the folder:

c:\cadviewer-testapp-dotnet-core-01\cadviewer
                                       └─── cadviewer
                                                 └─── wwwroot
                                                         └── temp_debug

contains a debug file callApiConversionHandlerLog.txt that lists the command line and traces in the communication with the back-end converter AutoXchange 2020. If drawing files does not display, this file will contain useful information to pinpoint the issue.

Troubleshooting

One issue that often appears in installations is that interface icons do not display properly:

Icons

Typically the variable ServerUrl in /cadviewer/app/cv/CADViewer_AshxHandlerSettings.js is not set to reflect the front-end server url or port.

Last updated on 14 Apr 2021
Published on 9 Apr 2020