CADViewer Technical Documentation, Installation Guide and Reference Samples Library


Redlines Modal Setup

The initialization methods cvjs_setRedlinesRelativePath() and cvjs_setRedlinesAbsolutePath() controls the path to the file location, that links with the Redline File Loader Modal.

Click on the method to open the API documentation.

Redlines Call Back Method

CADViewer has two call back methods that is used with Redlines. Once the drawing is loaded, the application programmer can inside the drawing load call-back method cvjs_OnLoadEnd() set the current User Name and ID for use with Redlines and Sticky Notes, these methods are: cvjs_setCurrentStickyNoteValues_NameUserId(), cvjs_setCurrentRedlineValues_NameUserid()

When working with Redlines the Redline Load call-back is used to set the work status of the redline loaded, the redlines can be locked for editing for a set of users, and the redline can be set so that a given set of users redlines are visible/hidden. These methods are: cvjs_hideAllRedlines_HiddenUsersList(), cvjs_lockAllRedlines_LockedUsersList()

If a Redline has to be loaded with a drawing, then in the cvjs_OnLoadEnd() callback, application programmers can add a method call to set the load path to the redline cvjs_setStickyNoteRedlineUrl(), and then trigger a direct load with cvjs_loadStickyNotesRedlines().

Click on the method to open the API documentation.

API Controlled Redlines Load/Save

When using direct control of redline load/save then the first step is to uncomment the redline modal settings in the initalization part of the document.

There are two methods that triggers direct load/save of redlines when the Redline Modal is activated. These methods are: cvjs_setStickyNoteRedlineUrl() for Load and cvjs_setStickyNoteSaveRedlineUrl() for Save. The Redlines files are .js files, where the redlines content is kept in a Java Script structure.

Click on the method to open the API documentation.

There are two API methods exposed to application programmers that controls what action takes place when the Redlines Load icon and Redlines Save icon are pushed, cvjs_saveStickyNotesRedlinesUser() and cvjs_loadStickyNotesRedlinesUser().

The content of these methods are open to edit, in the standard setup, they are set up to trigger load and save via the Redline Modal using the methods: cvjs_openRedlineSaveModal() and cvjs_openRedlineLoadModal().

Click on the method to open the API documentation.

Application programmers will comment out the standard modal load and save and replace it with their own coding, this coding should contain settings of Load and Save path for the Redlines.

Click on the method to open the API documentation.

Overlay Redlines at Load

To allow Redlines to be overlaid at load, set the method cvjs_setLoadMultipleRedlinesStickyNotes().

Click on the method to open the API documentation.


Go to CADViewer Samples to see and download samples implementing Redlines Modals, Redlines Overlay and Redlines API controlled Redlines handling.

Last updated on 9 Apr 2020
Published on 9 Apr 2020