CADViewer Technical Documentation, Installation Guide and Reference Samples Library

method cvjs_OnLoadEnd

cvjs_OnLoadEnd() is the general call-back method to when a drawing has been loaded. Typically when a drawing is loaded, a number of drawing specific API methods can be called, such as redline user settings, layer on/off, zoom extents, background color settings, etc.

When this callback method have been called the full content of the CADViewer Front-End API can be applied:

function cvjs_OnLoadEnd(){
    // generic callback method, called when the drawing is loaded
    // here you fill in your stuff, call DB, set up arrays, etc..
    // this method MUST be retained as a dummy method! - if not implemeted -
    var user_name = "Bob Smith";
    var user_id = "user_1";
    // set a value for redlines
    cvjs_setCurrentStickyNoteValues_NameUserId(user_name, user_id );
    cvjs_setCurrentRedlineValues_NameUserid(user_name, user_id);
    /*  If drag-background to front,  so spaceobject or handle interaction
    // Use process handles, if -hlall has been set in conversion to expose AutoCAD DWG Handles
    var processHandles = false;
    if (processHandles){
    // activate to print entire document when doing print-to-pdf
    cvjs_overwritePDFOutputParameter(true, "basic", "");
Last updated on 26 May 2022
Published on 9 Apr 2020