CADViewer Technical Documentation, Installation Guide and Reference Samples Library

.NET

Folder Structure

For a CADViewer .NET installation, 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, or from our dotNet GitHub Repository.

c:\VisualStudio
       └─── cadviewer
               ├── 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
               │    ├── ax2022
               │    │     ├── windows 
               │    │     │      └── fonts
               │    │     └── linux
               │    │            └── fonts
               │    ├── dwgmerge2022
               │    │         ├── windows 
               │    │         │      └── fonts
               │    │         └── linux
               │    │            └── fonts
               │    ├── linklist2022
               │    │         ├── windows 
               │    │         │     └── fonts
               │    │         └── linux
               │    │               └── fonts
               │    └── files
               ├── content
               ├── html
               └── temp_print

Note that folders for advanced interaction, such as database connectivity and advanced REST-API connectivity features are not included in this folder tree, please see the Samples section for integration with this type of functionality.

Windows - .NET Configuration

In folder:

c:\VisualStudio
       └─── cadviewer
               └── Web.config

locate the configuration file: Web.config , edit the key settings appSettings that controls Converter and CADViewer pathss to reflect your installation.

HTML

In folder:

c:/VisualStudio
    └─── cadviewer
            └── html

For the combination of JavaScript front-end and dotNet back-end a typical Handler initialization in any of the sample .html files looks like:

	var ServerBackEndUrl = "http://localhost:44371/";
	var ServerUrl = "http://localhost:44371/";
	//var ServerLocation = "c:/cadviewer-testapp-dotnet-01/cadviewer/";
	var ServerLocation = "";

	// Pass over the location of the installation, will update the internal paths
	cvjs_setAllServerPaths_and_Handlers(ServerBackEndUrl, ServerUrl, ServerLocation, "dotNet", "JavaScript", "floorPlan");

See API documentation:


Running Sample

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

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

For debugging, the folder:

c:\VisualStudio
       └─── cadviewer
               └── 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 variables ServerUrl, ServerLocation or ServerBackEndUrl in the controlling HTML document in /cadviewer/html/ are not set to reflect the front-end server url or port.



    var ServerBackEndUrl = "";  // or what is appropriate for my server; used for NodeJS server only
    var ServerUrl = "http://localhost/cadviewer/";   // or what is appropriate for my server
    var ServerLocation = "c:/xampp/htdocs/cadviewer/"; // or what is appropriate for my server
Last updated on 10 Mar 2022
Published on 20 Sep 2020