CADViewer Technical Documentation, Installation Guide and Reference Samples Library

Space Objects - Dynamic Interaction with Floor-Plan

This CADViewer Online Sample illustrates the CADViewer Space Object interface.

CADViewer is implemented in a use-case where buildings are being surveyed for Aspestos. The CADViewer Space Object interface has been used to create and link spaces and CADViewer is being set up to interact with an encapsulating application to display and highlight content related to each space. Click Here!

Setup of Modals

Use the Section section Call-Back Dynamic Modals for Highlight to set up the call-back Modals which will change content dynamically based on which Space is clicked.

Setup of Call-Back

When the floor-plan is loaded, use the generic callback cvjs_OnLoadEnd() to load in an overlay script file containing Space Objects and highlight a few objects.

Click on the method to open the API documentation.

As an alternative to loading the Space Objects from a file using cvjs_loadSpaceObjects() , the Space Objects can individually be placed out onto the CAD canvas with the API method cvjs_addSingleSpaceObject():

Click on the method to open the API documentation.

API controlled highlight.

In the sample a few methods are implemented to highlight objects, a set of objects are highlighted in either red or green, and a funtion is implemented to color individual spaces green.

Html code:

Java Script code:

Space Object Interactive Command Interface

In our User Manual you can find a description of the CADViewer Icon Commands for Space Objects.

Full Source Code of Online Sample

Last updated on 13 May 2020
Published on 13 May 2020