CADViewer Technical Documentation, Installation Guide and Reference Samples Library

Space Objects - Highlight and Layer Management

This CADViewer Online Sample illustrates Layer Management and Highlights of CADViewer Space Objects.

Setup of Interactive Content In Drawing

To make space objects “come alive”, we will use the Automated Area Linkage capabilities of our back-end CAD Converter AutoXchange 2020.

Automated Area Linkage will automatically match the identifier (henceforth called “Room Name”) with the corresponding area outline (henceforth called “Room Polygon”) and create a hyperlink that typically passes the Room Name to a JavaScript function whenever the Room Polygon is clicked or hovered over.

In the sample drawing hq17_layers.dwg there are three room-polygon layers defined RM_, RM2_ and RM3_ that contains outlines of spaces. These are being matched against Room Names on a text layer, RM_TXT.

The initialization of CADViewer, therefore contains the API call for conversion parameters RL/TL:

Click on the method to open the API documentation.

Controlling Layers Status through the API

The sample has implemented a top row of buttons which in turn call methods that controls the layers of the Space Objects

Html code:

Java Script code:

Click on the method to open the API documentation.

API controlled Highlight of Space Objects.

The sample has implemented a second row of buttons which in turn call methods to highlight spaces based on the Layer Status of the Space Objects.

Html code:

Java Script code:

Click on the method to open the API documentation.

Full Source Code of Online Sample

Last updated on 8 Sep 2020
Published on 8 Sep 2020