A full setup of CADViewer consists of:
1) CADViewer JavaScript viewer client.
2) AutoXchange server-side converter.
3) Controlling Scripts.
Download all the components from the links below:
Unzip the installation directly under your server structure. (The download is set up for /xampp/htdocs/ under XAMPP with PHP, alternatively /xampp/tomcat/webapps/ for Servlets.)
Edit configuration file CV-JS_config.php in folder ./cadviewer/php/ to point to your server structure.
Edit configuration file CV-JS_ServerSettings.js in folder ./cadviewer/html/ to point to your server structure.
High resolution print in CADViewer JS as well as file load/save modals, redlines save/load, images insert save/load and DWG/DWF on-the-fly conversion requires that PHP is installed on the server.
Ensure that the executables under /cadviewer/converters/ax2020/ has full executable, read and write permissions.
Ensure that the executables under /cadviewer/converters/dwgmerge2020/ has full executable, read and write permissions.
Ensure that the *.bat/*.sh files under /cadviewer/converters/pdf_converter/ has full executable, read and write permissions.
Ensure that the folder structure under /cadviewer/converters/ has full read and write permissions.
Run the samples under http://localhost/cadviewer/ through a web-browser. (redirection to /cadviewer/html/index.html.)
If PHP is not installed on your server, see section SAMPLE SETTINGS FOR SERVLETS - ALTERNATIVE TO DEFAULT PHP SETTING in the source code of the .html samples in the /cadviewer/html/ folder on how to set up alternatively handlers.
In the Servlet based implementation, all handlers are set to be Servlet based. If only the Servlets are needed, you can download those from: CVJS_3_2_0_allServlets_jdk1.7.zip. If you need the Servlet source code to integrate with your application, please contact us.
If the user implementation is using sources from either different domains or different ports under the same domain, calling PHP may give a cross-domain error message. To set up the PHP files to allow multiple domains, edit the variable $allowed_domains to include all domains and ports from the user application. Download PHP files from: php-crossDomain.zip, edit and overwrite the PHP files into /cadviewer/php/ install folder.
To load PDF files, Java needs to be installed on your server. Once Java is installed update the configuration file ./php/CV-JS_config.php to point at your Java and folder settings, alternatively update the web.xml parameters if running Servlets under Tomcat.
To debug, in each of the samples in ./cadviewer/html folder, locate the statement cvjs_debugMode(false); , set it to cvjs_debugMode(true);. You can now monitor the trace of the server/client flow from the browser developer console.
On ASP.NET : Download and add as Visual Studio project. Follow descriptions in Default.aspx to edit /cadviewer/Web.config and cadviewer/html/CV-JS_ServerSettings.js.
On Angular 8 / Node JS : Download and follow instructions in README.md.
On Ionic / Node JS : Download and follow instructions in README.md.
The page /cadviewer/html/index.html in the CADViewer downloads above contains a set of samples to help you get going with CADViewer JS:
1) Loading and display of CAD drawing pre-converted with AutoXchange. (See file: CVJS_viewing_only_xx.html)
2) Loading and display of DWG drawing. Connects with an external server for on-the-fly conversion of CAD file. (See file: CVJS_viewing_serverload_xx.html)
3) CADViewer JS is set up with interactive modals for file-loading and redlines. Links with AutoXchange for own server on-the-fly conversion control of CAD drawings. (See file: CVJS_fileloader_xx.html)
4) Similar to sample 3), but redline control icon disk is pre-set.(See file: CVJS_fileloader_red_xx.html)
5) Multiple overlay load of redlines are enabled. Links with AutoXchange for own server on-the-fly conversion .(See file: CVJS_fileloader_red_overlay_xx.html)
6) Sample for embedding CADViewer JS in an encapsulating application. Redline handling of features such as locked users, hidden users, etc. are all Javascript API controlled. File and redline load/save are all done through API calls. (See file: CVJS_redline_api_xx.html)
7) Sample with image handling and object count menu page activated. Images can be externally loaded an added to a location on drawing. (See file: CVJS_insert_image_xx.html)
8) Sample with compare drawings menu page activated (icon menu page three). Two drawings are loaded and overlaid to expose differencies. (See file: CVJS_compare_drawings_xx.html)
9) Sample illustrating the dynamic highlight API for coloring and labelling objects in a drawing. Sample also illustrates thumbnail generator and PDF generation of screen image with dynamic highlight (for reporting). (See file: CVJS_loaddynamic_highlight_xx.html) For a more indept description on creating the dynamic hotspots on drawings, as used in this examples, see document: CADViewer JS-AutoXchange - Generating Automated Hotspots.pdf
10) Sample illustrating the dynamic highlight API for coloring and labelling objects using AutoCAD Handles.(See file: CVJS_CVJS_acad_handles_xx.html) For a more indept description on creating the dynamic hotspots on drawings, as used in this examples, see document: CADViewer JS-AutoXchange - Generating Automated Hotspots.pdf
11) Minimized version of CADViewer JS is used to batch convert a set of drawings to a multipage PDF (See file: CVJS_batchprint_to_pdf_xx.html)
12) Handlers are added to SVG file so text objects on layers responds to mouse over, mouse click, etc.(See file: CVJS_svg_clickhander_xx.html)
13) Handlers are added to SVG file xlink hyperlinks responds to mouse over, mouse click, etc.(See file: CVJS_svg_xlink_hyperlinks_xx.html)
14) Multiple SVG files are indexed for page browsing.(See file: CVJS_svg_multipage_xx.html)
15) AngularJS and PHP are used to dynamically load content from a MySQL database for two-way interaction with content in drawing.(See file: CVJS_visual_query_xx.html) For a more indept description on creating the dynamic hotspots on drawings, as used in this examples, see document: CADViewer JS-AutoXchange - Generating Automated Hotspots.pdf
16) CADViewer JS integrated with REST interface to SharePoint, so CAD drawings in SharePoint can be visualized both inside SharePoint and on an external CAD server.
Integration steps are described in: CADViewerJS - SharePoint configuration.pdf (See file: CVJS_sharepoint_xx.html)
17) Loading and display of multipage PDF document using on-the-fly conversion.(See file: CVJS_pdf_multipage_xx.html)
18) CADViewer JS SharePoint/MicroSoft 365 Integration: Seamless CAD access point to Sharepoint server. Builds navigational file tree over Sharepoint server folder content. Among others, allows sharing of redlined content via e-mail. Implements download and upload of redlines as well as translation to PDF of redline overlays.
19) Builds navigational file tree over server folder content. Folder is set through URL parameter file_location.
20) QR Codes: Adds QR codes to drawings on download. (See File: VJS_QR_410.html)
21) Space Objects: :Create the hotspots using the interface. Saved Space objects are placed in folder defined by cvjs_setSpaceObjectsAbsolutePath() in the file: space_FileName.js. ( See file: CVJS_create_space_objects_410.html)
22) Image Space Objects (Sensors): :Create the image hotspots using the interface. Download drawing with objects and reuse in use-case to highlight objects. ( See file: CVJS_create_image_space_objects_410.html)
23) API Canvas: : All interactive icon commands in CADViewer JS are exposed through Java Script API calls. ( See file: CVJS_API_canvas_410.html)
Unzip the downloaded compressed file directly under your server structure or in folder of choice. There are no external dependencies in the installation
AutoXchange is a command line software. Run >ax2020 -? to get a listing of all available control parameters and build your own command lines based on these.
A sample basic command line, converting an AutoCAD DWG file to SVG, is: >ax2020 -i=\"myfile.dwg\" -o=\"myoutputfile.svg\" -f=svg -basic
Ensure that the executable in your ax2020 folder has full executable, read and write permissions
Ensure that the folder structure where you are writing files to, defined by the -o= parameter has full read and write permissions.
Please see the AutoXChange 2019 User Manual for a detailed description on the command line interface.
Please reference the AutoXchange Support Page for more information.
Unzip the downloaded compressed file directly under your server structure or in folder of choice. There are no external dependencies in the installation
DwgList is a command line software. Run: >dwglist2020 <filename> -xml to get a listing of external reference and external images as xml for further processing. Use -txt instead of -xml to get the listing as a txt file.
Unzip the downloaded compressed file directly under your server structure or in folder of choice. There are no external dependencies in the installation
LinkList is a command line software. Run: >linklist2020 <filename> -xml -all to get a listing of all content in the drawing as XML. The output is written to file: <filename>.xml.
CADViewer JS goes from trial to release mode by adding a license key cvlicense.js into a directory of choice.
Set the license key folder as part of the declaration of CADViewer JS
cvjs_setLicenseKeyPath("../app/js/");
AutoXchange goes from trial to release mode by adding a license key axlic.key into a directory of choice.
Set the license key location as part of the initalization in the php file CV-JS_config.php in the AutoXchange download.
// Path to the location of the license key axlic.key file $licenseLocation = "/home/cadviewer/tms-restful-api/converters";
To learn more about licensing, please contact us at: Tailor Made Software