CADViewer - JavaScript API

View all Icon Commands with corresponding API Methods.

Search all API Methods





Methods

cvjs_allLayersInDrawingOn(f_div)

Sets all layers in drawing On

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_AllLayersOff()

Turn all Layers and Space Object layers and redlines off - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_AllLayersOn()

Turn all Layers and Space Object layers and redlines on - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_batchConvertDrawingsToPDF_CustomReport(string, dFilesArr, pageOrint, pageSize, pageRes, string, Object)

Loads a set of drawings, apply page size, page orientation and resolution to each page/drawing. Produce a multi-page PDF out of the set of drawing.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
string

floorPlan - Name of the floorplan div for batch processing

dFilesArr Array.<string>

String array with name and location of drawings

pageOrint Array.<string>

String array with orientation of drawings: landscape/portrait

pageSize Array.<string>

String array with papersizes of drawings

pageRes Array.<string>

Array with page resolutions

string

batch_Ctrl - Name of the php document that creates the report when the graphics is created

Object

callbackMethod - callBackMethod to decorate each drawing before publishing

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_calibrateMeasurement(f_div)

Calibrate measurement

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeRedlineObjectColor(redlineId, hexColor)

Change the Redline Object color based on a Redline ID

Parameters:
Name Type Description
redlineId string

redline ID

hexColor string

color in HEX format with #

cvjs_changeRedlineObjectLineWeight(redlineId, strokeWidth)

Change the Redline Object line weight

Parameters:
Name Type Description
redlineId string

Redline Object ID

strokeWidth float

stroke width

cvjs_compareDrawings_externalModal(methodflag, method, servertype)

Setting of external modal for compare drawings file load

Parameters:
Name Type Description
methodflag boolean

true to activate false to deactivate

method object

object to pass over the method to be called, the method will be called with filename

servertype string

type of server installation, can be "NextCloud", "Standard", etc.

cvjs_Conversion_forPrint(f_div, originatingContent, originatingUsername, originatingPassword, fileFormat)

Conversion for Print , either SVG or PDF with JSON handling.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

originatingContent string

base file name

originatingUsername string

username or ""

originatingPassword string

password or ""

fileFormat string

"pdf" or "svg"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_currentHost() → {string}

Finds the current host of the library

CADViewer Internal Command Groups: All.

See:
Returns:

host - current hostlocation

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_currentURL() → {string}

Finds the current url of the library

CADViewer Internal Command Groups: All.

See:
Returns:

url - current location

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_DisablePrintIcon(f_div)

Disables print Icon

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

name of Element in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayInformationModal(f_div, text, modalHeight, modal_left,, modal_top,)

Activates and displays the information modal with text

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

text String

string to display

modalHeight int

of modal, omit if using standard values

modal_left, int

position of modal

modal_top, int

position of modal

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_EnablePrintIcon(f_div)

Enables print Icon

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

name of Element in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_encodeURIcallToserver(flag)

Sets flag to control if call to server php for conversion shall be URI encoded or not. Default is true.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

default is true. Set to true to custom implement this feature

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_fileLoadFromSharePointServer(mode)

Sets file loading so that it done from a SharePoint Server

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

true to load files from sharepoint server, file names are then loaded through internal sharepoint REST calls, false is default standard server load of draiwngs

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_fileLoadModal_externalModal(methodflag, method, servertype)

Setting of external modal instead of standard file load modal of drawings

Parameters:
Name Type Description
methodflag boolean

true to activate false to deactivate

method object

object to pass over the method to be called, the method will be called with filename

servertype string

type of server installation, can be "NextCloud", "Standard", etc.

cvjs_get_dwg_scaled_value(n, page) → {float}

Returns the DWG/Global coordinates scaled value

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
n float

svg coordinate value

page int

page number in the drawing set

See:
Returns:

scaled_value - value in dwg space

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_get_dwg_x_coord(x, page) → {float}

Returns the DWG/Global coordinate based on SVG value

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
x float

svg coordinate value

page int

page number in the drawing set

See:
Returns:

scaled_value - value in dwg space

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_get_dwg_y_coord(y, page) → {float}

Returns the DWG/Global coordinate based on SVG value

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
y float

svg coordinate value

page int

page number in the drawing set

See:
Returns:

scaled_value - value in dwg space

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getActivePaletteColor(colornumber)

Get the color of a given palette number in the drawing. NOTE, first palette color has index 0.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
colornumber int

palette number

Returns:
  • hex code of color

cvjs_getActivePaletteColorList()

Returns a list of all active palette colors in drawing. NOTE, first palette color has index 0. CADViewer Internal Command Groups: All.

Returns:
  • list of color palette numbers

cvjs_getAutoCADColor() → {string|int}

Returns the HEX color as AutoCAD Color table

CADViewer Internal Command Groups: All.

See:
Returns:
  • hexNumber - hex value of color.

    Type
    string
  • colorNumber - number of color

    Type
    int
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getCurrentMultiPage_FileName() → {string}

Returns the current fileName from the MultiPages list

CADViewer Internal Command Groups: All.

See:
Returns:

url - current location

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getGlobal_X_fromSVG(x) → {float}

Returns the DWG/Global coordinate based on SVG value from current page

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
x float

svg coordinate value

See:
Returns:

scaled_value - value in dwg space

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getGlobal_Y_fromSVG(y) → {float}

Returns the DWG/Global coordinate based on SVG value from current page

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
y float

svg coordinate value

See:
Returns:

scaled_value - value in dwg space

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getMultiSelect() → {boolean}

Controls the multiselect variable status

CADViewer Internal Command Groups: All.

See:
Returns:

multiSelect - value of multiselect flag

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getRedlineStickyNoteBusinessContent() → {Object}

Retrieve all Redline and StickyNote non-graphical API content, ID, User, date, text, etc.

CADViewer Internal Command Groups: All.

See:
Returns:

custom_content - JSON array with all non-graphical API content, ID, User, date, text, etc.

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSVG_X_fromGlobal(x) → {float}

Returns the svg X coordinate based on DWG/Global coordinate

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
x float

global coordinate value

See:
Returns:

scaled_value - value in dwg space

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSVG_Y_fromGlobal(y) → {float}

Returns the DWG/Global coordinate based on SVG value from current page

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
y float

svg coordinate value

See:
Returns:

scaled_value - value in dwg space

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_hideInformationModal(f_div)

Hides the information modal with text

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_interactiveLayerOff(f_div)

Turn a single layer on interactively

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_isUnifiedDrawing() → {boolean}

Checks if a drawing is unified

CADViewer Internal Command Groups: All.

See:
Returns:

multiSelect - value of multiselect flag

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LayerList(f_div)

Open the Layer List menu for layer handling

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_layerNamefromObjectID(myObjectId) → {string}

Return orginal file layer name based on SVG object ID

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
myObjectId string

id of the element in the SVG file

See:
Returns:

layer - layer name

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_Measurement(f_div)

Activates the measurement modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_multipagePDFtoSVG_PhpLoad(mode)

Load multipage PDF converter to SVG through php

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

loading converted SVG from PDF via php, default is false and direct load of svg

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_overwritePDFOutputParameter(flag, param, value)

When printing to PDF, overwrite the pre-set parameters or navigated layout with this parameter

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

true to overwrite, false to reset to original

param string

conversion parameter

value string

conversion value

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_PageChangeList(f_div)

Open the Page Change menu to select a page in a multipage drawing

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_Print(f_div)

Funtion to open print model, interactively set paper size, resolution and orientation and then print API method linked to icon interface

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_printCanvasPaperSize()

Function to print to papersize, based on settings provided in cvjs_setPrintOrientation(), cvjs_setPrintResolutionDpi() and cvjs_setPrintPaperSize()

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_printToPdf_windowRelativeSize(scale)

Sets the size of the print window as a relation of the screen between 0 and 1

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
scale float

the size of the print window as a relation of the screen between 0 and 1, default is 0.4

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_RedlineUserList(f_div)

Open the Redline User menu to select/deselect users redlines

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_removeHandleFunc_Generic()

Reset the current redline operation

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_removeHandleFunc_Standard()

Standard call to remove handleGroup

cvjs_removePrintObjectAfterPrint(flag)

Set flag to clean temporary print object after use. Requires the cvjs_setServerHandlersPath() general php folder location to be defined with an absolute path

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

true for remove, false to leave as is

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_restAPI_getSVGContentData(remainOnServer) → {string}

Returns the end-point to get SVG object loaded from Server, if remainOnServer has been set to true on CADViewer Server.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
remainOnServer boolean

flag remove after use, default is false = remove,

See:
Returns:

SVGobject - Url to pull SVG from server

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnNonPreprocessedSVG() → {string}

Returns the parsed SVG object loaded before pre-processing.

CADViewer Internal Command Groups: All.

See:
Returns:

SVGobject - SVG loaded into CADViewer

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnRedlineObjectID(RedlineID)

Returns a JSON structure with the Redline

Parameters:
Name Type Description
RedlineID *

Redline Object ID , RED_ node or it's ID, whichever comes first

Returns:
  • JSON object with the Redline structure

cvjs_saveScreenAsImage(serverPath, image_fileName)

Save screen image to server as well as list of stickyNote content and information On the server two thumbnails are created

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
serverPath string

path on Server to save image content

image_fileName string

name of image file on server.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveScreenAsImage_makeTumbnails(serverPath, image_fileName, sizeThumb1, thumb1_file, sizeThumb2, thumb2_file)

Save screen image to server On the server two thumbnails are created

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
serverPath string

path on Server to save image content and create thumbnails

image_fileName string

name of image file on server. The file with sticky note content will be named fileName.txt

sizeThumb1 int

size in pixels of thumbnail one

thumb1_file string

filename of thumbnail one on server

sizeThumb2 int

size in pixels of thumbnail two

thumb2_file string

filename of thumbnail two on server

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveScreenAsImage_stickyNoteInfo_makeTumbnails(serverPath, image_fileName, size1, t1, size2, t2)

Save screen image to server as well as list of stickyNote content and information On the server two thumbnails are created

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
serverPath string

path on Server to save image content and create thumbnails

image_fileName string

name of image file on server. The file with sticky note content will be named fileName.txt

size1 int

size in pixels of thumbnail one

t1 string

filename of thumbnail one on server

size2 int

size in pixels of thumbnail two

t2 string

filename of thumbnail two on server

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveScreenAsPDF(pageOrientation, pageSize, pageResolution)

Captures the screen image and creates a single page PDF

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pageOrientation string

Orientation of drawings: landscape/portrait

pageSize string

Papersize of drawing

pageResolution string

Page resolution in dpi, default is 300

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveScreenAsPDF_serverSettings(methodflag, method, path, stype, dflag, eflag, sflag)

Parameters:
Name Type Description
methodflag boolean

flag set to use method or path, true method false path

method object

object to pass over the method to be called, the method will be called with filename

path string

path on server if used

stype string

type of server installation, can be "NextCloud", "Standard", etc.

dflag boolean

display download/ button

eflag boolean

display e-mail button

sflag boolean

display server upload button

cvjs_searchTextNext(searchString, zoomFactor)

Search the drawing for a text string with a given zoom factor. Highlight result in red. Continue search on next object in Drawing.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
searchString string

the text search string

zoomFactor float

the zoomfactor in percent. 100 is default

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_selectPaperSize(paperSize)

Set selected papersize in Print Modal

Parameters:
Name Type Description
paperSize string

cvjs_setActiveFloorplan(f_div)

Set the active footer div, in case there are multiple floorplans in the viewer

Parameters:
Name Type Description
f_div string

, name of the floorplan div, if name not in current list no action performed

cvjs_setActiveFloorplanIndex(index)

Set the active footer div number, in case there are multiple floorplans in the viewer

Parameters:
Name Type Description
index int

, index runs from 0 up to the last floorplan, if index not in current band no action performed

cvjs_setActivePaletteColor(colornumber, hex)

Set a given palette color number with a hex color. NOTE, first palette color has index 0. CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
colornumber *

color palette number

hex *

new color, given in hex number.

cvjs_setAllServerPaths_and_Handlers(BackEndUrl, Url, ServerLocation, handlerType, frontEndType, f_div, ctrlPath)

Set the Handlers for server communication - user controlled combination of front-end and back-end Pass over the current settings for ServerLocationbackendUrl, Url and ServerLocation (or set to load location via script)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
BackEndUrl string

server backend Url of back-end scripts interface

Url string

server location of html Element on which CADViewer is located

ServerLocation string

server location of html Element on which CADViewer is located

handlerType String

the following settings are implemented: 'DotNET', 'PHP', 'Servlets', 'NodeJS', 'DotNETCore'

frontEndType String

the following settings are implemented: 'ReactJS', 'Angular', 'JavaScript', 'VueJS'

f_div String

the floorplan div in which CADViewer is running

ctrlPath String

optional, set the controller Path, used with dotNetCore

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setAngular(mode)

Set Angular Mode

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

set flag for Angular mode. Default is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setBackgroundColor(f_div)

Calls modal for setting background color

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setBackgroundColorHex(hex, f_div)

Set the background color of CADViewer canvas, using HEX

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
hex string

of background, hex string, can be with or without #

f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setBearerToken(token)

Set a bearer token for all REST API calls

Parameters:
Name Type Description
token string

, if null or "" then no token is set and header is removed

cvjs_setCustomMergedEmailHandler(handlerName)

Sets the name of server side handler to custom control merged content sent as email

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomPDFprintController(handlerName)

Sets the name of server side controller to custom control print as PDF inside print modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomPDFprintControllerFlag(customPrintAsPDF)

Sets flag to control if Print to PDF inside print modal shall be handled by custom controller. The name of controller is defined in: cvjs_setCustomPDFprintController()

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
customPrintAsPDF boolean

default is false. Set to true to custom implement this feature

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setDefaultJSPath(path)

Set the script paths to load default drawings for encapsulate png rendering, typically ../javascripts

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

to default script-file folder

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setDisableClickDrag(flag)

Control if interactive drag inside a space, shall be disabled or not

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

false for interactive drag, true to disable, false is default.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setGetFileController(handlerName)

Sets the name of server side controller to load drawings after conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setHandleObjectProcessing(hlallProcessing)

Set the HLALL processing at load - handle processing is also used internally for snap in measurement

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
hlallProcessing boolean

flag to parse handles at load, default is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setHandlers_FrontEnd(handlerType, frontEndType, f_div, controllerPath)

Set the Handlers for server communication - user controlled combination of front-end and back-end

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerType String

the following settings are implemented: 'DotNET', 'PHP', 'Servlets', 'NodeJS', 'DotNETCore'

frontEndType String

the following settings are implemented: 'ReactJS', 'Angular', 'JavaScript', 'VueJS'

f_div String

the floorplan div in which CADViewer is running

controllerPath String

optional, set the controllerPath, used with dotNetCore

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setHandlerSettings(handlerType, f_div, controllerPath)

Set the Handlers for server communication - assumptions of back-end + front end assumed

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerType String

the following settings are implemented: 'ReactJS', 'Angular', 'dotNet', 'dotNetCore' 'PHP', 'Servlets', NodeJS'

f_div String

the floorplan div in which CADViewer is running

controllerPath String

the controller path, if any, primarily used for dotNetCore

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setInformationModalType(modal)

Activates and displays the information modal with text

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
modal int

type, 1 for bootstrap modal, 2 for standard floating modal, default is bootstrap modal

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setInitMasterBackgroundMode(mode)

Sets the status of the drawing cvjs_masterbackground[cvjs_active_floorplan_div_nr]. If set to true, refreshed on reload, if false multiple drawings can be merged into canvas

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

true for standard load, false for overlay of drawings on concequitive loads.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setInteractiveZoomWidthAdjustment(flag)

Control if interactive zoom adjusts lineweights dynamically

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
flag boolean

flag for integrated zoom adjustment of lines, default is true

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setISOtimeStamp(filename, isostamp)

Sets the ISO time stamp of the drawing to be loaded for server side cache, the default is "none"

Parameters:
Name Type Description
filename String

same FileName as to be used with cvjs_LoadDrawing()

isostamp String

the time stamp of the file using ISO notation.

cvjs_setISOtimeStampCompare(filename, isostamp)

Sets the ISO time stamp of the compare drawing to be loaded for server side cache, the default is "none"

Parameters:
Name Type Description
filename String

same FileName as to be used with cvjs_LoadDrawing()

isostamp String

the time stamp of the file using ISO notation.

cvjs_setJSFileOldType(oldtype)

Sets the loading of filetypes to be the old CADViewer type, in which each file consists of four separate files

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
oldtype boolean

true for oldtype, false for standard new type. Default is false.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setMultiSelect(multiSelect)

Controls the multiselect variable status

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
multiSelect boolean

multiselect flag, default is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setNodeJSserver(mode)

Set NodeJS Server flag

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

set flag for nodejs handling. NodeJS server behaves differently for print, default false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPhpPath(path)

Sets the location to the php folder

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

current location of php scripts, typically ../php/

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPhpUploadPath(Url)

Sets the location to the php upload folder, this can be on a different domain

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Url string

location of upload_2.php document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModal_printGreyScaleflag(printGreyScaleflag)

Controls if GreyScale feature is included in print Modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
printGreyScaleflag boolean

true is default, set to false to hide printGreyScaleflag in Print Modal

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModal_PrintPDF(printPDFflag, printAsPDF)

Controls if Print to PDF feature is included in print Modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
printPDFflag boolean

true is default, set to false to hide PrintAsPDF in Print Modal

printAsPDF boolean

false is default, true will set pdf print flag even if PrintAsPDF checkbox is invisible

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModal_PrintToScale(printToScaleflag)

Controls if Print to Scale feature is included in print Modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
printToScaleflag boolean

true is default, set to false to hide PrintToScale in Print Modal

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintObjectPath(path)

Sets the location to the print objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

location of print object relative to Controller, can also use absolute paths standard is "./temp_print/"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintObjectPathAbsolute(pathUrl, absolutePathServer)

Sets the location to the print objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pathUrl string

location of print objects, web path

absolutePathServer string

location of print objects, server side absolute path

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintOrientation(orientation)

Sets the print orientation

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
orientation string

print orientation, portrait or landscape

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintPaperSize(papersize)

Sets the paper size of print output

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
papersize string

String containg paper size, allowed settings are: A4, A3, A2, US LETTER, ANSI A, ANSI B, ANSI C

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintResolutionDpi(dpi)

Sets the print resolution

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
dpi int

print resolution in dpi, minumum is 75dpi, standard is 300

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setQtipLocation(qtip_location_my, qtip_location_at)

Sets the z-index of qtip modals

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
qtip_location_my int

insert location if the qtip itself

qtip_location_at int

insert location relative to the highlight object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.   

                          

cvjs_setQtipZindex(zindex)

Sets the z-index of qtip modals

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
zindex int

zindex of ztip

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setReturnPathController(returnPathController)

Sets the server location controller

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
returnPathController String

controller name

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setReturnPDFparamsController(handlerName)

Sets the name of server side controller to return path structure for PDF conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerAppendFileHandler(handlerName)

Sets the name of server side append-file controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerAppendFileHandlerPrint(handlerName)

Sets the name of server side append-file controller document for print

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerCopyFileHandler(handlerName)

Sets the name of server side copy-file controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerCreateThumb_StickyNote_Controller(controller)

Sets the server controller to save screen as bitmap and create thumbnails

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
controller String

the name of the controller

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerDeleteFileHandler(handlerName)

Sets the name of server side delete-file controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerDeleteFileHandlerPrint(handlerName)

Sets the name of server side delete-file controller document for print

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerGetQRCodeController(serverGetQRCodeController)

Sets the insertion location of QR Codes

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
serverGetQRCodeController String

controller name

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerHandlersPath(path)

Sets the location of the server side handers for load, save, append and print controls

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

location of print handlers, in the standard case this in the "/php/" folder with redline and file controllers

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerListDirectoryHandler(handlerName)

Sets the name of server side directory list controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerLoadHandler(handlerName)

Sets the name of server side load-file controller document for file list load

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerLoadHandlerRedlines(handlerName)

Sets the name of server side load-file controller document for redline load

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerMergeDWGHandler(handlerName)

Sets the name of server side merge DWG controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerPDFConverterController(handlerName)

Sets the name of server side controller to control PDF conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerRedlinesListDirectoryHandler(handlerName)

Sets the name of server side directory redlines list controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerSaveFileHandler(handlerName)

Sets the name of server side save-file controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerSaveFileHandlerPrint(handlerName)

Sets the name of server side save-file controller document for print

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerSaveHandlerRedlines(handlerName)

Sets the name of server side save-file controller document for redline save

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerSavePrintModeController(mode)

Sets the server print mode controller. This variable is used to control what happens after a screenshot is sent to the server

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode int

the mode in which to control encapsulations of screenshots images sent down to server mode = 0: Standard print mode in which a screenshot gets encapsulated into an html document that is opened through a pop-up for printing mode = 1: The screenshot is saved to the server as part of stickyNote save, and thumbnails of the image is generated, see method: cvjs_saveScreenAsImage_stickyNoteInfo_makeTumbnails() mode = 2: The screenshot is saved to the server as part of a multidocument batch print pdf creation, see method: cvjs_batchConvertDrawingsToPDF()

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerSavePrintModeHandler(mode)

Sets the server print mode controller. This variable is used to control what happens after a screenshot is sent to the server

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode int

the mode in which to control encapsulations of screenshots images sent down to server mode = 0: Standard print mode in which a screenshot gets encapsulated into an html document that is opened through a pop-up for printing mode = 1: The screenshot is saved to the server as part of stickyNote save, and thumbnails of the image is generated, see method: cvjs_saveScreenAsImage_stickyNoteInfo_makeTumbnails() mode = 2: The screenshot is saved to the server as part of a multidocument batch print pdf creation, see method: cvjs_batchConvertDrawingsToPDF()

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerScreenToPDFController(controller)

Sets the server ScreenToPDF PHP controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
controller String

The location of this document is in: cvjs_phpPath if php, else it will use handler folder.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerScreenToPDFHandler(controller)

Sets the server ScreenToPDF PHP controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
controller String

The location of this document is in: cvjs_phpPath if php, else it will use handler folder.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectProcessing(spaceProcessing)

Enable or Disable Space Object processing at load

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
spaceProcessing boolean

flag to parse spaces at load, default is true

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setUnitForCalibrate(unit)

Set the initial unit in Calibrate command

Parameters:
Name Type Description
unit string

unit mm,cm,mm, km, inch, feet

cvjs_setUploadController(handlerName)

Sets the name of server side upload controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setUploadControllerPath(Url)

Sets the location to the upload controller location, this can be on a different domain

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Url string

location of upload controller

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setUploadHandler(handlerName)

Sets the name of server side upload controller document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handlerName string

name of the controller/handler document

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setWatermarks(textline1, textline2, hexcolor, sendtoback)

Sets 9 individual watermarks, each rotated and with color hexcolor, can be on top or sent to back of drawing

Parameters:
Name Type Description
textline1 string
textline2 string
hexcolor string
sendtoback boolean

cvjs_startSearchText()

Calls the interactive modal for text search

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_suppressServerErrorMessages(flag)

Suppress the server side error messages,

Parameters:
Name Type Description
flag boolean

default is false, if true, the server side error messages are suppressed

cvjs_swapLayersInDrawing(f_div)

Swap drawing layers On/Off

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_unifiedDrawing_firstPage()

Identify first page in Unified Drawing

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_unifiedDrawing_initializePage(pagenr)

intialize a page after a pagechange on a Unified drawing

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pagenr int

page number

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_unifiedDrawing_pageChange(page)

Change pace in drawing processed with AutoXchange -unified parameter

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
page int

page number

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_unifiedDrawing_parseMetadataSection(pagenr)

parse the metadata section of a unified drawing

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pagenr int

page number

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_version() → {string}

Display the current version number of the CADViewer toolkit and viewer

CADViewer Internal Command Groups: All.

See:
Returns:

version - current version number

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_activateFixedZoomWidthAdjustment(flag)

Set if Fixed Weight objects shall be interactively modified by zoom operations

Parameters:
Name Type Description
flag boolean

true if active, false if not, default is true

cvjs_addSVGClickHandler_onLoad(mode)

Set the clickhandler mode for SVG on load. The default is false
All SVG objects with an 'id' implemented will be associated with a clickhandler
The method will call a number of user implemented call-back methods:
cvjs_SVGfileObjectClicked(id, x, y) : callback for click on an object, this method is user implemented
cvjs_SVGfileObjectMouseEnter(id, x, y) : callback for mouse entering an object, this method is user implemented
cvjs_SVGfileObjectMouseLeave(id, x, y) : callback for mouse leaving an object, this method is user implemented
cvjs_SVGfileObjectMouseMove(id, x, y) : callback for mouse move on an object, this method is user implemented

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

true: click handlers are added to objects on load, false: no handers added on load

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_adjustMinimumLineThickness(precentage)

Adjust minimum line thickness

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
precentage int

In percentage, set the factor to adjust the minumum line thickness, a value over 100 makes lines thicker, a value below 100 makes lines thinner

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_adjustMinimumLineThickness_Value(value)

Adjust minimum line thickness for all content

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
value float

Set the minumum line thickness

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_allLayoutViewportScales()

Calculate arrays with viewport scale factor based on current layout and active view

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_allowFileLoadToServer(mode)

Enables file load through the icon interface, or allows it only through the encapsulating application

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

true for file load through File Manager, default is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_bringForward(f_div)

Bring a Space Object forward, Space Object is selected with SHIFT+Click

Parameters:
Name Type Description
f_div string

name of floorplan div in which CADViewer is running

cvjs_bringToFront(f_div)

Bring a Space Object to front, Space Object is selected with SHIFT+Click

Parameters:
Name Type Description
f_div string

name of floorplan div in which CADViewer is running

cvjs_buildMultiPageSVG(directory, url_directory)

Build an internal navigational structure over a folder with SVG files named sequentially xx_1.svg, xx_2.svg....

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
directory string

server side name of the folder in which the svg files are placed. The folder should only contain the svg files to navigate over

url_directory string

url of the folder in which the svg files are placed.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changePageByNumber(f_div, newpagenumber) → {boolean}

Change page on the current drawing based on page number

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

newpagenumber int

a number between 1 and the total pages in the drawing

See:
Returns:

status - false if newpagenumber outside of range, true if page change

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearCurrentRedline(f_div)

Clear all redlines currently visible

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ClearDrawing(f_div)

Clears the drawing space of CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the div canvas object to which CADViewer is allocated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_addAXconversionParameter(name, value)

Add an AutoXchange conversion control parameter for server based conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
name string

conversion parameter name

value string

conversion parameter value, if no value set ""

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_addAXconversionParameters(axparameters)

Adds all AutoXchange conversion control parameter for server based conversion through a JSON array

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
axparameters Object

json array with AX control parameters

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_clearAXconversionParameters()

Clears the custom AutoXchange conversion control parameter for server based conversion

CADViewer Internal Command Groups: All.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_getContentResponse()

Get the current type of content response

CADViewer Internal Command Groups: All.

See:
Returns:

string - Returns type of content response - "file | embedded | stream"

Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_setContentFormat(contentFormat)

Sets control parameter for conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
contentFormat string

"DWG | DXF| DWF | DGN - DGN currently not implemented",

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_setContentResponse(userLabel)

Sets control parameter for conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
userLabel string

" optional label returned in the response",,

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_setContentType(contentType)

Sets control parameter for conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
contentType string

"file | embedded | stream"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_setUserLabel(userLabel)

Sets control parameter for conversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
userLabel string

" optional label returned in the response",,

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_debugMode(debug)

Sets debug mode

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
debug boolean

true for debug traces, false otherwise

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayAllInterfaceControls(mode, f_div)

Removes all icon interface components for viewing, redlining, etc. so that developers can control their own interface

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Set the modal interface, default is true

f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayAllInterfaceControlsZoomDisk(f_div)

Show the zoom disk

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_DisplayCoordinatesMenu(f_div, displayFlag)

Display menu with transformed original DWG coordinates and display SVG coordinates

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div in which CADViewer is implemented

displayFlag boolean

flag to display coordinates, default is false.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayCustomSpaceObjectMenu(f_div, displayFlag)

Display menu with custom space icon objects for insertion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div in which CADViewer is implemented

displayFlag boolean

flag to display space object menu for insert, default is false.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayTopMenuIconBar(display_status, f_div)

Controls top menu icon bar visibility

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
display_status boolean

default is true, use false to hide menu bar

f_div String

div in which CADViewer is implemented

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayTopNavigationBar(display_status, f_div)

Controls top menu navigation bar visibility

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
display_status boolean

default is true, use false to hide menu bar

f_div String

div in which CADViewer is implemented

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayZoomIconBar(display_status, f_div)

Controls Zoom menu visibility

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
display_status boolean

default is true, use false to hide menu bar

f_div String

div in which CADViewer is implemented

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_encapsulateUrl_callback(flag:)

Encapsulate Url in JavaScript callback method cvjs_Url_callback(). Developer gets control over all hyperlinks in drawing

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag: boolean

enable callback method false: disable callback method (link directly from drawing)

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_fileLoad_setContentFormat(fileFormat)

Sets fileformat for file-load

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileFormat string

"PNG, JPG, GIF", to set bitmap, "JS" for standard load

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_findAllTextInstances() → {object}

Extracts all text objects in a drawing and returns a JSON structure with all text, coordinates in both SVG and DWG coordinates and layer nanme and status

Returns:

returns a JSON structure with all text, coordinates in both SVG and DWG coordinates and layer nanme and status

[{"text":"One of simple 2","x_svg":"1211.25","y_svg":"538.09","x_dwg":"7.7615","y_dwg":"3.3928","layername":"0","layerstatus":"ON"}]

Type
object

cvjs_getCurrentPage() → {int}

Returns the current page number in the document loaded

CADViewer Internal Command Groups: All.

See:
Returns:

pageNumber

Type
int
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getLanguages() → {string}

Get the languages supported in CADViewer

CADViewer Internal Command Groups: All.

See:
Returns:

languages - string with available languages

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getServerBackEndUrl() → {string}

Get the current ServerBackEndUrl variable;

CADViewer Internal Command Groups: All.

See:
Returns:

ServerBackEndUrl - ServerBackEndUrl of current CADViewer settings

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getServerLocation() → {string}

Get the current ServerLocation variable;

CADViewer Internal Command Groups: All.

See:
Returns:

ServerLoction - server location of html Element on which CADViewer is located

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getServerURL() → {string}

Get the current ServerURL variable;

CADViewer Internal Command Groups: All.

See:
Returns:

ServerURL - server url of html Element on which CADViewer is located

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_Help(mouseclick)

Turns the interactive help menu system on/off

Parameters:
Name Type Description
mouseclick bool

cvjs_hideAllInterfaceControls(f_div)

Hide the page change modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_Init_ConversionServer(rest_api_url, rest_api_php, username, password)

Set up CADViewer for the call to the server side custom implementation of the API controlling conversions of DWG,DXF, and DWF files through AutoXchange

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rest_api_url string

url of conversion rest api on server

rest_api_php string

url of the PHP rest controller on server

username string

the username of the server, "" if no username

password string

the password of the server, "" if no username

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer(f_div, image, javascripts_folder)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

image string

folder - the path to the image location folder with icon settings, default is "+cvjs_imagesLocation+"

javascripts_folder string

the path to javascripts folder with icon settings, default is ../javscripts/

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer_app(f_div, app_folder, imagePathDirect)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

app_folder string

the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/". If installed via npm all resources are imported internally and this path is not used.

imagePathDirect string

direct paths to Images, typically "/assets/cadviewer/app/images/"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer_app_highLight(f_div, app_folder, spaceBaseAttr, spaceHighlAttr, spaceSelectAttr)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

app_folder string

the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/", on Angular "/assets/cadviewer/app/. If installed via npm all resources are imported internally and this path is not used.

spaceBaseAttr object

javascript object containing fill, color and stroke properties for display of Space Object roompolygons

spaceHighlAttr object

javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons

spaceSelectAttr object

javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer_app_highLight_popUp(f_div, app_folder, spaceBaseAttr, spaceHighlAttr, spaceSelectAttr, cvjsPopUpBody)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

app_folder string

the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/", on Angular "/assets/cadviewer/app/. If installed via npm all resources are imported internally and this path is not used.

spaceBaseAttr object

javascript object containing fill, color and stroke properties for display of Space Object roompolygons

spaceHighlAttr object

javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons

spaceSelectAttr object

javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons

cvjsPopUpBody object

html/css styled object containing the content of the modal when selecting Space Objects

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer_highLight(f_div, spaceBaseAttr, spaceHighlAttr, spaceSelectAttr)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

spaceBaseAttr object

javascript object containing fill, color and stroke properties for display of Space Object roompolygons

spaceHighlAttr object

javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons

spaceSelectAttr object

javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer_highLight_popUp(f_div, spaceBaseAttr, spaceHighlAttr, spaceSelectAttr, cvjsPopUpBody)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

spaceBaseAttr object

javascript object containing fill, color and stroke properties for display of Space Object roompolygons

spaceHighlAttr object

javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons

spaceSelectAttr object

javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons

cvjsPopUpBody object

html/css styled object containing the content of the modal when selecting Space Objects

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer_highLight_popUp_app(f_div, app, spaceBaseAttr, spaceHighlAttr, spaceSelectAttr, cvjsPopUpBody)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

app string

folder - the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/"

spaceBaseAttr object

javascript object containing fill, color and stroke properties for display of Space Object roompolygons

spaceHighlAttr object

javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons

spaceSelectAttr object

javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons

cvjsPopUpBody object

html/css styled object containing the content of the modal when selecting Space Objects

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitCADViewer_highLight_popUp_dual_Id(f_div, spaceBaseAttr, spaceHighlAttr, spaceSelectAttr, cvjsPopUpBody, cvjsPopUpBody2)

Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

spaceBaseAttr object

javascript object containing fill, color and stroke properties for display of Space Object roompolygons

spaceHighlAttr object

javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons

spaceSelectAttr object

javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons

cvjsPopUpBody object

html/css styled object containing the content of the modal when selecting Space Objects

cvjsPopUpBody2 object

second html/css styled object containing the content of the modal when selecting Space Objects, internally controlled based on type of Space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_initZeroWidthHandling(f_div, scale_factor)

Init ZW class handling, automated Zoom and adjustment of zerowidth

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

scale_factor int

scale factor on zero width lines when zooming

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_interactiveSearchText(f_div)

Activates the interactive Text Modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_lastSavedView(f_div)

Zoom to Last Saved View if defined

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

cvjs_LayerOff(layer)

Turn single general layer on, either defined individually or as a Object Space layer or Text on a Space object - Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to turn off

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LayerOn(layer)

Turn single general layer on, either defined individually or as a Object Space layer or Text on a Space object - Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to turn on

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LayerOn_AllOff(layer)

Turn single Object Space layer on, turn all other layers off - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to turn on

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LayersOnOffPrepend(prependstring, onoff)

Turns a selection of prepended layers on

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
prependstring string

name of prepend string of layer

onoff string

"ON" or "OFF"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadCADViewerLanguage(language, languagelocation)

Set the language in CADViewer by first loading the language file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
language string

name of the language

languagelocation string

path and name of the language location, releative to install folder, if null or undefined, defaults to standard settings for the Handler

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LoadDrawing(f_div, FileName)

Loads a drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewer_ methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

FileName string

the name and path to the location of the CADViewer drawing files to load in, the path is either absolute or relative to the document in which CADViewer is invoked

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LoadDrawing_Conversion(f_div, originatingContent, FileNameNoExtension, originatingUsername, originatingPassword)

Loads a DWG drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewer_ methods The method connects to the TailorMade Restful API, alternative Open Source alternatives for conversion of DWG, DXF,DWF and DGN,PCF files

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

originatingContent string

the originating content, can be a http path to location, local server side path, stream link or 64 base encoded data

FileNameNoExtension string

file name of the drawing without extension - CADViewer will automatically generate naming

originatingUsername string

if the originating file is username/password protected , "" if no username

originatingPassword string

if the originating file is username/password protected , "" if no password

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LoadDrawing_SVG(f_div, FileNamePath, FileName)

Loads a SVG drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewer_ methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

FileNamePath string

the filepath to the location of the SVG drawing files to load in, the path is either absolute or relative to the document in which CADViewer is invoked

FileName string

file name of the SVG drawing, optional as content will be loaded from FileNamePath, which may contain filename

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LoadDrawing_SVG_string(f_div, basestring, FileName, base64)

Loads a SVG drawing into CADViewer as a string, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewer_ methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

basestring string

the string containing the svg

FileName string

file name of the SVG drawing

base64 boolean

flag for base64 encoding

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LoadDrawingInternal(f_div, FileNamePath, FileNameNoExtension, serverCallBack)

Loads a drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewer_ methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the SVG canvas object to which CADViewer is allocated

FileNamePath string

the filepath to the location of the CADViewer drawing files to load in, the path is either absolute or relative to the document in which CADViewer is invoked

FileNameNoExtension string

file name of the drawing without extension (CADViewer will automatically generate naming and load in files associated with the file name)

serverCallBack boolean

set to false or undefined.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LoadTopIconMenuViewing(f_div)

Set the Community Menu if no XML file has been designated for menu configuration

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LoadTopIconMenuXML_preconfigured(f_div)

Direct load of top Icon menu from a preconfigures XML configuration file, used to reload current icon menu based on browser zoom change

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_measurementLinesScaleFactor(factor)

Set a scale factor to arrow and area lines when measuring

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
factor string

scale factor to the standard line weight setting, default is 1.0

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_overwriteDefaultDeviceSettings(mode)

Overwrite default icon menu settings on devices

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

true: sets the icon menu on devices similar to desktop environment, false: do not change default. False is default

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_panDown()

Pans the current active drawing one step down

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_panLeft()

Pans the drawing one step to the left

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_panRight()

Pans the current active drawing one step to the right

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_panUp()

Pans the current active drawing one step up

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_redrawViewBox()

Redraws the current ViewBox, thereby refreshing the screen with same zoom settings

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_regenerateTopIconMenuXML(f_div)

After menu initialization and generation, this method call can be used to populate a new menu XML file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of SVG element containing canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resetZoomPan(f_div)

Zoom Extents on the drawing

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resizeWindow_fixedSize(widthFloorplan, heightFloorplan, floorplan)

Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
widthFloorplan float

width of containing element in pixels

heightFloorplan float

height of containing element in pixels

floorplan string

name of SVG element containing canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resizeWindow_fixedSize_location(widthFloorplan, heightFloorplan, floorplan, xPos, yPos)

Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
widthFloorplan float

width of containing element in pixels

heightFloorplan float

height of containing element in pixels

floorplan string

name of SVG element containing canvas

xPos int

x position of element

yPos int

y position of element

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resizeWindow_position(floorplan)

Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
floorplan string

name of SVG element containing canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_restApiController()

Returns the recommended conversion engine php controller for this library, use this to intialize the conversion server setup, this value gets overwritten using cvjs_Init_ConversionServer

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_restApiControllerLocation()

Returns the recommended conversion engine php controller location for this library, use this to intialize the conversion server setup, this value gets overwritten using cvjs_Init_ConversionServer

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_restApiConverter()

Returns the recommended converter for this library

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_restApiConverterVersion()

Returns the minimum recommended converter version number for this library

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_returnSpaceObjectSelected() → {string}

Returns the current object selected on active floorplan

CADViewer Internal Command Groups: All.

See:
Returns:

lastObj- current space object selected, -1 if no current selection

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_rotateAngle(angle, f_div)

Rotates an angle based from 0

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
angle float

rotation angle

f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_rotateBackward(f_div)

Rotates 90 degrees forward

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_rotateForward(f_div)

Rotates 90 degrees forward

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_searchAllTextInstances(searchString, exactMatch) → {string}

Performs a seach over all text object in drawing, and returns a JSON object with single or multiple entries of structure: [{"text":"This is a simple text","x":1055.24988876,"y":468.79}].

Parameters:
Name Type Description
searchString string

, the seach string

exactMatch bool

, true for exact match, false for partial string match

Returns:

JSON object of structure: [{"text":"This is a simple text","x":1055.24988876,"y":468.79}]

Type
string

cvjs_searchText(searchString, zoomFactor)

Text Search; finds a text string in the drawing, and zooms over the search result

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
searchString string

the text string to search after

zoomFactor int

zoom factor of the seach result in percentage of zoom extents

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_searchTextInstance(searchString, zoomFactor, textInstance) → {int}

Text Search; finds a text string in the drawing, and zooms over the search result

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
searchString string

the text string to search after

zoomFactor int

zoom factor of the seach result in percentage of zoom extents

textInstance int

if multiple entries of text object, load instance, the first instance is 1

See:
Returns:

1 if found, otherwise 0, 2 found on hidden layer

Type
int
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_sendBackward(f_div)

Send a Space Object backward, Space Object is selected with SHIFT+Click

Parameters:
Name Type Description
f_div string

name of floorplan div in which CADViewer is running

cvjs_sendToBack(f_div)

Send a Space Object to back, Space Object is selected with SHIFT+Click

Parameters:
Name Type Description
f_div string

name of floorplan div in which CADViewer is running

cvjs_setAllServerURLsLocation(ServerBackEndUrl, ServerUrl, ServerLocation)

Pass over the current settings for ServerLocationbackendUrl, ServerUrl and ServerLocation (or set to load location via script)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
ServerBackEndUrl string

server backend Url of back-end scripts interface

ServerUrl string

server location of html Element on which CADViewer is located

ServerLocation string

server location of html Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCADViewerInterfaceVersion(version)

Sets the cadviewer interface version, version 7 and up is SVG based skin, version 6 is legacy bitmap fixed size icons

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
version int

version 7+ is new default, version 6 is legacy interface

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCADViewerSkin(skin)

Sets the icon skin of CADViewer 7

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
skin String

div in which CADViewer is implemented

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setConverter(converter, version)

Set the AutoXchange converter name and version to be used for the Rest conversion call

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
converter string

converter name

version string

converter version

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setConverterCredentials(username, password)

Set the username and password to be used for the Rest conversion call

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
username string

username on the Rest server where AutoXchange is installed

password string

password on the Rest server where AutoXchange is installed

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomCallbackMethodOnLoadEnd(callbackMethodOnLoadEnd, myOnLoadEndMethod)

Set custom call back method for OnLoadEnd when drawings are loaded.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
callbackMethodOnLoadEnd boolean

false: default - no custom method , true: custom method defined.

myOnLoadEndMethod function

: method that is executed OnLoadEnd of drawing

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomPdfFolder(customPdfFolderName, forcedUpdate)

Sets the path to folder with converted PDF pages. If the folder exists and contain the converted pdf, the converted content will be used for visualization

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
customPdfFolderName string

custom PDF path id, for permanent storage of converted PDF file

forcedUpdate boolean

if true, force the folder to be reconverted (if the originating pdf has been updated), false is default

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomTopMenuXML(xml_config_file, f_div)

Loads in the top icon menu system from an XML file The XML file is in /cadviewer/app/js/menu_config/ The XML file allows custom settings of the number of menu pages, the start menu page and content of each page, based on the selection set of available API commands

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
xml_config_file String

XML top menu configuration file

f_div String

div in which CADViewer is implemented

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setDecimalsInMeasurementDisplay(decimals)

Sets the number of decimals in Measurement Display

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
decimals int

, number of decimals, default is 4.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setFileLoadTimeOut(f_div, timeout)

Sets the time-out wait for file load

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

timeout int

The time-out in seconds

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconImageSize(f_div, pixelheight, pixelheight_large)

Sets the pixel height of icon menus

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div in which CADViewer is implemented

pixelheight int

height of icon menu in pixels, default is 34.

pixelheight_large int

height of large icon menu in pixels, default is 34.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_ClassicSkin(mode, f_div)

Set the classic icon desk, larger on desktop, smaller on devices

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Set the modal interface, default is true

f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_ClassicSkin_DevicesSizeOnly(mode, f_div)

Set the classic icon desk, device size on all platforms

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Set the modal interface, default is true

f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_DisableIcons(mode, f_div)

Removes the icon interface for viewing, redlining, etc. so that developers can control their own interface

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Set the modal interface, default is true

f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_MimimumDisk(mode, f_div)

Set minimum icon desk, same size on all platforms

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Set the modal interface, default is true

f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_PageModal(mode, disableNavButtons, f_div)

Disable/enable page change modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Set the modal interface, default is true, false disables page change modal

disableNavButtons boolean

Disable page navigation icons in main menu disk. As a default when the page modal is disabled, extra navigation buttons are introduced in the icon interface. If always loading single page files, and no navigation is needed, set this to to true

f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_PanZoomDisk(mode, f_div)

Set panzoom desk, same size on all platforms

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
mode boolean

Set the modal interface, default is true

f_div String

the div running CADViewer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setJavaScriptsAbsoluteFolder(folder)

Set javascripts absolute folder url path. Used for print object to find scripts folder to access jquery and ajax

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
folder string

absolute jQuery javascripts folder url path

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setJavaScriptsJQ_AbsoluteFolder(folder)

Set javascripts absolute folder and jQuery url path. Used for print object to find scripts folder to access jquery and ajax

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
folder string

absolute jQuery javascripts folder url path and name

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setLanguage(Language)

Set the language in CADViewer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Language string

name of the language

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setLayerColor(layerName, layerHexColor)

Set a layer color

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layerName string

layer

layerHexColor string

hex color of layer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setLeafletJS(mode)

Set the clickhandler mode for SVG on load. The default is false

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

set LefletJS mode , default is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setOriginatingFileUsernamePassword()

Sets the username and password on the server where the converter has to pick up the file for conversion set to "" "" if not protected

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_setOriginatingLocation(location)

Set Originating location in conversion callback

Parameters:
Name Type Description
location string

can be either "origin" or "href"

cvjs_setPanState(panState)

Enable or disable pan operations with a smaller thumbnail drawing object, thereby increasing redraw speed. For large drawings and on limited capacity devices, set this option to true.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
panState boolean

true for pan with thumbnails, false for pan with original image

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPasswordProtectionServerAccess(passwordprotection)

Sets password protection for Server Access

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
passwordprotection boolean

true for passwordprotection, false otherwise

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRelativeConversionFilesFolder(converterfilespath, converterfileurlspath)

Sets CADViewer /converters/files relative path

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
converterfilespath String

converters/files/ alternative path

converterfileurlspath String

converters/files/ alternative urlpath

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRelativeScriptsPath(scriptsPath)

Set the scripts path to folder with CADViewer javascripts

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
scriptsPath string

paths to Scripts, typically "../javascripts"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRestApiController(myConverterDoc)

Set the engine controller document handling conversions

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
myConverterDoc string

name of the document handling conversions

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRestApiControllerLocation(myAXlocation)

Set the engine controller location for this library,

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
myAXlocation string

location of the server side autoXchange structure

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerAccessToPost(flag)

Sets ajax call for server access call for Post jQuery.ajax({ type: 'POST', url: serverUrl, data: JSON.stringify(object),

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

true for Post, false standard php case

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerAccessToServlet(flag)

Sets ajax call for server access call for Servlets jQuery.ajax({ url: "jsonservlet - cvjs_setRestApiControllerLocation + cvjs_setRestApiController", type: 'POST', dataType: 'json', data: JSON.stringify(article), contentType: 'application/json', mimeType: 'application/json',

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

true for servlets, false standard php case

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerBackEndUrl(ServerLocationBackEndUrl)

Pass over the current settings for ServerLocationbackendUrl

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
ServerLocationBackEndUrl string

server location of html Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerLocationURL(ServerLocation, ServerUrl)

Pass over the current settings of the calling html document context

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
ServerLocation string

server location of html Element on which CADViewer is located

ServerUrl string

server url of html Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectsCustomMenu(serverFolder, fileName, flag)

Display menu with custom space icon objects for insertion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
serverFolder *

folder of Space Object meny content, default is: /content/customInsertSpaceObjectMenu/

fileName *

filename of json file with space objects default is: cadviewercustomspacecommands.json

flag *

true to display, false to hide by default, default is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSupressHyperlinkColors(supressflag)

Sets the the response of

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
supressflag boolean

true to supress hyperlink colors, false to keep standard highlight

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSVG_outputFormatInAXConversions(mode)

Set SVG conversion control parameter for server based conversion using either SVG or JS as format.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

true for SVG as intermediate format false for .js as intermediate format. Default is true.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setTopMenuXML(f_div, xml_config_file, xml_config_file_location)

Loads in the top icon menu system from an XML file The XML file is in /cadviewer/app/js/menu_config/ The XML file allows custom settings of the number of menu pages, the start menu page and content of each page, based on the selection set of available API commands

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div in which CADViewer is implemented

xml_config_file String

XML top menu configuration file

xml_config_file_location String

location of xml config file relative to install server location, omitting this parameter, it will use default paths

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setTopMenuXMLDirect(f_div, xml_config_file)

Loads in the top icon menu system from an XML file passed over as an string variable The XML file allows custom settings of the number of menu pages, the start menu page and content of each page, based on the selection set of available API commands

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div in which CADViewer is implemented

xml_config_file String

XML top menu configuration file as a string

See:

cvjs_setUrl_singleDoubleClick(click)

Sets the click response of URl links to either single click or double click

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
click int

1: single click 2: double click

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setZoomExtentsMode(mode)

Zoom Extents on the drawing

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
mode int

"standard" = standard zoom extents , "top" - zoom to top , "left" - zoom to left

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_windowResize_fixedSize(doResize, widthFloorplan, heightFloorplan, floorplan)

Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
doResize boolean

flag to do resize of canvas or not: Parameter doResize is set to false when calling cvjs_windowResize_ after initialization and loading of file. Parameter doResize is set to true when cvjs_windowResize is implemented into the function jQuery(window).resize(function() {}

widthFloorplan float

width of containing element in pixels

heightFloorplan float

height of containing element in pixels

floorplan string

name of SVG element containing canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_windowResize_position(doResize, floorplan)

Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
doResize boolean

flag to do resize of canvas or not: Parameter doResize is set to false when calling cvjs_windowResize_ after initialization and loading of file. Parameter doResize is set to true when cvjs_windowResize is implemented into the function jQuery(window).resize(function() {}

floorplan string

name of SVG element containing canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ZoomExtents(f_div)

Zoom Extents on the drawing

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomExtents(f_div)

Zoom Extents on the drawing

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ZoomIn(f_div)

Zoom the Drawing In one step

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomIn(f_div)

Zoom the Drawing In one step

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomInOutCustomFactor(f_div, customZoomFactor-)

Zoom either in or out on the drawing with a custom zoom factor

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

customZoomFactor- float

custom zoom factor, if the factor is between 0 and 1, it zooms in, if above 1, it zooms out.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ZoomOut(f_div)

Zoom the drawing Out one step

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomOut(f_div)

Zoom the drawing Out one step

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ZoomWindow(f_div)

Activated the Zoom Window command

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomWindow(f_div)

Activated the Zoom Window command

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addRectangleCustomSpaceObject(f_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer)

Add a Space Object Custom Rectangle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

svgImagePath string

name of path containing wallpaper object

spaceObjectId string

Unique ID of the space object. NOTE!

spaceObjectName string

Name of the space object.

spaceObjectType string

Type of the object

layer string

the associated layer of the object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_AddTextOnSpaceObject(txtLayer, Id, leftScale, textStringArr, styleArr, scaleArr, colorArr, clip, centering)

Add multiple of text, individually formatted and styled, inside a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
txtLayer string

layer to apply the text

Id string

Id of the graphical object in which to place the text

leftScale float

distance from the left border of Space Object, value between 0 and 1

textStringArr array

Array with the lines of text

styleArr array

Array with textstyle of text lines, formattet as a java script object with css style elements, predefined is: text_style_arial_11pt_bold , text_style_arial_9pt_normal, text_style_dialog

scaleArr array

Array with relative scale of text lines in relation to space object height, value between 0 and 1. If 0, using font-size in font object as is.

colorArr array

Array of color of text lines in hex form, for example: #AA00AA

clip boolean

true if clip of text inside of Space Object, false if text to cross Space Object borders

centering boolean

true if centering of text inside of Space Object, false is default

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addUserIdToHiddenRedlineUsers(userId)

Add userId to list of redline and stickyNote users to be hidden (on load)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
userId string

the userId to be added to the hidden users list

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addUserIdToLockedRedlineUsers(userId)

Add userId to list of redline and stickyNote users to be locked (on load)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
userId string

the userId to be added to the hidden users list

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_AllGroupsOff()

Turn all Object Space groups off - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_AllGroupsOn()

Turn all Object Space groups on - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_ApplyPatternOnSpaceObjectId(layer, Id, graphicalPattern, colorHex, fillOpacity)

Apply a predefined pattern on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

Id string

Id of the graphical object to add hatches

graphicalPattern string

name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" "pattern_0degree_crosshatch_standard" "pattern_0degree_crosshatch_fine"

colorHex string

color of hatch in hex form, for example: #FF0000

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyPatternOnSpaceObjectNode(layer, nodeId, graphicalPattern, colorHex, fillOpacity)

Apply a predefined pattern on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

nodeId string

nodeId of the graphical object to add hatches

graphicalPattern string

name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" "pattern_0degree_crosshatch_standard" "pattern_0degree_crosshatch_fine"

colorHex string

color of hatch in hex form, for example: #FF0000

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyPatternOnUrl(layer, nodeId, graphicalPattern, colorHex, fillOpacity)

Apply a predefined pattern on a URL

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

nodeId string

nodeId of the graphical object to add hatches

graphicalPattern string

name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" "pattern_0degree_crosshatch_standard" "pattern_0degree_crosshatch_fine"

colorHex string

color of hatch in hex form, for example: #FF0000

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeLinearGradientStandard2ColorsOnSpaceObjectId(layer, Id, startColor, endColor, fillOpacity)

Apply a standard linear gradient with two colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

Id string

Id of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeLinearGradientStandard2ColorsOnSpaceObjectNode(layer, nodeId, startColor, endColor, fillOpacity)

Apply a standard linear gradient with two colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

nodeId string

nodeId of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeLinearGradientStandard3ColorsOnSpaceObjectId(layer, Id, startColor, middleColor, endColor, fillOpacity)

Apply a standard linear gradient with three colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

Id string

Id of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

middleColor string

middle color of gradient in hex form, for example: #AA00AA

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeLinearGradientStandard3ColorsOnSpaceObjectNode(layer, nodeId, startColor, middleColor, endColor, fillOpacity)

Apply a standard linear gradient with three colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

nodeId string

nodeId of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

middleColor string

middle color of gradient in hex form, for example: #AA00AA

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeRadialGradientStandard2ColorsOnSpaceObjectId(layer, Id, startColor, endColor, fillOpacity)

Apply a standard radial gradient with two colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

Id string

Id of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeRadialGradientStandard2ColorsOnSpaceObjectNode(layer, nodeId, startColor, endColor, fillOpacity)

Apply a standard radial gradient with two colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

nodeId string

nodeId of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeRadialGradientStandard3ColorsOnSpaceObjectId(layer, Id, startColor, middleColor, endColor, fillOpacity)

Apply a standard radial gradient with three colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

Id string

Id of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

middleColor string

middle color of gradient in hex form, for example: #AA00AA

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ApplyRelativeRadialGradientStandard3ColorsOnSpaceObjectNode(layer, nodeId, startColor, middleColor, endColor, fillOpacity)

Apply a standard radial gradient with three colors on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

layer to apply the pattern

nodeId string

nodeId of the graphical object

startColor string

start color of gradient in hex form, for example: #FF0000

middleColor string

middle color of gradient in hex form, for example: #AA00AA

endColor string

end color of gradient in hex form, for example: #00DD00

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearAllRedlineHiddenUsers()

Clear all redline and stickyNote userId from hidden users list

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_clearAllRedlineLockedUsers()

Clear all redline and stickyNote userId from locked users list

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_clearLayer(layer) → {string}

Clears the current layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to be cleared

See:
Returns:

layer - returns cleared layer

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearLayerDiv(layer, f_div) → {none}

Clears the current layer on a named floorplan div

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to be cleared

f_div string

name of floorplan div

See:
Returns:
Type
none
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearTextLayer(layer) → {none}

Clears the current layer and resets Text border objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to be cleared

See:
Returns:
Type
none
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_copyMeasurementField(f_div)

Copies the content of the measurement field to the clipboard

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_currentMaxNodeId() → {string}

Retrieves the current maximum Node Id for all Space Objects, retrieve and increment when creating new graphical objects

CADViewer Internal Command Groups: All.

Deprecated:
  • Yes
See:
Returns:

maxNode - the current maximum node id

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_currentMaxSpaceNodeId() → {string}

Retrieves the current maximum Node Id for all Space Objects on all current active floorplans, retrieve and increment when creating new graphical objects

CADViewer Internal Command Groups: All.

See:
Returns:

maxNode - the current maximum node id

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_currentMaxSpaceNodeId_FloorPlan(f_div) → {string}

Retrieves the current maximum Node Id for all Space Objects on designated floorplan, retrieve and increment when creating new graphical objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the current floorplan object

See:
Returns:

maxNode - the current maximum node id

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_disableSpaceObjectDrag(flag)

Set disable of dragging of SpaceObjects, this is useful if a custom modal intrudes on a small space object in IOT use-case

Parameters:
Name Type Description
flag boolean

disable status, false is default, true to disable

cvjs_displayCustomToolTip(id)

Set a custom tooltip overwriting the standard tooltip displaying either Name or Id

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id string

id of the custom tooltip object to be displayed

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displayPolygonControlsPoint(f_div, objectId, showhide, type)

Display status on a control points on a polygon object on either a redline or a space object

Parameters:
Name Type Description
f_div string

floorplan div

objectId string

Id of the Redline or SpaceObject, alternative RED_ or NODE_ if Node is used

showhide string

use "show" or "hide" , default is "hide"

type string

"Redline" or "SpaceObject"

cvjs_drawSpaceObject_Circle()

Draws interactively a circle. The data object of the circle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_CopyCircle()

Draws interactively a copy of a previously defined cicle object. The data object of the circle is defined as a SpaceObject. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_CustomRectangle()

Draws interactively a rectangle and add a custom wallpaper. The data object of the rectangle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_FilledRedlineRectangle()

Draws interactively a filled redline rectangle. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_Polygon()

Draws interactively a polygon. The data object of the polygon is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_Rectangle()

Draws interactively a rectangle. The data object of the rectangle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineArrowPolyline()

Draws interactively a redline polyline with arrow. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineCircle()

Draws interactively a Redline Ellipse . Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineCloud()

Draws interactively a cloud. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineEllipse()

Draws interactively a Redline Ellipse . Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineEllipseCloud()

Draws interactively a Redline Ellipse Cloud . Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineFilledPolygon()

Draws interactively a redline polygon. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlinePolyline()

Draws interactively a redline polyline. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineRectangle()

Draws interactively a redline rectangle. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_RedlineSingleline()

Draws interactively a single redline line. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawStickyNoteDirect()

Draws interactively a stickynote. The data object of the sticky note is defined as a StickyNote. Prior to calling this method, cvjs_setCurrentStickyNoteValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_dynamicResizeTextOnSpaceObject(nodeUnderbar)

Dynamic resize and change location of text objects drawn on Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
nodeUnderbar string

the data node containing the Space Object to which the text is associated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_dynamicResizeTextOnSpaceObject_Id(id)

Dynamic resize and change location of text objects drawn on Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id string

the id of the data node containing the Space Object to which the text is associated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_dynamicResizeTextOnSpaceObject_Name(name)

Dynamic resize and change location of text objects drawn on Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
name string

the name of the data node containing the Space Object to which the text is associated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_enablePolygonControlPoints(flag)

Enable polygon control points

Parameters:
Name Type Description
flag *

true or false

cvjs_flipRedlineSpaceObject(f_div, id, orientation, type)

Flips a Redline or Space object

Parameters:
Name Type Description
f_div string

floorplan div

id string

Id of the Redline or SpaceObject, alternative RED_ or NODE_ if Node is used

orientation string

"horizontal" or "vertical"

type string

"Redline" or "SpaceObject"

cvjs_getAllRedlines_TextList() → {String}

Generate list with all redline text and their corresponding userId

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Id, redline text list; (userid,redlinetext);(userid,redlinetext)

Type
String
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getAllRedlines_UserIdList() → {String}

Generate list with all redlines users

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Id list, separated by ;

Type
String
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getAttributeFromSpaceObjectNode(NodeId, name) → {object}

Retrieves an attribute value from a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
NodeId string

Node id of the Space Object in which to retrive an attribute

name string

name of attribute (name, value) pair

See:
Returns:

value - Returns the value pair corresponding to the given name

Type
object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getAttributeStatus(NodeId) → {object}

Retrieves the attribute status from a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
NodeId string

Node id of the Space Object in which to retrive the status

See:
Returns:

value - Returns the attributeStatus

Type
object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getRedlineHiddenUsersList() → {String}

Lists all redline and stickyNote userId from hidden users list

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Id list

Type
String
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getRedlineLockedUsersList() → {String}

Lists all redline and stickyNote userId from locked users list

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Id list

Type
String
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getRedlineStyles(redid) → {*}

Returns the style object of a redline

Parameters:
Name Type Description
redid *

redlineID

Returns:

styleobject json object with Styles

Type
*

cvjs_getRedlineText(redid) → {string}

Parameters:
Name Type Description
redid string
Returns:

mystring

Type
string

cvjs_getSpaceObjectIdfromName(Name) → {object}

Returns the first Id in the Space Object structure based on an Name

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Name string

Name of the Space Object in which to retrive the id

Returns:

value - Returns the NodeId corresponding to the given Id, -1 if not found

Type
object

cvjs_getSpaceObjectIdfromNode(Id) → {object}

Returns the first Id in the Space Object structure based on a nodeId

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Id string

Node id of the Space Object in which to retrive the id data filed

See:
Returns:

value - Returns the id corresponding to the given nodeId, -1 if not found

Type
object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectIdList() → {array}

Returns a list with all Ids in the Space Object structure

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Id list

Type
array
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectIndexfromNode(Name) → {object}

Returns the index corresponding to a Node in the Space Object structure based

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Name string

Name of the Space Object in which to retrive the Node id

See:
Returns:

value - Returns the NodeId corresponding to the given Id, -1 if not found

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

Type
object

cvjs_getSpaceObjectNamefromId(Id) → {object}

Returns the first Name in the Space Object structure based on an Id

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Id string

Id of the Space Object in which to retrive the name

Returns:

value - Returns the Name corresponding to the given Id, -1 if not found

Type
object

cvjs_getSpaceObjectNamefromNode(NodeId) → {object}

Returns the first Name in the Space Object structure based on a nodeId

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
NodeId string

Node id of the Space Object in which to retrive the Name data filed

See:
Returns:

value - Returns the Name corresponding to the given nodeId, -1 if not found

Type
object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectNamesList() → {array}

Returns a list with all Names in the Space Object structure

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Names list

Type
array
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectNodefromId(Id) → {object}

Returns the first NodeId in the Space Object structure based on an Id

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Id string

Id of the Space Object in which to retrive the Node id

See:
Returns:

value - Returns the NodeId corresponding to the given Id, -1 if not found

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

Type
object

cvjs_getSpaceObjectNodefromName(Name) → {object}

Returns the first NodeId in the Space Object structure based on an Name

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Name string

Name of the Space Object in which to retrive the Node id

See:
Returns:

value - Returns the NodeId corresponding to the given Id, -1 if not found

Type
object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectNodeList() → {array}

Returns a list with all NODES in the Space Object structure

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Id list

Type
array
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectTypefromId(Id) → {string}

Returns the Type of a given Space Object ID

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Id string

Id of the Space Object in which to retrive the corresponding Type

See:
Returns:

value - Returns the Type corresponding to the given Id, -1 if not found

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_GetURLParameter(sParam) → {string}

Retrieves a given parameter from the windows.location interface

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
sParam string

name of parameter to retrieve

See:
Returns:

the parameter if found, otherwise ""

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_GroupOff(layer)

Turn single Object Space group off - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of group to turn off

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_GroupOn(layer)

Turn single Object Space group on - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of group to turn on

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_GroupOn_AllOff(layer)

Turn single Object Space group on, all other groups are turned off - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of group to turn on

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_GroupOn_OthersOff(layer)

Turn single Object Space group on, all other groups are turned off - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of group to turn on

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_groupRedlineSpaceObjects(f_div, basegroup, group_array)

Groups an array of elements into a base group, the base group and elements can be Redlines of Space Objects

Parameters:
Name Type Description
f_div string

the floorplan div

basegroup string

basegroup, use ID of the Redline or SpaceObject, alternative RED_ or NODE_ if Node is used

group_array array

array of element IDs, use ID of the Redline or SpaceObject, alternative RED_ or NODE_ if Node is used

cvjs_hideAllRedlines_ExceptCurrentUser()

Hide all redlines except current userId

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_hideAllRedlines_ExceptUser(userId)

Hide all redlines except named userId

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
userId string

the userId to be displayed, all other hidden

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_hideAllRedlines_HiddenUsersList()

Hide all redlines with userId on the Hidden Users List

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_hideToolTip()

Hides the standard tooltip previously shown with cvjs_showToolTipLocation(tiptext, x, y)

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_isTouchDevice()

Detects if touch device or mouse driven device

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_lockAllRedlines_ExceptCurrentUser()

Lock all redlines except current userId

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_lockAllRedlines_ExceptUser(userId)

Lock all redlines except named userId

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
userId string

the userId to be editable, all other locked

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_lockAllRedlines_LockedUsersList()

Lock all redlines with userId on the Lock Users List

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_newLayer(layer) → {object}

Creates a new layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to be created

See:
Returns:

layerObject - Returns a new layer as a group on the SVG canvas

Type
object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_newLayerDiv(layer, f_div) → {object}

Creates a new layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer string

name of layer to be created

f_div string

name of floorplan div

See:
Returns:

layerObject - Returns a new layer as a group on the SVG canvas

Type
object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_openHyperlinkInNewWindow(openLinkFlag, windowWidth, windowHeight)

Controls hyperlinks, so if click on a hyperlink shall open the link in the same instance or open the link in a new window. Default is false.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
openLinkFlag boolean

true if to open links in new window, false otherwise

windowWidth int

width of new popup window, set an arbitary value if openLinkFlag is false

windowHeight int

height of new popup window, set an arbitary value if openLinkFlag is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_polygonControlsPointsStyle(controlPointsStyleObject)

JSON object containing styling of individial control points in REDLINE

Parameters:
Name Type Description
controlPointsStyleObject object

cvjs_PrintToPDFWindowRelativeSize(factor)

Sets the size of the pop-up browser page with the resulting Print To PDF file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
factor float

pop-up window relative screen size, a value between 0 and 1, default is 0.4

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_removeHandleFunc_RedlineGeneric()

Remove REDLINE HANDLES IS NOW GENERIC 9.90.1 9.90.2

cvjs_replaceRedlineText(redid, mystring)

Replace a redline text object

Parameters:
Name Type Description
redid *

ID of the redline

mystring *

Replacement string

cvjs_resetTextOnSpaceObject(nodeUnderbar)

Reset the location and size of text objects drawn on Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
nodeUnderbar string

the data node containing the Space Object to which the text is associated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resetTextOnSpaceObject_Id(name-)

Reset the location and size of text objects drawn on Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
name- string

id of the data node containing the Space Object to which the text is associated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resetTextOnSpaceObject_Name(name-)

Reset the location and size of text objects drawn on Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
name- string

name of the data node containing the Space Object to which the text is associated, the first occurance of the name is selected

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_searchReplaceText(searchString, replaceString)

Text Search; finds a text string in the drawing, and zooms over the search result

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
searchString string

the text string to search after

replaceString string

the text string to replace with

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setAttributeInSpaceObjectNode(NodeId, name, value)

Sets an attribute value in a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
NodeId string

Node id of the Space Object in which to retrive an attribute

name string

name of attribute (name, value) pair

value string

name of attribute (name, value) pair to be set

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setAttributeStatus(NodeId, attributeStatus)

Retrieves the attribute status from a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
NodeId string

Node id of the Space Object in which to retrive the status

attributeStatus string

attributeStatus of the node, "populated" or "unpopulated"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCallbackForModalDisplay(callbackForkModalDisplay, customModalPopUpBody, populateMyCustomModalPopUpBody)

Space Object modals control for external retrieval of modal data.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
callbackForkModalDisplay boolean

false: standard modal on Space Object click as defined through setup method: InitCADViewerJS_ , true: if attributesStatus in the data-field of object is "unpopulated" a call is made to external method cvjs_callbackForModalDisplay(), if attributeStatus is "populated", modal is displayed.

customModalPopUpBody function

: method that defines the body of the popup model

populateMyCustomModalPopUpBody function

: method that populates the body of the popup model, this method is called when a space is selected so the display of modal content will match the modal selected

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCallbackMeasurement(callbackMode)

Sets measurements to be echoed through method cvjs_measurementCallback(cvjs_currentMeasurementLength, cvjs_units[cvjs_active_floorplan_div_nr]);

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
callbackMode boolean

false is default, true if measurement shall be echoed through method

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCallbackMethod(callbackMethodName, callbackMethod)

Set Custom implementation of Callback Methods: Methods implemented: cvjs_OnLoadEnd() cvjs_graphicalObjectOnChange(type, graphicalObject, spaceID, evt)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
callbackMethodName String

false: standard modal on Space Object click as defined through setup method: InitCADViewerJS_ , true: if attributesStatus in the data-field of object is "unpopulated" a call is made to external method cvjs_callbackForModalDisplay(), if attributeStatus is "populated", modal is displayed.

callbackMethod function

: method that defines the body of the Callback method

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setComputeSpaceObjectParentStatus(flag)

Set if Parent Status shall be computed at Space Object creation or insertion. For very large amount of space object (above 1000) computation time goes up if determine parent status

Parameters:
Name Type Description
flag bool

: flag for compute status, default is true

cvjs_setCreationMode(cvjs_supressPopUp, cvjs_creationMode, excludeID)

Sets the display mode of Space Object modals

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
cvjs_supressPopUp boolean

false: PopUp Modal on Space Object click as defined through setup method: InitCADViewer_ , true: modal is supressed, tooltip is ID of object, color setting is defined through the "linked" database field of the object.

cvjs_creationMode boolean

false: Activates creation mode colors in Space Object Creation

excludeID String

: "", ID of a space that shall not be restored after creation mode.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentLanguage(language, f_div)

Updates all modeals and callouts based on currentLanguage

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
language int

language as a index from the XML language settings file

f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentRedlineValues_Color(currentRedline_color)

Sets the current Redlines Color value

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentRedline_color string

color of the Redline as a hex values, for example "#FF0000".

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentRedlineValues_ColorStokeWidth(currentRedline_color, currentRedline_StrokeWidth)

Sets the current Redlines values, color, strokewidth only, these settings will be used to intialize redlines subsequently drawn with the draw methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentRedline_color string

color of the Redline as a hex values, for example "#FF0000".

currentRedline_StrokeWidth float

width of the Redline

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentRedlineValues_FillColor(redlineFillColor)

Set the redline fill color in HEX with #

Parameters:
Name Type Description
redlineFillColor String

, the redline fill color

cvjs_setCurrentRedlineValues_FillOpacity(redlineFillOpacity)

Set the redline fill opacity

Parameters:
Name Type Description
redlineFillOpacity float

, a value between 0 and 1 defaut is 0.1

cvjs_setCurrentRedlineValues_NameUserid(currentRedline_username, currentRedline_userid)

Sets the current Redlines name and userid values, these settings will be used to intialize redlines subsequently drawn with the draw methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentRedline_username string

redline username

currentRedline_userid string

redline userid

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentRedlineValues_StrokeWidth(currentRedline_StrokeWidth)

Sets the current Redlines Stroke widthvalue

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentRedline_StrokeWidth float

width of the Redline

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentRedlineValues_Userid(currentRedline_userid)

Sets the current Redlines values, these settings will be used to intialize redlines subsequently drawn with the draw methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentRedline_userid string

redline userid

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentSpaceObjectNodeValues(jsonObject)

Sets the current Space Object Node values based on a JSON object created with cvjsspace_createNewJSonSpaceObject() these settings will be used to intialize space objects subsequently drawn with the draw methods var jsoncvjs_setQTipStructure = { "path": path, "tags": tags, "node": node, "area": area, "outerhtml": outerHTML, "occupancy": occupancy, "name": name, "type": type, "id": id, "defaultcolor": defaultcolor, "highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer, "group": group, "linked": linked, "attributes": attributes, "attributeStatus": attributeStatus, "displaySpaceObject": displaySpaceObject, "translate_x": translate_x, "translate_y": translate_y, "zvalue": "1", "scale_x": scale_x , "scale_y": scale_y , "rotate": rotate, "transform": transform, "svgx": svgx, "svgy": svgx, "dwgx": dwgx, "dwgy": dwgy , "customContent" : mycustomcontent, "pageNumber" : "", "pageName" : "", "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "" "clickhandler" : "enable", "href" : "none", "parent": "none" }

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
jsonObject Object

Space Object with containing relevant values for drawing

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentStickyNoteValues(node, name, id, layer, group, text, userid, date, linked)

Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
node string

the NodeId linking data with graphical objects, of the form "NOTE_xxx", where xxx is a number

name string

name of the Sticky Note - user name displayed at StickyNote modal

id string

id of the Sticky Note object, used for pop-up highlight

layer string

layer of the Sticky Note

group string

group of the Sticky Note

text string

text in the Sticky Note textfield, typically this is initially empty as users interactively add text to StickyNotes.

userid string

UserID of StickyNotes.

date string

creation date of the StickyNotes.

linked boolean

boolean variable to tell if object is linked or not, internally controlled

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentStickyNoteValues_NameUserId(currentStickyNote_name, currentStickyNote_userid)

Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentStickyNote_name string

name of the Sticky Note - user name displayed at StickyNote modal

currentStickyNote_userid string

UserID of StickyNotes.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentStickyNoteValues_NameUserIdDate(currentStickyNote_name, currentStickyNote_userid, currentStickyNote_date)

Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentStickyNote_name string

name of the Sticky Note - user name displayed at StickyNote modal

currentStickyNote_userid string

UserID of StickyNotes.

currentStickyNote_date string

creation date of the StickyNotes.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomModalsContent(hbody, dual_hbody_flag, hbody2)

Sets Space Object modals to custom type

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
hbody String

String containing the body of the popUpModal

dual_hbody_flag boolean

false: flag for dual body popup

hbody2 String

second hbody, when no active space object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomToolTip(customtooltip)

Set a custom tooltip overwriting the standard tooltip displaying either Name or Id

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
customtooltip boolean

true for custom tooltip, false otherwise

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomToolTipValue(id, contentArr)

Set the content of a custom tooltip, based on the id of the object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id string

id for tooltip

contentArr arr

content for custom tooltip, array with lines of text

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setDefaulSpaceObjectColor(colorObject)

Set the default Space Object Color and LineTypes

Parameters:
Name Type Description
colorObject Object

JSON object with the space object color and line styples

cvjs_setFileModalEditMode(mode)

Controls if the File Modal shall allow edit mode

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

suppress edit mode in file modal.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setforeignObjectInRedlineText(flag)

set foreignObject as redline text objects

Parameters:
Name Type Description
flag boolean

true for foreign object, false for base text object

cvjs_setforeignObjectSizeInRedlineText(redid, width, height)

set foreignObject text box size in a redline text object

Parameters:
Name Type Description
redid *

redline text ID

width *

width of foreign object text box

height *

height of foreign object text box

cvjs_setNoModalMode(cvjs_modalMode)

Sets the display mode of Space Object modals

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
cvjs_modalMode boolean

false: standard modal on Space Object click as defined through setup method: InitCADViewerJS_ , true: modal is supressed, standard colors on highlight

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintMargins(nonprint_h, nonprint_w, standard_h, standard_w, tiny_h, tiny_w, none_h, none_w)

Set the print margins, for user margin selection in the print modal

Parameters:
Name Type Description
nonprint_h *

non print margin region vertical, default 10mm

nonprint_w *

non print margin region horizontal, default 10mm

standard_h *

non print margin region horizontal, default 18mm

standard_w *

non print margin region vertical, default 8mm

tiny_h *

non print margin region horizontal, default 6mm

tiny_w *

non print margin region vertical, default 6mm

none_h *

no margins 0mm

none_w *

no margins 0mm

cvjs_setPrintModalCustomCheckBox(mode, print_modal_custom_checkbox)

Extents the Print Modal with a custom controlled checkbox

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Add checkbox to interface, default is false

print_modal_custom_checkbox string

name of the custom method branch

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModalCustomCheckBoxFromFile(mode, print_modal_custom_checkbox)

Extents the Print Modal with a custom controlled checkbox

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Add checkbox to interface, default is false

print_modal_custom_checkbox string

filename containing variable definition location is ServerLocation + "/app/cv"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModalCustomDualTextBox(mode, custom_textbox_variables_list_filename)

Extents the Print Modal with a custom controlled textbox

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Adds a dual checkbox to interface, default is false

custom_textbox_variables_list_filename string

filename containing variable definition location is ServerLocation + "/app/cv". Content is comma separated list with names of the variable in the document to which the Text will be inserted, of type $$$title$$$

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModalCustomDualTextBoxFromFile(mode, custom_textbox_variables_list_filename)

Extents the Print Modal with a custom controlled textbox

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Adds a dual checkbox to interface, default is false

custom_textbox_variables_list_filename string

filename containing variable definition location is ServerLocation + "/app/cv". Content is comma separated list with names of the variable in the document to which the Text will be inserted, of type $$$title$$$

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModalCustomTextBox(mode, print_modal_custom_textbox_variables_list)

Extents the Print Modal with a custom controlled textbox

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Add checkbox to interface, default is false

print_modal_custom_textbox_variables_list string

comma separated list with names of the variable in the document to which the Text will be inserted, of type $$$title$$$

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintModalCustomTextBoxFromFile(mode, custom_textbox_variables_list_filename)

Extents the Print Modal with a custom controlled textbox

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

Add checkbox to interface, default is false

custom_textbox_variables_list_filename string

filename containing variable definition location is ServerLocation + "/app/cv". Content is comma separated list with names of the variable in the document to which the Text will be inserted, of type $$$title$$$

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPrintPaperSizeasSVGObject(mode)

Controls if the Print object in standard print shall be SVG based or based on HTML5 bitmap object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

default is true = SVG based print object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectCustomContent(spaceID, customContent)

Returns the first Id in the Space Object structure based on an Name in the active floorplan

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
spaceID string

ID of the Space Object

customContent object

JSON object with the custom content

cvjs_Settings(f_div)

Set Language and Conversion settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_showToolTipLocation(tiptext, x, y)

Show the standard tooltip in a given location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
tiptext string

text of the tooltip to be displayed

x int

x coordinate location of the tooltip object to be displayed

y int

y coordinate location of the tooltip object to be displayed

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_sortLayers_insertAfter(layer1, layer2) → {boolean}

Sort two layers in order, insert layer2 after layer1

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer1 string

name of layer one

layer2 string

name of layer two

See:
Returns:
  • true if sorted, false otherwise
Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_sortLayers_prepend(layer1, layer2) → {boolean}

Sort two layers in order, prepend layer2

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer1 string

name of layer one

layer2 string

name of layer two

See:
Returns:
  • true if sorted, false otherwise
Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_sortLayersInOrder(layer1, layer2) → {boolean}

Sort two layers in order

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
layer1 string

name of layer one

layer2 string

name of layer two

See:
Returns:
  • true if sorted, false otherwise
Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_styleRedline(redid, styleobject)

Style a redline with a given color object

Parameters:
Name Type Description
redid *

redline ID

styleobject *

json object with styles

cvjs_superimposeBackgroundDrawing_PrintOutputAtDualTextbox(f_div, backgroundDrawing, top, bottom, left, right)

Superimpose a border frame or background drawing when printing and a custom print dual text box modal is checked.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

backgroundDrawing string

location of background drawing, http.

top float

size of background frame border at top for adjustment of zoomed object, value between 0 and 1

bottom float

size of background frame border at bottom for adjustment of zoomed object, value between 0 and 1

left float

size of background frame border at left side for adjustment of zoomed object, value between 0 and 1

right float

size of background frame border at right side for adjustment of zoomed object, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_superimposeBackgroundDrawing_PrintOutputAtZoom(f_div, backgroundDrawing, top, bottom, left, right)

Superimpose a border frame or background drawing when printing a zoomed in portion of the drawing

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
f_div string

name of floorplan div

backgroundDrawing string

location of background drawing, http.

top float

size of background frame border at top for adjustment of zoomed object, value between 0 and 1

bottom float

size of background frame border at bottom for adjustment of zoomed object, value between 0 and 1

left float

size of background frame border at left side for adjustment of zoomed object, value between 0 and 1

right float

size of background frame border at right side for adjustment of zoomed object, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_undoDeleteLastRedline(f_div)

Undo delete of the last drawn Redline

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ungroupRedlineSpaceObjects(f_div, basegroup, group_array)

Ungroups an array of elements into a base group, the base group and elements can be Redlines of Space Objects

Parameters:
Name Type Description
f_div string

the floorplan div

basegroup string

basegroup, use ID of the Redline or SpaceObject, alternative RED_ or NODE_ if Node is used

group_array array

array of element IDs, use ID of the Redline or SpaceObject, alternative RED_ or NODE_ if Node is used

cvjs_addCircleSpaceObject(f_div)

Add a Space Object Circle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addDragRectangleImageSpaceObject(f_div)

Add a Drag Size Size Image Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addFixedSizeCustomSpaceObject(f_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer)

Add a Fixed Size Space Object Custom Rectangle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

svgImagePath string

name of path containing wallpaper object

spaceObjectId string

Unique ID of the space object. NOTE!

spaceObjectName string

Name of the space object.

spaceObjectType string

Type of the object

layer string

the associated layer of the object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addFixedSizeCustomSpaceObjectXY(f_div, image, jsonObject, c_flag, txt, scale, styles, tscale, col, left)

Add a Fixed Size Space Object Custom Rectangle at coordinates x, y JSON object created with cvjs_createNewJSonSpaceObject() these settings will be used to intialize space objects subsequently drawn with the draw methods var jsonStructure = { "path": path, "tags": tags, "node": node, "area": area, "outerhtml": outerHTML, "occupancy": occupancy, "name": name, "type": type, "id": id, "defaultcolor": defaultcolor, "highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer, "group": group, "linked": linked, "attributes": attributes, "attributeStatus": attributeStatus, "displaySpaceObject": displaySpaceObject, "translate_x": translate_x, "translate_y": translate_y, "zvalue": "1", "scale_x": scale_x , "scale_y": scale_y , "rotate": rotate, "transform": transform, "svgx": svgx, "svgy": svgx, "dwgx": dwgx, "dwgy": dwgy , "customContent" : mycustomcontent, "pageNumber" : "", "pageName" : "", "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "" "clickhandler" : "enable", "href" : "none", "parent": "none" } CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

image string

name of path containing wallpaper object

jsonObject object

see jsonObject above with 5 fields defined, name, type, layer, id, translate_x, and translate_y

c_flag int

0 is SVG coordinates, 1 is DWG coordinates, 0 is default

txt Object

array with lines of text content in Space Object

scale float

scale factor at insertion, 1.0 is default

styles Object

object containing col and style of each line of text in the Space Object

tscale Array

array containing relative size af each line of text in the Space Object

col Array

array containing color of each line of text in the Space Object

left float

left adjustment factor of text in the Space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addFixedSizeImageSpaceObject(f_div)

Add a Fixed Size Image Space Object with

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addFixedSizeImageSpaceObject_GlobalXY(f_div, xcor, ycor)

Add a Fixed Size Image Space Object in Global (DWG) Coordinates

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

xcor int

x coordinate in Global (DWG) coordinates

ycor int

y coordinate in Global (SVG) coordinates

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addFixedSizeImageSpaceObjectXY(f_div, xcor, ycor)

Add a Fixed Size Image Space Object in screen coordinates

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

xcor int

x coordinate in screen coordinates

ycor int

y coordinate in screen coordinates

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addPinMarker(f_div, spaceObjectId, spaceObjectName, spaceObjectType, layer)

Add a Pin Marker Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

spaceObjectId string

Unique ID of the space object. NOTE!

spaceObjectName string

Name of the space object.

spaceObjectType string

Type of the object

layer string

the associated layer of the object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addPolygonSpaceObject(f_div)

Add a Space Object Polygon

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addRectangleSpaceObject(f_div)

Add a Space Object Rectangle - user modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addSpaceObjectDirect(f_div, path, jsonObject, c_flag, txt, sf, col, txtst, scl, tcol, left)

Add a Fixed Size Space Object Custom Rectangle at coordinates x, y JSON object created with cvjs_createNewJSonSpaceObject() these settings will be used to intialize space objects subsequently drawn with the draw methods var jsonStructure = { "path": path, "tags": tags, "node": node, "area": area, "outerhtml": outerHTML, "occupancy": occupancy, "name": name, "type": type, "id": id, "defaultcolor": defaultcolor, "highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer, "displayStatus" : displayStatus,
"group": group, "linked": linked, "attributes": attributes, "attributeStatus": attributeStatus, "displaySpaceObject": displaySpaceObject, "translate_x": translate_x, "translate_y": translate_y, "zvalue": "1", "scale_x": scale_x , "scale_y": scale_y , "rotate": rotate, "transform": transform, "svgx": svgx, "svgy": svgx, "dwgx": dwgx, "dwgy": dwgy , "customContent" : mycustomcontent, "pageNumber" : "", "pageName" : "", "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "" "clickhandler" : "enable", "href" : "none", "parent": "none" } Add a Fixed Size Space Object Custom Rectangle at coordinates x, y

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

path string

name of path containing wallpaper object

jsonObject object

see jsonObject above with 5 fields defined, name, type, id, translate_x, and translate_y

c_flag int

0 is SVG coordinates, 1 is DWG coordinates, 0 is default

txt Object

array with lines of text content in Space Object

sf float

sf factor at insertion, 1.0 is default

col Object

object containing col and style of default setting of Space Object, "none" provides standard default color

txtst Object

object containing col and style of each line of text in the Space Object

scl Array

array containing relative size af each line of text in the Space Object

tcol Array

array containing color of each line of text in the Space Object

left float

left adjustment factor of text in the Space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addSpaceObjectDirectXY(f_div, path, jsonObject, c_flag, txt, sf, col, txtst, scl, tcol, left)

Add a Fixed Size Space Object Custom Rectangle at coordinates x, y JSON object created with cvjs_createNewJSonSpaceObject() these settings will be used to intialize space objects subsequently drawn with the draw methods var jsonStructure = { "path": path, "tags": tags, "node": node, "area": area, "outerhtml": outerHTML, "occupancy": occupancy, "name": name, "type": type, "id": id, "defaultcolor": defaultcolor, "highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer, "displayStatus" : displayStatus,
"group": group, "linked": linked, "attributes": attributes, "attributeStatus": attributeStatus, "displaySpaceObject": displaySpaceObject, "translate_x": translate_x, "translate_y": translate_y, "zvalue": "1", "scale_x": scale_x , "scale_y": scale_y , "rotate": rotate, "transform": transform, "svgx": svgx, "svgy": svgx, "dwgx": dwgx, "dwgy": dwgy , "customContent" : mycustomcontent, "pageNumber" : "", "pageName" : "", "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "" "clickhandler" : "enable", "href" : "none", "parent": "none" } Add a Fixed Size Space Object Custom Rectangle at coordinates x, y

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

path string

name of path containing wallpaper object

jsonObject object

see jsonObject above with 5 fields defined, name, type, id, translate_x, and translate_y

c_flag int

0 is SVG coordinates, 1 is DWG coordinates, 0 is default

txt Object

array with lines of text content in Space Object

sf float

sf factor at insertion, 1.0 is default

col Object

object containing col and style of default setting of Space Object, "none" provides standard default color

txtst Object

object containing col and style of each line of text in the Space Object

scl Array

array containing relative size af each line of text in the Space Object

tcol Array

array containing color of each line of text in the Space Object

left float

left adjustment factor of text in the Space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addSpaceObjectPolygon(f_div, ID, type, name, layer)

Add an interactive polygon Space Object with given ID and type

Parameters:
Name Type Description
f_div *

floorplan div

ID *

ID of the space object

type *

type of the space object

name *

type of the space object

layer *

layer on which the space object is placed

cvjs_addSpaceObjectRectangle(f_div, ID, type, name, layer)

Add an interactive rectangle Space Object with given ID and type

Parameters:
Name Type Description
f_div *

floorplan div

ID *

ID of the space object

type *

type of the space object

name *

type of the space object

layer *

layer on which the space object is placed

cvjs_ajaxPostCallbackVariable_thumbNails(callbackStatus)

Set the ajax control callback variable

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
callbackStatus boolean

set to false then monitor then true

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_buildFolderTree(FileLocation, DocumentLocation, f_div)

Build a tree structure in which to be able to load CADViewer dynamically

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
FileLocation string

location of file tree folder

DocumentLocation string

location of current document

f_div string

name of the Element in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceObjectDisplayMode(f_div, displayModal)

Sets the mode of Space Object to either display or create

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

displayModal boolean

flag to display SpaceObjectEditModal, if undefined modal is true

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeText_On_BlockHandle(handle, textArr)

Changes visible text attribute objects on a block, referenced through its block handle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handle string

AutoCAD block handle referecen

textArr Array.<string>

Array with the text objects to be replaced. The lenght of the array determines how many objects are replaced

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeText_On_BlockHandleDiv(handle, textArr, f_div) → {boolean}

Changes visible text attribute objects on a block, referenced through its block handle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handle string

AutoCAD block handle reference

textArr Array.<string>

Array with the text objects to be replaced. The lenght of the array determines how many objects are replaced

f_div string

name of div containing CADViewer canvas

See:
Returns:

false if handle not found otherwise true

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_checkBlockHandleDiv(handle, f_div) → {boolean}

Checks if a block handle is present on the floorplan

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
handle string

AutoCAD block handle reference

f_div string

name of div containing CADViewer canvas

See:
Returns:

false if handle not found otherwise true

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_checkRoomHandleDiv(rmid, f_div) → {boolean}

Checks if a RoomID is present on a given floorplan

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

f_div string

name of the div on which the CADViewer instance is placed

See:
Returns:

false if rmid not found otherwise true

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clear_collab_redline(f_div)

Clear the redlines in collaboration session

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

Clears all image links from the canvas

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearQuickCounts(f_div)

Clear the quick counts counter

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearSpaceObjects(f_div)

Deletes all Space Objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_colorAllLayersInDrawing(floorplan-div, hexColor)

Toggle the color settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
floorplan-div string

the ID of the Element in which CADViewer is running

hexColor string

color of all layers

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_colorSingleLayer(f_div,, hexColor, layername,)

Change color on a single layer

Parameters:
Name Type Description
f_div, string

div - the ID of the Element in which CADViewer is running

hexColor string

, color of layer in HEX, with or without #

layername, string

name of layer

Add color to an xlink SVG hyperlinks to have it behave like a dynamic highlight

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
hyperlinkId string

the element of the xlink hyperlink

hyperFill string

the new fill color, of type #00FF00

hyperOpacity float

the opacity of the fill, a value between 0.0 and 1.0.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_CompareDrawings(f_div, drawing1, drawing2)

Compare two drawings directly

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

drawing1 string

full path of drawing1

drawing2 string

full path of drawing 2

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_CompareDrawings_DisplayNameAlias(f_div, drawing1, drawing2, displayname1, displayname2)

Compare two drawings directly

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

drawing1 string

full path of drawing1

drawing2 string

full path of drawing 2

displayname1 string

display name of drawing 1

displayname2 string

display name of drawing 2

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_compareDrawings_LoadSecondDrawing(f_div)

Loads the second drawing for compare with drawing currently loaded

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_compareDrawings_ToggleDrawingOverlay(f_div)

Toggles the overlaid drawings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_compareDrawings_ToggleDrawings(f_div)

Toggles the drawings individually

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_CompareFiles_setFileModalContent(custom_modal_dir_listing, floorPlan_div)

Sets the direct content of the file load modal instead of scanning through a designated folder

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
custom_modal_dir_listing object

a structure containing filename, url, and path

floorPlan_div String

name of the div that contains the floorplan

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_computeDynamicRedlineNamePath() → {string}

Compute a dynamic redline path, unique to each redline, matching its name and path

CADViewer Internal Command Groups: All.

See:
Returns:
  • the pathname
Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_connectTextInstances(searchString1, textInstance1, searchString1, textInstance1, lengthfactor1, lengthfactor2)

Connect Text Strings; connects two text strings with a line and arrow

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
searchString1 string

the first text string to search after

textInstance1 int

if multiple entries of text object, load instance, the first instance is 1

searchString1 string

the second text string to search after

textInstance1 int

if multiple entries of text object, load instance, the first instance is 1

lengthfactor1 int

% value, tells how many percentages line should be shorted at first text

lengthfactor2 int

% value, tells how many percentages line should be shorted at end text

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_conversion_cleanFilesDirectory()

Clean the server side temporary folder for files. This command is useful when using cvjs_conversion_setContentResponse("file"); where the server conversion provides a full set of files that is not removed when read by CADViewer

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_copyCircleSpaceObject(f_div)

Copy a Space Object Circle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_createNewJSonSpaceObject() → {Object}

Return a new JSON structure with default content: var jsonStructure = { "path": path, "tags": tags, "node": node, "area": area, "outerhtml": outerHTML, "occupancy": occupancy, "name": name, "type": type, "id": id, "defaultcolor": defaultcolor, "highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer, "group": group, "linked": linked, "attributes": attributes, "attributeStatus": attributeStatus, "displaySpaceObject": displaySpaceObject, "translate_x": translate_x, "translate_y": translate_y, "zvalue": "1", "scale_x": scale_x , "scale_y": scale_y , "rotate": rotate, "transform": transform, "svgx": svgx, "svgy": svgx, "dwgx": dwgx, "dwgy": dwgy , "customContent" : mycustomcontent, "pageNumber" : "", "pageName" : "", "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "" "clickhandler" : "enable", "href" : "none", "parent": "none" }

CADViewer Internal Command Groups: All.

See:
Returns:

jsonSpaceObject - Object with the entire space objects content

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_deleteSpaceImageObject(f_div)

Delete a Space Image Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_deleteSpaceObject(f_div)

Delete a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_displaySpaceObjectsStructure(f_div)

Display of Space Object structure in User Mode, with enabled seach panel

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_downloadObjectAsFile(filename, object, binaryflag)

Download a stringObject

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
filename string

name of object

object string

the object object to be saved

binaryflag boolean

true to save as binary, false is text and default

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_dragBackgroundToBack_SVG(f_div)

Sends the dragging background to back - default

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_dragBackgroundToFront_SVG(f_div)

Brings the dragging background to front - used for drawings with static filled polygons

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawSpaceObject_FixedSize()

Draws a fixed size space and add a custom wallpaper. The data object of the rectangle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawSpaceObject_PinMarker()

Interactively draws a custom wallpaper. The data object of the rectangle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_emailScreenAsPDFwithRedlines(f_div, custom_content)

Saves a floorplan with overlays as SVG file, then embed it into a pdf and send it as email

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_emailSettings_PDF_publish(from_name, from_mail, cc_mail, replyto)

Settings for email sender in the PDF publish method. When calling this method, email will be activated

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
from_name string

name of the from sender in redline PDF email

from_mail string

email address of the from sender in redline PDF email

cc_mail string

email of the cc address when sending redline PDF email

replyto string

mail of the reply to sender in redline PDF email

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_exitCompareDrawings(f_div)

Exit compare drawing and returns to base drawing

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_exitQuickCount(f_div)

Exit quick count, alternative method to double click or Esc

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_extractSVGfromCanvas(f_div) → {string}

Extracts the current SVG on canvas, including any added objects.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Returns:

a string containg the svg object on canvas,

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getCurrentMeasurementUnit() → {string}

Returns the setting of Measurement Units on the current drawing/page from the active f_div

CADViewer Internal Command Groups: All.

See:
Returns:

units - Measurement Unit (mmn, cm, m, feet, inch)

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getStickyNoteInfo() → {string}

Get the content of all StickyNotes

CADViewer Internal Command Groups: All.

See:
Returns:

stickyNoteContent - xml wrapped content: userid, id, name, date, text, page

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getStickyNotesRedlineDXF() → {string}

Returns the current redlines and sticky notes as a string object in DXF so the user can do their own server side save bypassing php or servlet code

CADViewer Internal Command Groups: All.

See:
Returns:

RedlineNote - a string containg the redline, sticky note object

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getStickyNotesRedlineJS() → {string}

Returns the current redlines and sticky notes as a string object in JS so the user can do their own server side save bypassing php or servlet code

CADViewer Internal Command Groups: All.

See:
Returns:

RedlineNote - a string containg the redline, sticky note object

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getStickyNotesRedlineXML(stickynote_flag) → {string}

Returns the current redlines and sticky notes as a string object in XMLso the user can do their own server side save bypassing php or servlet code *

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
stickynote_flag boolean

save stickynotes as xml, default true

See:
Returns:

a string containg the redline, sticky note object

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSvgToWorldUnits() → {float}

Returns the setting of SVG to World Units on the current drawing/page from the active f_div

CADViewer Internal Command Groups: All.

See:
Returns:

svgToWorldUnits - conversion factor for measurements

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_hideNavigationMenu(mydiv)

Hide the navigation menu

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mydiv string

name of the div on which the CADViewer instance is placed

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_initCADViewerPro_FileLoadModal(f_div)

CADViewer Pro Initialization class, to be called as part of init of base version FileLoad Module

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_initCADViewerPro_Section02(f_div)

CADViewer Pro Initialization class, to be called as part of init of base version

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_initCADViewerPro_Section03(f_div)

CADViewer Pro Initialization class, to be called as part of init of base version

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_InitializeSVGHyperlinkClick(f_div)

Initialize xlink SVG Hyperlinks with click handler so mouse click are caught, and adds a tooltip with the xlink displayed. The return method on mouseclick is: cvjs_OnHyperlinkClick(xlink_id);

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

Insert image link

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

Load all object image links

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadBitmapsViaServerPath(mode)

Enables bitmaps to be loaded via server handler instead of direct load

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode boolean

true for bitmap file load through server handler

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadCustomSVGLayer(fileName, f_div, layer)

Loads a SVG file into a custom layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of SVG file to load

f_div string

name of Element on which CADViewer is located

layer object

Layer on which to place the file content

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadDrawingsWithSpaceObjects(f_div)

Opens the File Loader Modal to load and convert drawing with space objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadSpaceObjects(f_div, custom_content)

Loads JSON Space Object to the location defined through parameter settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadSpaceObjectsDirect(f_div, spaceObjectUrl)

Loads Space Object to the location defined through parameter settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

spaceObjectUrl String

SpaceObject file to load

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadStamp(fileName, f_div, layer)

Loads an stamp file into a custom layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of SVG file to load

f_div string

name of Element on which CADViewer is located

layer object

Layer on which to place the file content

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_make_collab_presenter(f_div)

Take control and become the presenter in collab sessiojn

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_makeLegendUpperRight(x, y, layer, hS, hTxt, hStyle, hCol, lS, lTxt, lStyle, ltxtCol, lCol, hlt)

Parameters:
Name Type Description
x *

delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1

y *

delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1

layer *

roomlayer

hS *

Header text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height

hTxt *

Array with the header text to be displayed on a per line basis

hStyle *

Style array of the header text

hCol *

Hex color of header text

lS *

Array with the legends text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height

lTxt *

Array with the legends text to be displayed on a per line basis

lStyle *

Array with the text styles of each legend

ltxtCol *

Array with the hex colors on each text legends

lCol *

Array with the hex colors of legends

hlt *

Object with highlight style of legends

cvjs_makeStampUpperRight(x, y, layer, hS, hT, hStyle, hCol, lS, lText, lStyle-, lCol, fCol)

Make a stamp in the upper right location of the drawings with color codes and text description

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
x float

delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1

y float

delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1

layer string

name of layer to draw stamp

hS float

Header text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height

hT Array.<string>

Array with the header text to be displayed on a per line basis

hStyle object

Style array of the header text

hCol string

Hex color of header text

lS Array.<float>

Array with the legends text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height

lText Array.<string>

Array with the legends text to be displayed on a per line basis

lStyle- Array.<string>

Array with the text styles of each legend

lCol Array.<string>

Array with the hex colors on each text legends

fCol string

Hex color of the frame

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_mergeDXFDWG(f_div)

Merge redline content into original DWG for re-distribution

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_mergePDFwithRedlines(filePath, urlPath, fileName, f_div)

Saves a floorplan with overlays as SVG file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
filePath string

location of the files to be merged, server side

urlPath string

url location of the files to be merged

fileName string

name of the pdf document to be merged, _red pdf pages will be merged into a document _red_merged

f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_mergeQR(floorPlan_div, custom_content)

Function to merge a QR into a drawing for download

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
floorPlan_div String

name of the div that contains CADViewer

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_moveFixedSizeCustomSpaceObjectXY(f_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer, xcor, ycor)

Add a Fixed Size Space Object Custom Rectangle at coordinates x, y

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

svgImagePath string

name of path containing wallpaper object

spaceObjectId string

Unique ID of the space object. NOTE!

spaceObjectName string

Name of the space object.

spaceObjectType string

Type of the object

layer string

the associated layer of the object

xcor int

x coordinate in SVG coordinates

ycor int

y coordinate in SVG coordinates

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_moveSpaceObject(f_div)

Interactively move a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_openFileLoadToServer(f_div)

Calls the file manager, set the enable file manager load to true prior to calling this method

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

the div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_openRedlineLoadModal(floorplan-div)

Opens the Redline Load Modal for server interaction with redlines

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
floorplan-div string

the ID of the Element in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_openRedlineSaveModal(floorplan-div)

Opens the Redline Save Modal for server interaction with redlines

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
floorplan-div string

the ID of the Element in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_openSpaceObjectSaveModal(floorplan-div)

Opens the SpaceObject Save Modal for server interaction with redlines

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
floorplan-div string

the ID of the Element in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_printScreenAsPDFwithRedlines(f_div, custom_content)

Saves a floorplan with overlays as SVG file, then embed it into a pdf and display in own window

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_publishPDF(f_div)

Publish redlined content as PDF

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_quickCount(f_div)

Activate quick count,

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_replaceSpaceObjectPathWithImage(f_div, spaceID, imagelocation)

Replace the content of a Space Object with a Fixed Size Image Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

spaceID string

spaceID

imagelocation string

image location or base64 encoded image

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resetInitialization_FloorplanDiv()

Reset the initialization of floorplans

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_resetSVGHyperlinkColors()

Reset colors on xlink SVG Hyperlinks. The hyperlinks are typically transparent, but can be controlled to do interactive highlight.-

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_resizeSpaceImageObject(f_div)

Interactively resize a Space Image Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resizeSpaceObject(f_div)

Interactively resize a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_rotateSpaceObject(f_div)

Interactively rotates a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

Saves all image links

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveAsSVG(f_div)

Save current object as SVG, including redlines and space objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveAsSVGOnServer(f_div, FileLocation, custom_content)

Save current object as SVG, including redlines and space objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

FileLocation string

name of file to save

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveCustomSVGLayer(fileName, f_div, layer, custom_content)

Saves a custom layer as SVG file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of file to save to

f_div string

name of Element on which CADViewer is located

layer object

Layer with custom information

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveFloorplanAsPDF(fileName, f_div, custom_content)

Saves a floorplan with overlays as PDF file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of file to save to

f_div string

name of Element on which CADViewer is located

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveFloorplanAsPDFtoSharePoint(fileName, f_div, sharepointFolder, sharepointUserName, custom_content)

Saves a floorplan with overlays as PDF file, upload to SharePoint folder

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of file to save to

f_div string

name of Element on which CADViewer is located

sharepointFolder string

name of SharePoint upload folder

sharepointUserName string

name of SharePointUser

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveFloorplanAsSVG(fileName, f_div, custom_content)

Saves a floorplan with overlays as SVG file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of file to save to

f_div string

name of Element on which CADViewer is located

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveScreenAsPDF_email(pageOrientation, pageSize, pageResolution, f_div)

Captures the screen image and creates a single page PDF, which is attached to email

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pageOrientation string

Orientation of drawings: landscape/portrait

pageSize string

Papersize of drawing

pageResolution string

Page resolution in dpi, default is 300

f_div string

div on which CADViewer is places

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveScreenAsPDF_uploadServer(pageOrientation, pageSize, pageResolution, f_div)

Captures the screen image and creates a single page PDF, which is uploaded to Sharepoint server

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pageOrientation string

Orientation of drawings: landscape/portrait

pageSize string

Papersize of drawing

pageResolution string

Page resolution in dpi, default is 300

f_div string

div on which CADViewer is places

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveStamp(fileName, f_div, layer)

Saves a stamp layer to a file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of file to save to

f_div string

name of Element on which CADViewer is located

layer object

Layer with custom information , roomLayer

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveStickyNoteInfo(fileName, f_div, custom_content)

Saves all stickynote content as - xml wrapped content: userid, id, name, date, text, page

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
fileName string

name and path of file to save to

f_div string

name of Element on which CADViewer is located

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setAllRedlineStickyNoteObjects(jsonObject)

Set all Redlines and StickyNotesbased on a JSON object, CADViewer v7

Parameters:
Name Type Description
jsonObject Object

, redlineObjects and stickNoteObjects are stored in a structure '{ "AllObjects" :[]}'

See CADViewer reference implementation CADViewer Online Demo.

See:

cvjs_setCallbackQuickCount(callbackMode)

Sets quickcounts to be echoed through method cvjs_QuickCountCallback(cvjs_quickCountCounter);

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
callbackMode boolean

false is default, true if Quick Counts shall be echoed through method

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCollaborationServerFolder(server_path)

Sets the server path for collaboration content

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
server_path string

: default is "C:\xampp\htdocs\CV-JS_2_4_1\php\collaboration\";

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCollaborationServerUrl(url_name)

Sets the server Url for collaboration content

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
url_name string

: default is "../php/collaboration/";

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCollaborationSessionName(sessions_name)

Sets the sessions name for the collaboration session

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
sessions_name string

: name of the session. This name will be a server entity of same name containing all content relevant to the session

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCompareDrawings_LoadSecondDrawingDirect(f_div, fileName)

Sets the name of the second drawing for compare load, bypassing load modal

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

fileName string

name of drawing

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCompareDrawings_StandardModal(f_div)

Second drawing in compare files are set to be loaded via modal - default action

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCurrentMeasurementUnits(f_div, units, svgToWorldUnit)

Sets Unit and Measurement World Unit Transformation on current page

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

units string

Measurement Unit (mmn, cm, m, feet, inch)

svgToWorldUnit float

conversion factor for measurements

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setCustomConversionEndpointExtension(flag)

Sets the value of the CustomConversionEndpointExtension for user control of conversions, server side in end-point /callapiconversion

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

value of CustomConversionEndpointExtension, default is false.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setDragBackgroundOnTop(f_div)

Moves the drag background on top, typically for image and text intensive PDF files

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setDragBackgroundToBack(f_div)

Moves the drag background to its default position, at the back, typically for CAD files

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_ImageInsert()

Sets the icon interface for enabling image insert

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_setIconInterfaceControls_SpaceManagement(f_div)

Sets the icon interface for enabling space management

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setIconInterfaceControls_ViewingOnly(f_div)

Sets the icon interface for viewing, layerhanding, measurement, etc. only

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setImageSpaceObjectParameters(loadSpaceImage_LocationOrbase64Object, loadSpaceImage_ID, loadSpaceImage_Type, loadSpaceImage_Layer)

Sets the parameters when creating an Image Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
loadSpaceImage_LocationOrbase64Object string

location of the image object (SVG or bitmap) NOTE: the image can also be base64 encoded of type: data:image/svg+xml;base64,PHN.... or data:image/png;base64,PHN....

loadSpaceImage_ID string

ID of the Image Space Object

loadSpaceImage_Type string

Type of the Image Space Object

loadSpaceImage_Layer string

name of the layer where the Space Object is positioned

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setInsertImageObjectsAbsolutePath(path, serverPath, dynamicPathFlag)

Sets the basolute path for the insert image object location, relative path is not used

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

absolute http/Url path to the inserted images location,

serverPath string

absolute path to the inserted images location, "/home/cadviewerjs/drawings/mypath/inserted_image_objects/"

dynamicPathFlag boolean

dynamic location for each input file, input file name and path concatenated to path.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setInsertImageObjectsAbsolutePath_FileName(path, serverPath, fileName)

Sets the absolute path for the insert image object location, relative path is not used

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

absolute http/Url path to the inserted images location,

serverPath string

absolute path to the inserted images location, "/home/cadviewerjs/drawings/mypath/inserted_image_objects/"

fileName string

filename, "myobject.js"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setInsertImageObjectsRelativePath(path, serverPath)

Sets the relative path for the insert image object location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

path to the inserted images location, default is "../drawings/inserted_image_objects/"

serverPath string

absolute path to the inserted images location, "/home/cadviewerjs/drawings/mypath/inserted_image_objects/"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPostFixServerToken(flag)

Sets if the CADViewer Conversion server server shall add a postfix token when loading a drawing

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

value of CustomConversionEndpointExtension, default is false.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRedlinesAbsolutePath(path, serverPath, dynamicPathFlag)

Sets the absolute path for the redlines location, relative path is not used

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

abslute URL to the redlines location

serverPath string

absolute path to the redlines location, "/home/cadviewerjs/redlines/"

dynamicPathFlag boolean

dynamic location for each input file, input file name and path concatenated to path.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRedlinesRelativePath(serverPath, path, dynamicPathFlag)

Sets the relative path for the redlines location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
serverPath string

absolute path to the redlines location, "/home/cadviewerjs/redlines/"

path string

path to the redlines location, default is "../redlines"

dynamicPathFlag boolean

dynamic location for each input file, input file name and path concatenated to path.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerFileLocation(myServerPathToFloorplans, floorplanPath, floorplanUrl, username, password)

Set up the location of folder in server in which files are upload to and accessed from

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
myServerPathToFloorplans string

full path to the location of the drawings (typically /home/myserver/drawings/floorplans/)

floorplanPath string

the relative location of floorplans relative to my document (typically ../drawings/floorplans/)

floorplanUrl string

Url to the locations of floorplans relative to my document

username string

username for floorplans drawings folder, "" if none

password string

password for floorplans drawings folder, "" if none

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setServerFileLocation_AbsolutePaths(myServerPathToFloorplans, floorplanPath, username, password)

Set up the location of folder in server in which files are upload to and accessed from

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
myServerPathToFloorplans string

full path to the location of the drawings (typically /home/myserver/drawings/floorplans/)

floorplanPath string

the relative location of floorplans relative to my document (typically ../drawings/floorplans/)

username string

username for floorplans drawings folder, "" if none

password string

password for floorplans drawings folder, "" if none

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectsAbsolutePath(path, serverPath, dynamicPathFlag)

Sets the absolute path for the space object location, relative path is not used

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
path string

abslute URL to the space object location

serverPath string

absolute path to the space object location, "/home/cadviewerjs/spaceObjects/"

dynamicPathFlag boolean

dynamic location for each input file, input file name and path concatenated to path.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectsStructureDirect(f_div, spaceObjectStructure)

Loads Space Object to the location defined through parameter settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

spaceObjectStructure String

Setting of a spaceObject JSON structure in a 'SpaceObjects' array

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectUrl(file)

Sets the name and url of the Space Object file to load, The Space Object file is has the extension .js

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
file string

String containg url and name of space_object.js file

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_showMeCounts(f_div)

Show number of quick counts

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_spaceObjectSettings(f_div)

Settings of how Space Objects communicates with user defined back-end

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_start_collab(f_div)

Start a collaboration session

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_stop_collab(f_div)

Leave the collaboration session

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_storeFillColors()

Create an internal array with all fill colors on all SVG graphical objects.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_supressPopUpModalMode(modal_mode)

Controls the appearance of pop up modal when space object is clicked

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
modal_mode boolean

flag to make popup modal disappear , false is default and display, true for supressed

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_supressSingleSpaceHighlight(modal_mode)

Controls the highlight appearance when space object is clicked. Used for custom control of multiple selections, etc.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
modal_mode boolean

flag to make highlight disappear , false is default highlight, true for supressed highlight of space

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_toggleBlackWhite(floorplan-div)

Toggle the color settings Black /White

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
floorplan-div string

the ID of the Element in which CADViewer is running

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_activateSpaceObjectModal_Id(rmid)

Activate modal on Space Object.

CADViewer Internal Command Groups: All.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of space object modal to activate

See:
Examples
See CADViewer reference implementation: CADViewer Online Demo, implements interface commands  and various API methods.

                          
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_activateSpaceObjectModal_Node(node)

Activate modal on Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
node string

Node of space object modal to activate

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addHandleFunc_ResizeDragRotateRedlineSpaceObject(id, action, type)

API call to rotate, scale or translate an redline or space object

Parameters:
Name Type Description
id string

Redline ID (1,2,3) or Space ID (Thermo_1, etc)

action string

'rotate', 'translate' or 'scale'

type string

'redline' or 'spaceobject'

cvjs_addSingleSpaceObject(f_div, name, id, layer, group, atr, status, type, tags, occ, path)

Directly sets a Space Object onto the canvas and increments the current array with space objects NOTE: User must take consideration to not define an ID already available.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

name string

name of the space object to be visualized at the modal header

id string

id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries

layer string

layer of the Space Object

group string

group of the Space Object

atr string

a list of attributes for the Space Object

status string

status of attributes list, can be populated or unpopulated, controls if data is pulled externally

type string

the type attribute of the Space Object, the type is displayed at the modal header

tags string

list of tags assocated with the object, for retrieval at custom developed highlight

occ string

tag to describe occupancy, for retrieval at custom developed highlight

path string

The path of the Space Object as an SVG path

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_allSpaceObjectsOff(f_div)

Turn all Space Object off

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_allSpaceObjectsOn(f_div)

Turn all Space Objects on

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_batchConvertDrawingsToPDF(dFilesArr, pageOrint, pageSize, pageRes)

Loads a set of drawings, apply page size, page orientation and resolution to each page/drawing. Produce a multi-page PDF out of the set of drawing.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
dFilesArr Array.<string>

String array with name and location of drawings

pageOrint Array.<string>

String array with orientation of drawings: landscape/portrait

pageSize Array.<string>

String array with papersizes of drawings

pageRes Array.<string>

Array with page resolutions

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_CADViewerPro(cadviewerpro)

Changes CADViewer from CADViewer Community to CADViewer Pro

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
cadviewerpro boolean

true for CADViewer Pro, false for CADViewer Community

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceFixedLocation(rmid, evt)

Activate modal on Space Object.

CADViewer Internal Command Groups: All.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of space object modal to activate

evt obj

click event , or null

See:
Examples
See CADViewer reference implementation: CADViewer Online Demo, implements interface commands  and various API methods.

                          
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceObjectID(currentId, newId) → {boolean}

Change the ID of a current Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentId string

The current ID of the Space Object

newId String

The new ID of the Space Object

See:
Returns:

flag - true if changed, otherwise false. Note, it cannot be changed into an existing ID

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceObjectLayer(currentId, newLayer) → {boolean}

Change the layer of a current Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentId string

The current ID of the Space Object

newLayer string

The new layer of the Space Object

See:
Returns:

flag - true if changed, otherwise false

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceObjectLinkStatus(currentId, linkFlag) → {boolean}

Set the link status Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentId string

The current ID of the Space Object

linkFlag boolean

The new link Status of the Space Object

See:
Returns:

flag - true if changed, otherwise false

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceObjectName(currentId, newName) → {boolean}

Change the Name of a current Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentId string

The current ID of the Space Object

newName string

The new Name of the Space Object

See:
Returns:

flag - true if changed, otherwise false

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceObjectNode(currentNode, newNode) → {boolean}

Change the Node of a current Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentNode string

The current Node of the Space Object

newNode String

The new Node of the Space Object

See:
Returns:

flag - true if changed, otherwise false. Note, it cannot be changed into an existing ID

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeSpaceObjectType(currentId, newType) → {boolean}

Change the Space Type of a current Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
currentId string

The current ID of the Space Object

newType string

The new Type of the Space Object

See:
Returns:

flag - true if changed, otherwise false

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearAllHighlightHandleObjectStyles()

Clear all Highlights on AutoCAD Handle tagged geometrical objects

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_clearAllHighlightSpaceObjectDirect(f_div)

Clear all Highlight on all Space Objects and returns to default settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

Clears the drawing from any highlight or modals active on Hyperlinks

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_clearDrawingRedlines()

Clears the drawing from any redlines

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_clearDrawingSpaceObjects()

Clears the drawing from any highlight or modals active on Space Objects

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_clearDrawingStickyNotes()

Clears the drawing from any highlight or modals active on StickyNotes

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_clearHighlightSpaceObjectDirect(f_div, objectID)

Clear the Highlight a Space Object and returns to default settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

objectID string

id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearSpaceLayer() → {none}

Clears and initialize the general Space Layer for highlights

CADViewer Internal Command Groups: All.

See:
Returns:
Type
none
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_close_StickyNote(sId)

Closes the StickyNote content field

Parameters:
Name Type Description
sId *

ID of the StickyNote

cvjs_deleteAllRedlines()

Clears all redlines in drawing on current active canvas 10.10.1

cvjs_deleteAllStickyNotes(f_div)

Clears all stickynotes in drawing

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

cvjs_deleteLastRedline(f_div)

Deletes the last drawn Redline

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_deleteRedlineDirect(f_div, redID) → {boolean}

Delete Redline Object

Parameters:
Name Type Description
f_div string

name of floorplan div

redID string

id of the redline

Returns:

flag - true if deleted, false if objectID undefined

Type
boolean

cvjs_deleteSingleRedline(f_div)

Deletes a single redline

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_deleteSpaceObjectDirect(f_div, objectID) → {boolean}

Delete Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

objectID string

id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries

See:
Returns:

flag - true if deleted, false if objectID undefined

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_directDownloadStickyNotesRedlines(f_div, filename)

Trigger a direct download of the current redline on canvas into a file for local save

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

filename string

name of redline file of screen content to download, it's format extension must be .js

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_directUploadStickyNotesRedlines(f_div)

Trigger a direct local source load of a redline file into the current canvas

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedline__Freehand()

Draws interactively a freehand redline. The data object of the redline is defined as a Redline. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawRedline_Freehand(f_div)

Draws a freehand redline - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedline_Freehand_globalColorWidth()

Draws a freehand redline - uses global values of color and width

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_drawRedlineArrow(f_div)

Draws a redline polyline with arrow - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineCircle(f_div)

Draws a redline circle - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineCloud(f_div)

Draws a redline cloud - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineEllipse(f_div)

Draws a redline ellipse - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineFilledPolygon(f_div)

Draws a redline filled polygon - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineFilledRectangle(f_div)

Draws a redline filled rectangle - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlinePolyline(f_div)

Draws a redline polyline - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineRectangle(f_div)

Draws a redline rectangle - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineSingleLine(f_div)

Draws a single redline line - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineText(f_div)

Draws a redline text - uses global settings of color

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawRedlineTriangle(f_div)

Draws a redline triangle - uses global settings of color and width

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_drawStickyNote(f_div)

Draws a freehand stickynote - uses global settings of user and user id

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_generateShareFileDrawingList()

Calls server side PHP controller to fetch file list from Sharepoint server. A CAD server tree is built for jstree file selector.

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_getLayerForSpaceObject(f_div, ObjectID) → {string}

Get the associated layer name for the Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

ObjectID String

Space Object Id on layer, -1 if none found

See:
Returns:

layerName - name of the layer field of the Space Object

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getRedlineIdList() → {array}

Returns a list with all Ids in the Redline structure

CADViewer Internal Command Groups: All.

See:
Returns:

value - Returns Id list

Type
array
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectByType(getType) → {Object}

Return a JSON structure with all Space Object corresponding to the type designated from parameter:
SpaceObjects :[ { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObject": displaySpaceObject,
"translate_x": translate_x,
"translate_y": translate_y,
"zvalue": "1",
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform,
"svgx": svgx,
"svgy": svgx,
"dwgx": dwgx,
"dwgy": dwgy }
"customContent" : "customobject", "pageNumber" : pageNumber, "pageName" : pageName }

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
getType String

type of Space Objects to search

See:
Returns:

jsonSpaceObject - Object with all space objects content

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectDefaultLayer(f_div) → {string}

Get the creation layer for Space Objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

See:
Returns:

layerName - name of the default Space Object layer

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectDirectXYCoord(f_div, objectID, coordinate_flag) → {Array}

Get current Space Object Coordinates

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

objectID string

id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries

coordinate_flag int

0 is SVG coordinates, 1 is DWG coordinates, 0 is default

See:
Returns:

coords - x and y coordinate of object , null if undefined

Type
Array
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getStickyNotesRedline() → {string}

Returns the current redlines and sticky notes as a string object in so the user can do their own server side save bypassing php or servlet code

CADViewer Internal Command Groups: All.

See:
Returns:

RedlineNote - a string containg the redline, sticky note object

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getTextOnId(id) → {String}

Get text object on ID

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id String

id of object, of type cv_xxxx

See:
Returns:
Type
String
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getTextOnLayer(f_div, layer)

Returns a list with all text on a designated layer

Parameters:
Name Type Description
f_div *

floorplan div

layer *

layer mane

Returns:

textlist - array of text elements

cvjs_hatchRedline(redlineId, graphicalPattern, colorHex, fillOpacity)

Parameters:
Name Type Description
redlineId string

Node Id of the Redline Object to add hatches

graphicalPattern string

name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" "pattern_0degree_crosshatch_standard" "pattern_0degree_crosshatch_fine"

colorHex string

color of hatch in hex form, for example: #FF0000

fillOpacity float

fill opacity of pattern, value between 0 and 1

cvjs_hatchSpace(rmid, graphicalPattern, colorHex, fillOpacity)

Apply a predefined pattern on a graphical Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object object to add hatches

graphicalPattern string

name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" "pattern_0degree_crosshatch_standard" "pattern_0degree_crosshatch_fine"

colorHex string

color of hatch in hex form, for example: #FF0000

fillOpacity float

fill opacity of pattern, value between 0 and 1

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_hide_StickyNote(sId)

Hide the StickyNote

Parameters:
Name Type Description
sId *

ID of the StickyNote

cvjs_hideOnlyPop()

Remove the popup click color

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_hideSpaceObjectID(spaceID)

Hide a Space Object based on it's ID

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
spaceID string

id of space object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightAllSpaceObjects(roomstyle, layer)

Highlights all Space Objects with a given style on a specified external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
roomstyle object

JSON formattet object containg the styling of the Space Objects

layer string

external layer on which to draw the highlights

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_HighlightHandle(hexColor, lineWeightFactor, opacity, handle)

Styles an an AutoCAD Handle tagged geometrical object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
hexColor string

Color of the hightlight in Hex, for example red is: #F00

lineWeightFactor float

factor to increase or decrease line weights, 1.0 is current line weight

opacity float

opacity of hexColor - 1.0 is default.

handle String

handle of space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_HighlightHandleObjectStyles(hexColor, lineWeightFactor, opacity, tooltip, id, handle, customTooltip)

Highlights an AutoCAD Handle tagged geometrical object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
hexColor string

Color of the hightlight in Hex, for example red is: #F00

lineWeightFactor float

factor to increase or decrease line weights, 1.0 is current line weight

opacity float

opacity of hexColor - 1.0 is default.

tooltip boolean

flag for tooltip, true generic tooltip, false none

id String

id of space Object, generic pass through

handle String

handle of space Object, generic pass through

customTooltip String

if custom tooltip is different from "", then customToolTip is used

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightRoomCSS_layer(rmid, roomstyle, layer)

Highlights a Space Object with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

layer string

external layer on which to draw the highlight

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightRoomCSS_layersort(rmid, roomstyle, layer, layer2)

Highlights a Space Object with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

layer string

external layer on which to draw the highlight

layer2 string

external layer is repositioned and put on top of layer2

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightRoomCSS_layersortDiv(rmid, roomstyle, layer, f_div) → {boolean}

Highlights a Space Object with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

layer string

external layer on which to draw the highlight

f_div string

name of the div on which the CADViewer instance is placed

See:
Returns:

false if rmid not found otherwise true

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightRoomImmediate(rmid, cleardrawing)

Highlight a Space Object using defined cvjs_selectColors

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of space object modal to highlight

cleardrawing boolean

clears all other highlights, before highlight, default is true, false will accumulate highlights

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightSpace(rmid, roomstyle)

Highlights a Space Object with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightSpaceBorderCSS_layersort(Id, roomstyle, layer, layer2, lineWeightFactor)

Highlights a Space Object bordr with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Id string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

layer string

external layer on which to draw the highlight

layer2 string

layer is repositioned and put on top of layer2

lineWeightFactor float

scale factor on border line weight

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightSpaceBorderCSS_layersortDiv(rmid, roomstyle, layer, f_div, lineWeightFactor) → {boolean}

Highlights a Space Object bordr with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

layer string

external layer on which to draw the highlight

f_div string

name of the div on which the CADViewer instance is placed

lineWeightFactor float

scale factor on border line weight

See:
Returns:

false if rmid not found otherwise true

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightSpaceObjectDirect(f_div, objectID, colorobject)

Highlight a Space Object with a css settings of a Color Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

objectID string

id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries

colorobject Object

Styleobject to apply to Space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightSpaceObjectId(rmid, roomstyle, layer)

Highlights a Space Object with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

layer string

external layer on which to draw the highlight

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightSpaceObjectIdDiv(rmid, roomstyle, layer, f_div)

Highlights a Space Object with a given style on a given external layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object to highlight

roomstyle object

JSON formattet object containg the styling of the SpaceObject

layer string

external layer on which to draw the highlight

f_div string

floorplan div with CADViewer instance

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_highlightURL(Id, roomstyle, layer)

Highlights a URL with a given style on a given layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
Id string

Id of the URL to highlight

roomstyle object

JSON formattet object containg the styling of the URL

layer string

layer on which to draw the highlight

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_idObjectClicked() → {string}

Identify the id of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

See:
Returns:

objectId - The objectId is (-1) in case of no current object selected

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_IdObjectClicked() → {string}

Identify the id of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

See:
Returns:

objectId - The objectId is (-1) in case of no current object selected

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_LayerListSpaceObject(f_div, mode)

Opens the layer list for Space Objects for setting of Room/Text Layer processing

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

mode int

mode=1 , rl/tl selection, mode=2, hl selection , mode = 3, layer for SpaceID selection in floodfil process

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_loadStickyNotesRedlines(f_div, custom_content)

Loads redlines and sticky notes to the location defined through parameter settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_modifySpaceObjectDirect(f_div, id, svgImagePath, texts, scale, styles, scaleText, colors, leftFactor) → {boolean}

Modify a Fixed Size Space Object Custom Rectangle content

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

id string

Unique ID of the space object. NOTE!

svgImagePath string

name of path containing wallpaper object

texts Object

array with lines of text content in Space Object

scale float

scale factor at insertion, 1.0 is default

styles Object

object containing colors and style of each line of text in the Space Object

scaleText Array

array containing relative size af each line of text in the Space Object

colors Array

array containing color of each line of text in the Space Object

leftFactor float

left adjustment factor of text in the Space Object

See:
Returns:

flag - true if objectID exists, false otherwise

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_mouseenter_handleObjectStyles(hexColor, lineWeightFactor, opacity, tooltip, id, handle, customTooltip)

Control the highlight of AutoCAD Handle tagged geometrical objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
hexColor string

Color of the hightlight in Hex, for example red is: #F00

lineWeightFactor float

factor to increase or decrease line weights, 1.0 is current line weight

opacity float

opacity of hexColor - 1.0 is default.

tooltip boolean

flag for tooltip, true tooltip, false none

id String

id of space Object, generic pass through

handle String

handle of space Object, generic pass through

customTooltip String

if custom tooltip is different from "", then customToolTip is used

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_mouseout_handleObjectStyles(id, handle)

Reset the highlight from a AutoCAD Handle tagged geometrical objects on mouse leave

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id String

id of space Object, generic pass through

handle String

handle of space Object, generic pass through

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_moveRedline(f_div)

Translates a single redline

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_moveSpaceObjectDirect(f_div, objectID, coordinate_flag, xcor, ycor) → {boolean}

Moves a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

objectID string

id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries

coordinate_flag int

0 is SVG coordinates, 1 is DWG coordinates, 0 is default

xcor int

x coordinate

ycor int

y coordinate

See:
Returns:

flag - true if objectID exists, false otherwise

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_NameObjectClicked() → {string}

Identify the name of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

See:
Returns:

Name - The Name is (-1) in case of no current object selected

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_NodeObjectClicked() → {string}

Identify the node identifier of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

See:
Returns:

nodeId - The nodeId is (-1) in case of no current object selected

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_ObjectBoundingBox_ScreenCoord(rmid) → {Object}

Returns a Bounding Box of Space Object in screen coordinates

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid int

Room ID of Space Object

See:
Returns:

myBoundingBox - upper right and lower left corner of bounding box defined by myBoundingBox.x, myBoundingBox.y, myBoundingBox.x2, myBoundingBox.y2

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_open_StickyNote(sId)

Opens the StickyNote content field

Parameters:
Name Type Description
sId *

ID of the StickyNote

cvjs_resizeRedline(f_div)

Scales a single redline

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_resizeWindow_3D(model3D, floorplan)

Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
model3D string

name of canvas element containing 3D model

floorplan string

name of SVG element containing floorplan

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnActiveSpaceObjects(f_div) → {Array}

Return a list of all Space Objects on an active layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

See:
Returns:

IdArrary - Array with Space Object Id's

Type
Array
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnAllRedlineObjects() → {Object}

Returns all Redlines in a JSON object , CADViewer v7

See:
Returns:

redlineObjects is stored in a structure '{ "RedlineObjects" :[]}' See CADViewer reference implementation CADViewer Online Demo.

Type
Object

cvjs_returnAllRedlineStickyNoteObjects() → {Object}

Returns all Redlines and StickyNotes in a JSON object , CADViewer v7

See:
Returns:

allObjects is stored in a structure '{ "AllObjects" :[]}' See CADViewer reference implementation CADViewer Online Demo.

Type
Object

cvjs_returnAllSpaceObjects() → {Object}

Return a JSON structure with all Space Object content, each entry is of the form:
SpaceObjects :[ { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObject": displaySpaceObject,
"translate_x": translate_x,
"translate_y": translate_y,
"zvalue": "1",
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform,
"svgx": svgx,
"svgy": svgx,
"dwgx": dwgx,
"dwgy": dwgy }
"customContent" : "customobject", "pageNumber" : pageNumber, "pageName" : pageName }

CADViewer Internal Command Groups: All.

See:
Returns:

jsonSpaceObject - Object with all space objects content

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnAllSpaceObjectsOnLayer(f_div, layerName) → {Array}

Get all Space Objects with a given layer Association

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

layerName string

name of the layer field of the Space Object

See:
Returns:

IdArrary - Array with Space Object Id's

Type
Array
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnAllStickyNoteObjects() → {Object}

Returns all StickyNotes in a JSON object, CADViewer v7

See:
Returns:

StickyNoteObjects is stored in a structure '{ "StickyNoteObjects" :[]}' See CADViewer reference implementation CADViewer Online Demo.

Type
Object

cvjs_returnSpaceObjectClicked() → {Object}

Return a JSON structure of all content of a space object clicked:
var jsonStructure = { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObject": displaySpaceObject,
"translate_x": translate_x,
"translate_y": translate_y,
"zvalue": "1",
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform,
"svgx": svgx,
"svgy": svgx,
"dwgx": dwgx,
"dwgy": dwgy }
"customContent" : "customobject", "pageNumber" : pageNumber, "pageName" : pageName, "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "", "clickhandler" : "enable", "href" : "none", "parent": "none" }

CADViewer Internal Command Groups: All.

See:
Returns:

jsonSpaceObject - Object with the entire space objects content

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnSpaceObjectID(spaceID) → {Object}

Return a JSON structure of all content of a given ID:
var jsonStructure = { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObject": displaySpaceObject,
"translate_x": translate_x,
"translate_y": translate_y,
"zvalue": "1",
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform,
"svgx": svgx,
"svgy": svgx,
"dwgx": dwgx,
"dwgy": dwgy, "customContent" : "customobject", "pageNumber" : pageNumber, "pageName" : pageName, "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "", "clickhandler" : "", "href" : "none", "parent" : "none" }

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
spaceID string

Id of the Space Object to return

See:
Returns:

jsonSpaceObject - Object with the entire space objects content

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_rotateRedline(f_div)

Rotates a single redline

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveSpaceObjects(f_div, filepath, custom_content)

Saves Space Objects to the location defined through parameter settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

filepath String

file path

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_saveStickyNotesRedlines(f_div, display_modal, custom_content)

Saves redlines and sticky notes to the location defined through parameter settings

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div String

div of the CADViewer canvas

display_modal boolean

display save modal. If undefined -> true

custom_content object

custom controlled information

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setAllRedlineObjects(redlineObjects, clear)

Set all Redlines based on a JSON object, CADViewer v7

Parameters:
Name Type Description
redlineObjects *

, redlineObjects is stored in a structure '{ "RedlineObjects" :[]}'

clear *

, default is true, delete any redline and stickynote before insertion

See CADViewer reference implementation CADViewer Online Demo.

See:

cvjs_setDgnWorkSpace(workspace, workspacepath)

Sets the DGN workspace file

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
workspace String

Server location of workspace file, the (your server path) in the WorkSpace is automatically set to one level up from workspace file location.

workspacepath String

DGN workspace internal Server Path, the (your server path) in the WorkSpace. Only use if different to one level up from workspace file location.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setDgnWorkSpaceServerPath(workspacepath)

Sets the DGN workspace internal Server Path

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
workspacepath String

DGN workspace internal Server Path, the (your server path) in the WorkSpace. Only use if different to one level up from workspace file location.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setGenericColor()

Calls modal for setting redline color

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_setGlobalSpaceImageObjectScaleFactor(factor)

Sets a scale factor of Image Space Objects when placed out in the canvas

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
factor float

scalefactor, default is 1.0

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setLicenseKeyDirect(licensekey)

Pass over the license key directly The command will activate the license key

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
licensekey String

string containing the license key JSON array

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setLicenseKeyPath(licensePath)

Set the license key path, typically a path relative to the calling document, for example as ../javascripts The command will activate the license key

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
licensePath String

path to the license key location

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setLoadMultipleRedlinesStickyNotes(mode:)

Sets the mode for loading multiple redlines and overlay the previous loaded

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mode: boolean

true to overlay redlines, false to clear redline when new is loaded, default is false

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setMergeDXF(f_div)

Calls modal for merge DXF document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setPublishPDF(f_div)

Calls modal for publish PDF document

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setQRCodeInsertion(PercentXFromLowerLeft, PercentYFromLowerLeft, cvjs_widthPercent)

Sets the insertion location of QR Codes

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
PercentXFromLowerLeft int

distance in x, percent of total width from lower left

PercentYFromLowerLeft int

distance in y, percent of total height from lower left

cvjs_widthPercent int

width of QR code, in percent of total width

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRedlineColor(f_div)

Calls modal for setting redline color

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setRedlineModeInfo(flag)

Parameters:
Name Type Description
flag *

cvjs_setRedlineStrokeDashArray(redlineId, graphicalPattern)

Set a redline with a stoked line type

Parameters:
Name Type Description
redlineId *

Node Id of the Redline Object to stroke

graphicalPattern *

name of the stroke pattern, from a predefined list of patterns: "dash" "dot" "dash_dot" "dash_dot_dot"

cvjs_setRedlineThickness(f_div)

Calls modal for setting redline color

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectDirect(jsonSpaceObject) → {boolean}

Using a JSON structure to create a new Space Object
var jsonStructure = { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"highlightcolor": highlightcolor,
"selectcolor": selectcolor,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObject": displaySpaceObject,
"translate_x": translate_x,
"translate_y": translate_y,
"zvalue": "1",
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform,
"svgx": svgx,
"svgy": svgx,
"dwgx": dwgx,
"dwgy": dwgy }
"customContent" : "customobject", "pageNumber" : pageNumber, "pageName" : pageName "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "", "clickhandler" : "", "href" : "none", "parent" : "" }

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
jsonSpaceObject Object

Object with the entire space objects content

See:
Returns:

flag - true if created, otherwise false

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectOnLayer(f_div, objectID, layerName)

Associate Space Object with a Layer

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

objectID string

id of the object, used for pop-up highlight and for linking Space Objects with database entries

layerName string

name of the layer field of the Space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectOnOff(f_div, objectID, displayStatus)

findFixtureIndex(8.68.4 Set the display status of Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

objectID string

id of the space object

displayStatus string

"on" to display, "off" to hide, default is "on"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setSpaceObjectsDefaultLayer(f_div, layerName)

Set the creation layer for Space Objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

layerName string

name of the layer field of the Space Object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setStickyNoteRedlineUrl(file)

Sets the name and url of the redline file to load, The redline file is has the extension .js

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
file string

String containg url and name of redline.js file

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setStickyNoteSaveRedlineUrl(file)

Sets the name and url of the redline file to save. The redline file can be .js , .dxf or .xml

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
file string

String containg url and name of redline.js/redline.ext file

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_show_StickyNote(sId)

Show the StickyNote

Parameters:
Name Type Description
sId *

ID of the StickyNote

cvjs_showSpaceObjectID(spaceID)

Show a Space Object based on it's ID

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
spaceID string

id of space object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_spaceObjectLayerOnOff(f_div, layerName, displayStatus)

Sets the status On/Off of all Space Objects with a given layer Association

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of floorplan div

layerName string

name of the layer field of the Space Object

displayStatus string

display status of layer "on" of "off"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_StickyNoteClicked() → {string}

Identify the node identifier of the last Sticky Note selected - Object Spaces, Sticky Notes and Redlines are differentiated.

CADViewer Internal Command Groups: All.

See:
Returns:

nodeId - The nodeId is (-1) in case of no current object selected

Type
string
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_styleQTip_color(state, titlebar, content, header_1, header_info_1, header_info_2)

Style the background and text colors of qTip popup modal

Parameters:
Name Type Description
state boolean

true are new colors, false sets back to default, remaining fields are not used

titlebar string

background color of titlebar

content string

background color of content

header_1 string

text color of header 1 item

header_info_1 string

text color of header info 1 item

header_info_2 string

text color of header info 2 item

cvjs_updateDrawingRedlines()

Update redlines after page change

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_zoomHere()

Zoom in over the extents of the current object selected

CADViewer Internal Command Groups: zoom.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomHere_Factor(node, factor)

Zoom in over the extents of an object using a zoom factor

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
node String

NODE_ node object

factor float

zoom factor to zoom in over

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomHere_Handle(handle, factor, f_div)

Zoom in over the extents of an handle object using a zoom factor

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
handle String

handle object

factor float

zoom factor to zoom in over

f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomHere_ObjectId(rmid, factor)

Zoom in over the extents of an object using a zoom factor

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
rmid String

Id of the Space Object to zoom over

factor float

zoom factor to zoom in over in percent

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomHere_ObjectIdDiv(rmid, factor, f_div)

Zoom in over the extents of an object using a zoom factor

CADViewer Internal Command Groups: zoom.

Parameters:
Name Type Description
rmid String

Id of the Space Object to zoom over

factor float

zoom factor to zoom in over in percent

f_div String

floorplan div to zoom over

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_zoomHere_PopUp()

Zoom in over the extents of the current object selected and opens a PopUp

CADViewer Internal Command Groups: zoom.

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

findFixtureIndex(rmid) → {int}

Returns a the array index in vqRooms array corresponding to a Space ID

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid int

Room ID of Space Object

See:
Returns:

spc - array index

Type
int
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

findNodeFromId(rmid) → {int}

Returns a the corresponding internal NODE_ index in vqRooms array corresponding to a Space ID

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid int

Room ID of Space Object

See:
Returns:

node - NODE_ id

Type
int
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

xxxcvjs_setAllStickyNoteObjects(stickyNoteObjects, clear)

Set all StickyNotes based on a JSON object, CADViewer v7

Parameters:
Name Type Description
stickyNoteObjects *

, stickyNoteObjects is stored in a structure '{ "StickyNoteObjects" :[]}'

clear *

, default is true, delete any redline and stickynote before insertion

See CADViewer reference implementation CADViewer Online Demo.

See:

cvjs_main_master_width

Template start drag method for custom canvas /

var start_method_01 = function() { console.log("start_method_01"); }

/* * Template move drag method for custom canvas / var move_method_01 = function(dx,dy,x,y) {

var svg_x = cvjs_SVG_x(x);
var svg_y = cvjs_SVG_y(y);
console.log("move_method_01: dx="+dx+" dy="+dy+" x="+x+" y="+y+" svg_x="+svg_x+"  svg_y="+svg_y);

}

/* * Template stop drag method for custom canvas / var stop_method_01 = function() {

cvjs_removeCustomCanvasMethod();
console.log("REMOVE: stop_method_01");

};

/** Template mouse-move method for custom canvas /

var mousemove_method_01 = function(e,x,y) {

var svg_x = cvjs_SVG_x(x);
var svg_y = cvjs_SVG_y(y);

//cvjs_removeCustomCanvasMethod();
console.log("mousemove_method_01: x="+x+" y="+y+" svg_x="+svg_x+"  svg_y="+svg_y);

}

/* * Template mouse-down method for custom canvas /

var mousedown_method_01 = function(e,x,y) {

var svg_x = cvjs_SVG_x(x);
var svg_y = cvjs_SVG_y(y);

//cvjs_removeCustomCanvasMethod();
console.log("mousedown_method_01: x="+x+" y="+y+" svg_x="+svg_x+"  svg_y="+svg_y);

};

/* * Template mouse-up method for custom canvas /

var mouseup_method_01 = function(e,x,y) {

var svg_x = cvjs_SVG_x(x);
var svg_y = cvjs_SVG_y(y);

console.log("mouseup_method_01: x="+x+" y="+y+" svg_x="+svg_x+"  svg_y="+svg_y);

};

/* * Template double-click method for custom canvas /

var dblclick_method_01 = function(e,x,y) { cvjs_removeCustomCanvasMethod();

var svg_x = cvjs_SVG_x(x);
var svg_y = cvjs_SVG_y(y);
console.log("REMOVE: dblclick_method_01: x="+x+" y="+y+" svg_x="+svg_x+"  svg_y="+svg_y);

};

// SAMPLE TO CREATE RECTANGLE BY CLICK

var generic_canvas_flag_first_click_rectangle = false; var generic_canvas_flag_rectangle= false;

var generic_make_rect_init_method = function(){ console.log("generic_make_rect_init_method"); generic_canvas_flag_first_click_rectangle = false; generic_canvas_flag_rectangle= false; }

var generic_make_rect_mousedown_method = function(e, x, y) {

try{
    console.log("generic_make_rect_mousedown_method");

    if (!generic_canvas_flag_first_click_rectangle){
		var tPath_r = "M" + 0 + "," + 0;
        cvjs_RubberBand = cvjs_makeGraphicsObjectOnCanvas('Path', tPath_r).attr({stroke: "#b00000", fill : "none"});
        generic_canvas_flag_first_click_rectangle = true;
        generic_canvas_flag_rectangle= false;
        console.log("rubberband");
    }
    else{
        console.log(generic_canvas_flag_first_click_rectangle+"  "+generic_canvas_flag_rectangle);            
        if (generic_canvas_flag_rectangle){
            generic_make_rect_stop_method();
        }
    }
}
catch(err){console.log(err)}
//console.log("mouse down ");

}

var generic_make_rect_mouseup_method = function() {

try{
    console.log("generic_make_rect_mouseup_method");
}
catch(err){console.log(err)}

}

var generic_make_rect_dblclick_method = function() {

try{
    console.log("generic_make_rect_dblclick_method");
}
catch(err){console.log(err)}

}

var generic_make_rect_mousemove_method = function(e, x, y) {

try{ if (generic_canvas_flag_first_click_rectangle){ cvjs_customCanvasMethod_globalScale();
if (!generic_canvas_flag_rectangle){ cvjs_firstX = cvjs_SVG_x(x); cvjs_firstY = cvjs_SVG_y(y) cvjs_lastX = cvjs_firstX; cvjs_lastY = cvjs_firstY; generic_canvas_flag_rectangle = true; } else{ // we cannot have the mouse directly on top of the rubberband path, then it will not respond var mousedelta = 1; cvjs_lastX = cvjs_SVG_x(x-mousedelta); cvjs_lastY = cvjs_SVG_y(y-mousedelta); }

        var tPath_r = "M" + cvjs_firstX + "," + cvjs_firstY;		
        tPath_r += "L" + cvjs_firstX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_firstY;
        tPath_r += "L" + cvjs_firstX + "," + cvjs_firstY+" Z"; 
        cvjs_RubberBand.attr({'path': tPath_r});
    }
}
catch(err){
    console.log(err);
} 

}

var generic_make_rect_stop_method = function() {

cvjs_RubberBand.attr({fill: '#ff9999', "fill-opacity": "0.5", stroke: '#ff9999', 'stroke-opacity': "1"});
cvjs_removeCustomCanvasMethod();    

};

// END - SAMPLE TO CREATE RECTANGLE BY CLICK

// SAMPLE TO CREATE RECTANGLE BY DRAG

var generic_drag_rect_start = function() {

generic_canvas_flag_first_click_rectangle = true;
generic_canvas_flag_rectangle = false;

var tPath_r = "M" + 0 + "," + 0;
cvjs_RubberBand = cvjs_makeGraphicsObjectOnCanvas('Path', tPath_r).attr({stroke: "#b00000", fill : "none"});

console.log("start_method_01");

}

/* * Template move drag method for custom canvas /

var generic_drag_rect_move = function(dx,dy,x,y) {

try{
    if (generic_canvas_flag_first_click_rectangle){
        cvjs_customCanvasMethod_globalScale();        
        if (!generic_canvas_flag_rectangle){
            cvjs_firstX = cvjs_SVG_x(x);
            cvjs_firstY = cvjs_SVG_y(y)
            cvjs_lastX = cvjs_firstX;
            cvjs_lastY = cvjs_firstY;
            generic_canvas_flag_rectangle = true;
        }
        else{
            // we cannot have the mouse directly on top of the rubberband path, then it will not respond
            var mousedelta = 1;
            cvjs_lastX = cvjs_SVG_x(x-mousedelta);
            cvjs_lastY = cvjs_SVG_y(y-mousedelta);
        }	
        
        var tPath_r = "M" + cvjs_firstX + "," + cvjs_firstY;		
        tPath_r += "L" + cvjs_firstX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_firstY;
        tPath_r += "L" + cvjs_firstX + "," + cvjs_firstY+" Z"; 
        cvjs_RubberBand.attr({'path': tPath_r});
    }
}
catch(err){
    console.log(err);
} 

}

/* * Template stop drag method for custom canvas / var generic_drag_rect_stop = function() {

cvjs_RubberBand.attr({fill: '#99ff99', "fill-opacity": "0.5", stroke: '#ff9999', 'stroke-opacity': "1"});
cvjs_removeCustomCanvasMethod();
console.log("REMOVE: generic_drag_rect_stop");

};

// END - SAMPLE TO CREATE RECTANGLE BY DRAG

// SAMPLE TO DRAG RECTANGLE if overlapping space objects

var select_drag_rect_start = function() {

generic_canvas_flag_first_click_rectangle = true;
generic_canvas_flag_rectangle = false;

var tPath_r = "M" + 0 + "," + 0;
cvjs_RubberBand = cvjs_makeGraphicsObjectOnCanvas('Path', tPath_r).attr({fill: '#ff9999', "fill-opacity": "0.5", stroke: '#ff9999', 'stroke-opacity': "1"});

console.log("start_method_01");

}

var select_drag_rect_move = function(dx,dy,x,y) {

try{
    if (generic_canvas_flag_first_click_rectangle){
        cvjs_customCanvasMethod_globalScale();        
        if (!generic_canvas_flag_rectangle){
            cvjs_firstX = cvjs_SVG_x(x);
            cvjs_firstY = cvjs_SVG_y(y)
            cvjs_lastX = cvjs_firstX;
            cvjs_lastY = cvjs_firstY;
            generic_canvas_flag_rectangle = true;
        }
        else{
            // we cannot have the mouse directly on top of the rubberband path, then it will not respond
            var mousedelta = 1;
            cvjs_lastX = cvjs_SVG_x(x-mousedelta);
            cvjs_lastY = cvjs_SVG_y(y-mousedelta);
        }	
        
        var tPath_r = "M" + cvjs_firstX + "," + cvjs_firstY;		
        tPath_r += "L" + cvjs_firstX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_firstY;
        tPath_r += "L" + cvjs_firstX + "," + cvjs_firstY+" Z"; 
        cvjs_RubberBand.attr({'path': tPath_r});
    }
}
catch(err){
    console.log(err);
} 

}

var select_drag_rect_stop = function() {

cvjs_RubberBand.attr({'path': "M0,0"});
var mybox;
var overlap;
var selected_list = "";

// reorder x,  if not dragged left to right, top to buttom
var temp;
if (cvjs_firstX>cvjs_lastX){
    temp = cvjs_firstX;
    cvjs_firstX = cvjs_lastX;
    cvjs_lastX = temp;
}
// reorder y,  if not dragged left to right, top to buttom
if (cvjs_firstY>cvjs_lastY){
    temp = cvjs_firstY;
    cvjs_firstY = cvjs_lastY;
    cvjs_lastY = temp;
}


// get all spaces
var spaceObjectIds = cvjs_getSpaceObjectIdList();
// loop over all spaces
for (var spc in spaceObjectIds){
    // get the bounding box of the space
    
    mybox = cvjs_getSpaceObjectBoundingBox(spaceObjectIds[spc]);
    // check if it operlaps with the drag rectangle
    if (mybox == false) continue;

    //console.log(cvjs_firstX+"  "+ cvjs_firstY+" "+ cvjs_lastX+ " "+ cvjs_lastY+"  "+spc);
    //console.log(mybox.x+" "+ mybox.y+" "+ (mybox.x+mybox.width) + " "+ (mybox.y+mybox.height));

    overlap= cvjs_rect_doOverlap( cvjs_firstX, cvjs_firstY, cvjs_lastX, cvjs_lastY, mybox.x, mybox.y, mybox.x+mybox.width, mybox.y+mybox.height);

    if (overlap) 
        selected_list+= spaceObjectIds[spc]+";";
}

if (selected_list == "") selected_list = "None";

window.alert("Selected Objects: "+selected_list);
//cvjs_RubberBand.attr({fill: '#99ff99', "fill-opacity": "0.5", stroke: '#ff9999', 'stroke-opacity': "1"});
cvjs_removeCustomCanvasMethod();
console.log("REMOVE: generic_drag_rect_stop");

};

// END - SAMPLE TO DRAG RECTANGLE if overlapping space objects

// SAMPLE TO CREATE RECTANGLE w TEXT and ARRow BY CLICK

var logic_flags = [false,false,false,false,false,false]; var operation_type = ""; var mybasewidth = 1;

var generic_make_rect_arrow_init_method = function(){ console.log("generic_make_rect_init_method"); logic_flags = [false,false,false,false,false,false]; operation_type = "box";
} var tPath_r;

var generic_make_rect_arrow_mousedown_method = function(e, x, y) {

try{
    if ((operation_type.indexOf("arrow") ==0) && logic_flags[0] && logic_flags[1]){
        generic_make_rect_arrow_stop_method2();
    }

    if ((operation_type.indexOf("box") ==0) && !logic_flags[0]){  // first box
        var tPath_r = "M" + 0 + "," + 0;
        cvjs_RubberBand = cvjs_makeGraphicsObjectOnCanvas('Path', tPath_r).attr({stroke: "#b00000", fill : "none"});
        logic_flags[0] = true;
        logic_flags[1]= false;
    }
    if ((operation_type.indexOf("box") ==0) && logic_flags[0] && logic_flags[1]){
        generic_make_rect_arrow_stop_method1();
    }

} catch(err){console.log(err)} //console.log("mouse down "); }

var generic_make_rect_arrow_mouseup_method = function() {

try{
    console.log("generic_make_rect_mouseup_method");
}
catch(err){console.log(err)}

}

var generic_make_rect_arrow_dblclick_method = function() {

try{
    console.log("generic_make_rect_dblclick_method");
}
catch(err){console.log(err)}

}

var generic_make_rect_arrow_mousemove_method = function(e, x, y) {

try{ if ((operation_type.indexOf("box") ==0) && logic_flags[0]){ cvjs_customCanvasMethod_globalScale();
if (!logic_flags[1]){ cvjs_firstX = cvjs_SVG_x(x); cvjs_firstY = cvjs_SVG_y(y) cvjs_lastX = cvjs_firstX; cvjs_lastY = cvjs_firstY; logic_flags[1] = true; } else{ // we cannot have the mouse directly on top of the rubberband path, then it will not respond var mousedelta = 1; cvjs_lastX = cvjs_SVG_x(x-mousedelta); cvjs_lastY = cvjs_SVG_y(y-mousedelta); }

        tPath_r = "M" + cvjs_firstX + "," + cvjs_firstY;		
        tPath_r += "L" + cvjs_firstX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_lastY;
        tPath_r += "L" + cvjs_lastX + "," + cvjs_firstY;
        tPath_r += "L" + cvjs_firstX + "," + cvjs_firstY+" Z"; 
        cvjs_RubberBand.attr({'path': tPath_r});
    }


    if ((operation_type.indexOf("arrow") ==0) && logic_flags[0]){
        cvjs_customCanvasMethod_globalScale();        

        logic_flags[1] = true;
        var mousedelta = 1;
        cvjs_lastX = cvjs_SVG_x(x-mousedelta);
        cvjs_lastY = cvjs_SVG_y(y-mousedelta);

        tPath_r = "M" + cvjs_firstX + "," + cvjs_firstY;		
        tPath_r += "L" + cvjs_lastX + "," + cvjs_lastY;
        cvjs_RubberBand.attr({'path': tPath_r});
    }
}
catch(err){
    console.log(err);
} 

}

var randomNr;

var generic_make_rect_arrow_stop_method1 = function() {

// find the current highest node number
var Node_id = cvjs_currentMaxSpaceNodeId();
// increment and set current node underbar
Node_id++;
cvjs_cNode_underbar = Node_underbar+Node_id;
randomNr = Math.floor(Math.random() * Math.floor(100000)); window.alert("randomNr "+randomNr);

cvjs_RubberBand.attr({fill: 'none', "fill-opacity": "0.5", stroke: '#0000b0', 'stroke-opacity': "1"});
// create a group with space as main object
cvjs_createSpaceObjectGroup(cvjs_cNode_underbar, cvjs_RubberBand, "API"+randomNr, "API"+randomNr, "Generic", "myLayer", "myGroup");   

// create a new border object as separate graphics - we use the rubberband as our graphics variable
cvjs_RubberBand = cvjs_makeGraphicsObjectOnCanvas('Path', tPath_r).attr({fill: 'none', "fill-opacity": "1", stroke: '#000', 'stroke-opacity': "1", 'stroke-width': mybasewidth});
cvjs_addGraphicsToSpaceObjectGroup(cvjs_cNode_underbar,  cvjs_RubberBand, "rect01");

var myText = cvjs_rPaper[cvjs_active_floorplan_div_nr].text(cvjs_firstX+(cvjs_lastX-cvjs_firstX)/10.0, cvjs_lastY - (cvjs_lastY-cvjs_firstY)/5.0, "API"+randomNr).attr({fill: '#000', "fill-opacity": "1", stroke: '#000', 'font-size' : (Math.abs(cvjs_lastY-cvjs_firstY)/2.0) });

// var myText = cvjs_rPaper[cvjs_active_floorplan_div_nr].text("HELLO!!").attr({textpath: tPath_r}).attr({fill: '#000', "fill-opacity": "1", stroke: '#000'}); cvjs_addGraphicsToSpaceObjectGroup(cvjs_cNode_underbar, myText, "text01");

// we change to arrow, and directly make the mouse draggable
operation_type = "arrow";
logic_flags[0] = true;
logic_flags[1]= false;  

// set rubberband to middle of box side
cvjs_firstX = (cvjs_firstX+cvjs_lastX)/2.0;
cvjs_firstY = cvjs_lastY;
// make new rubberband 
tPath_r = "M" + cvjs_firstX + "," + cvjs_firstY;
cvjs_RubberBand = cvjs_makeGraphicsObjectOnCanvas('Path', tPath_r).attr({stroke: "#b00000", fill : "none"});

};

var generic_make_rect_arrow_stop_method2 = function() {

cvjs_RubberBand.attr({fill: 'none', "fill-opacity": "1", stroke: '#000', 'stroke-opacity': "1", 'stroke-width': mybasewidth});
// we create an arrow object and add to space object


// here we have to add the graphical object to our already created object
cvjs_addGraphicsToSpaceObjectGroup(cvjs_cNode_underbar, cvjs_RubberBand, "arrow-line01");

// create an arrow
var angleInDegrees = ( Math.atan2((cvjs_lastY-cvjs_firstY),(cvjs_lastX-cvjs_firstX)) / Math.PI * 180.0);
var scaleTriangle = mybasewidth;  // same as stroke-width
var triangle_design= -5.0*scaleTriangle+","+5.5*scaleTriangle+" "+0.0*scaleTriangle+","+-4.5*scaleTriangle+" "+5.0*scaleTriangle+","+5.5*scaleTriangle;
var mysin = Math.sin(angleInDegrees/180*Math.PI);
var mycos = Math.cos(angleInDegrees/180*Math.PI);
var Ttrans = 'r' + (angleInDegrees - 270)+'T' + (cvjs_lastX+ mycos*scaleTriangle) +"," + cvjs_lastY ;
var Triangle = cvjs_rPaper[cvjs_active_floorplan_div_nr].polyline(triangle_design);
Triangle.attr({
	fill: "#000",
	transform: Ttrans
});

// here we add an arrow to the object
cvjs_addGraphicsToSpaceObjectGroup(cvjs_cNode_underbar, Triangle, "arrow01");

cvjs_graphicalObjectCreated('CustomObject');
cvjs_graphicalObjectOnChange('Create', 'CustomObject',  "N"+randomNr);

cvjs_removeCustomCanvasMethod();    

};

Methods

cvjs_addCustomLayeredSpaceObject(f_div, LocationOr64byteEncodedArr, layerArr, spaceObjectId, spaceObjectName, spaceObjectType, spaceObjectLayer, scale, width, height, rotate, unit, jsonSpaceObject)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div *
LocationOr64byteEncodedArr *
layerArr *
spaceObjectId *
spaceObjectName *
spaceObjectType *
spaceObjectLayer *
scale *
width *
height *
rotate *
unit *
jsonSpaceObject *
See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addCustomSpaceObject(f_div, svgImagePath_base46encoded, spaceObjectId, spaceObjectName, spaceObjectType, spaceObjectLayer, scale, width, height, rotate, unit, jsonSpaceObject)

Add a variable sized Space Object Custom Rectangle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div *
svgImagePath_base46encoded *
spaceObjectId *
spaceObjectName *
spaceObjectType *
spaceObjectLayer *
scale *
width *
height *
rotate *
unit *
jsonSpaceObject *
See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addGraphicsToSpaceObjectGroup(cNode_underbar, baseGraphics, objectTag)

Add graphics to a space object group

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
cNode_underbar string

base object name of graphics group

baseGraphics Object

graphics object to be added to graphics group

objectTag string

sub id tag inside graphics group

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addLayeredSpaceObject(f_div, ID, images_64byte, layerArr, scale, width, height, rotate, unit, jsonSpaceObject)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div *
ID *
images_64byte *
layerArr *
scale *
width *
height *
rotate *
unit *
jsonSpaceObject *
See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addObjectToSpaceObjectGroup(cNode_underbar, graphicsTag, objectTag, isGroup)

Add a graphics object or space object group to a space object group

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
cNode_underbar string

base object name of graphics group

graphicsTag string

the space object ID tag of the graphics to be added

objectTag string

sub id tag, to be added inside main graphics group

isGroup boolean

if true, the group name is detemined based on the graphicsTag

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addSelectedToOriginalStyles(rmid)

If an object has been selected, then add it to the list of Original Styles

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object object

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addSpaceObject(f_div, ID, image_or64byte, scale, width, height, rotate, unit, jsonSpaceObject)

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div *
ID *
image_or64byte *
scale *
width *
height *
rotate *
unit *
jsonSpaceObject *
See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_addVqRoomsGraphics_newNode(cNode_underbar, graphicsObject)

Sets up a graphics Group object with the current Node_underbar

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
cNode_underbar String

the current internal ID of a Group object

graphicsObject Object

the graphical base object, to which the Group is built around

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_changeTextOnSpaceObjectGroup(spaceObjectId,, subGroupObjectId,, newText)

Copy a space group object into a new group object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
spaceObjectId, string

original space object ID

subGroupObjectId, string

sub group space object ID containing text

newText string

replacement text string

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_clearAllCustomTooltips()

Clears all custom tooltips

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_closestCenterPoint(points, point) → {Object}

Return the Closest Center on a path given a reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
points object

SVG points array

point Object

(x,y) of reference point

See:
Returns:

nearestPoint - (x,y) of nearest point on path

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_closestCenterPoint_SpaceModule(points, point) → {Object}

Return the Closest Center on a path given a reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
points object

SVG points array

point Object

(x,y) of reference point

See:
Returns:

nearestPoint - (x,y) of nearest point on path

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_closestEndPoint(points, point) → {Object}

Return the Closest Endpoint on a path given a reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
points object

SVG points array

point Object

(x,y) of reference point

See:
Returns:

nearestPoint - (x,y) of nearest point on path

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_closestEndPoint_SpaceModule(points, point) → {Object}

Return the Closest Endpoint on a path given a reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
points object

SVG points array

point Object

(x,y) of reference point

See:
Returns:

nearestPoint - (x,y) of nearest point on path

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_closestPoint(pathNode, point) → {Object}

Return the Closest point on a path given a reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pathNode string

SVG path

point Object

(x,y) of reference point

See:
Returns:

nearestPoint - (x,y) of nearest point on path

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_closestPoint_SpaceModule(pathNode, point) → {Object}

Return the Closest point on a path given a reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
pathNode string

SVG path

point Object

(x,y) of reference point

See:
Returns:

nearestPoint - (x,y) of nearest point on path

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_copyGroupObject(originSpaceObjectId, newSpaceObjectId)

Copy a space group object into a new group object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
originSpaceObjectId string

original space object ID

newSpaceObjectId string

new Space Object Id

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_createSpaceObjectGroup(cNode_underbar, baseGraphics, id, name, type, layer, group)

Creates a Space Object Group based on initialization values and a boase graphics

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
cNode_underbar String

the current internal ID of a Group object

baseGraphics Object

the graphical base object, to which the Group is built around

id String

the public exposed ID of the group object

name String

the public exposed Name of the group object

type String

the public exposed Type of the group object

layer String

the layer of the group object

group String

a general group name, to which the group object can be part of

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_currentSpaceSettings()

return current settings object

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_customCanvasMethod_globalScale()

Creates the global scale and delta translation values for SVG coordinate calculaiton in custom Canvas Methods

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_emptyMainCanvas(f_div)

Clears the canvas, needed for Framework applications, re-initalizing when entering back into the canvas

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_executeCustomCanvasMethod_click(mousemove_method, mousedown_method, mouseup_method, dblclick_method, init_method)

Execute a custom implemented canvas method for mouse operation, click operations

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mousemove_method method

A placeholder method for mouse move

mousedown_method method

A placeholder method for mouse down

mouseup_method method

A placeholder method for mouse up

dblclick_method method

A placeholder method for mouse double click

init_method method

A placeholder method executed when mouse interaction on canvas initiated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_executeCustomCanvasMethod_drag(start_method, stop_method, move_method, init_method)

Execute a custom implemented canvas method for drag

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
start_method method

A placeholder method executed at start drag

stop_method method

A placeholder method executed at stopping of drag

move_method method

A placeholder method executed when drag is initiated and movement takes place

init_method method

A placeholder method executed when drag is initiated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_executeCustomCanvasMethod_nodrag(mousemove_method, mousedown_method, mouseup_method, dblclick_method, init_method)

Execute a custom implemented canvas method for mouse operation, no drag

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
mousemove_method method

A placeholder method for mouse move

mousedown_method method

A placeholder method for mouse down

mouseup_method method

A placeholder method for mouse up

dblclick_method method

A placeholder method for mouse double click

init_method method

A placeholder method executed when mouse interaction on canvas initiated

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_exitMultiSelect()

Exit multi-select

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_getSpaceObjectBoundingBox(id) → {Object}

Returns a list with all Ids in the Space Object structure

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id String

SpaceId

See:
Returns:

boundingBox - Returns the bounding box

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_getSpaceObjectPath(baseObject, transformFlag) → {Object}

returns array with object Path

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
baseObject *

the Space Object to which to get the path

transformFlag boolean

apply the rotation transformation, true if yes, false if no

See:
Returns:

true if inside, false otherwise

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_handleObjectsParceBlocks(flag)

Set the parsing of blocks, when processing handle objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

set the parse block flag, default is true

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_handleObjectsParceTextOnly(flag)

Set the parsing of text elements only, when processing handle objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
flag boolean

set the parse block flag, default is true

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_hideObjectInSpaceObjectGroup(id_node, objectTag, type)

Hide an object inside a Space Object Group

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id_node string

base object name(node) or id of graphics group

objectTag string

sub id tag, to be shown

type string

type of id_node, can be "id" or "node"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_initMultiSelect()

Initialize multi-select

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_isInside(X, Y, n, p_x, p_y) → {boolean}

Returns true if the point p lies inside the polygon[] with n vertices

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
X Array
Y Array
n int
p_x float
p_y float
See:
Returns:
Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_isSpaceObjectInside(baseObject, topObject) → {boolean}

Checks if the spaceObject topObject is fully inside the spaceObject baseObject

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
baseObject *
topObject *
See:
Returns:

true if inside, false otherwise

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_makeGraphicsObjectOnCanvas(objectType, graphicsObject) → {Object}

Creates a graphical object on Canvas

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
objectType String

type of object, Implemented is 'path', polyline

graphicsObject String

graphics object

See:
Returns:

svgCanvasObject - returns an SVG canvas object, that can be Styled and manipulated

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_makeTextObjectOnCanvas(x, y, textObject) → {Object}

Creates a graphical text object on Canvas

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
x float

x coord

y float

y coord

textObject String

text object

See:
Returns:

svgCanvasObject - returns an SVG canvas object, that can be Styled and manipulated

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_rect_doOverlap(l1_x, l1_y, r1_x, r1_y, l2_x, l2_y, r2_x, r2_y) → {boolean}

Checks is two rectangles are overlapping

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
l1_x float

rectangle 1 upper left x-coordinate

l1_y float

rectangle 1 upper left y-coordinate

r1_x float

rectangle 1 lower right x-coordinate

r1_y float

rectangle 1 lower right y-coordinate

l2_x float

rectangle 2 upper left x-coordinate

l2_y float

rectangle 2 upper left y-coordinate

r2_x float

rectangle 2 lower right x-coordinate

r2_y float

rectangle 2 lower right y-coordinate

See:
Returns:

overlapping - true if overlapping, false otherwise

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_removeCustomCanvasMethod()

Removes all handers associated with a custom canvas method

CADViewer Internal Command Groups: All.

  • @example

See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.

See:

cvjs_removeSelectedAndReturnOriginalStyle(rmid, _mySpaceArray) → {Object}

Remove a multiselected object and return the original style of that object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object object to add hatches

_mySpaceArray Object

custom array for multiselected spaces

See:
Returns:

attributesObject - object containing all styles in the selected object

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnIsSpaceMultipleSelected(rmid, spaceArray) → {boolean}

Checks is a given space already has been selected

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object object to add hatches

spaceArray array

array with { space, attrObj} over selected spaces

See:
Returns:

selected - true if selected, false otherwise

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnOriginalStyleAndRemoveSelected(rmid, mySpaceArray) → {Object}

Remove a multiselected object and return the original style of that object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object object to add hatches

mySpaceArray Object

custom array for multiselected spaces

See:
Returns:

attributesObject - object containing all styles in the selected object

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_returnSelectedOriginalStyles(rmid) → {Object}

Return the original style of a space object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
rmid string

Id of the Space Object object

See:
Returns:

attributesObject - object containing all styles in the selected object

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_sendCustomCanvasToBack(f_div)

Sends the custom canvas to back - used for drawings with static filled polygons

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_sendCustomCanvasToFront(f_div)

Brings the custom canvas to front - default

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of Element on which CADViewer is located

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setHrefOpenWindow(flag)

Sets flag to force href open window when clicking on objects

Parameters:
Name Type Description
flag *

, true = force href open window, default is false

cvjs_setSpacePolygonOnLayer(f_div)

On the Room Layer designated by the Space Management list, it searches for the encapsulating polygon at the location of mouse-click. If polygon is found a room object is created.

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_setZW100_Opacity(opacity)

Set the opacity of the rubberband for measurement snap

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
opacity float

ZW100 opacity

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_showObjectInSpaceObjectGroup(id_node, objectTag, type)

Show an object inside a Space Object Group

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id_node string

base object name(node) or id of graphics group

objectTag string

sub id tag, to be shown

type string

type of id_node, can be "id" or "node"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_showOnlyObjectInAllSpaceObjectGroups(objectTag)

Show only this object inside all Space Object Group with this object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
objectTag string

sub id tag, to be shown

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_showOnlyObjectInSpaceObjectGroup(id_node, objectTag, type)

Show only this object inside a Space Object Group

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
id_node string

base object name(node) or id of graphics group

objectTag string

sub id tag, to be shown

type string

type of id_node, can be "id" or "node"

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_spaceObjectClickHandlerControlAll(onoff)

Controls On/Off for pan and click operation on All Spaces

CADViewer Internal Command Groups: SpaceObjects.

Parameters:
Name Type Description
onoff boolean

true=on, false=off, default is on

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_spaceObjectClickHandlerControlID(onoff, spaceID)

Controls On/Off for pan and click operation on single Space

CADViewer Internal Command Groups: SpaceObjects.

Parameters:
Name Type Description
onoff boolean

true=on, false=off, default is on

spaceID String

ID of the space to control

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_spaceObjectOverlapAnyOtherObject(jsonObject, jsonElement, jsonValue)

Check Space Object overlap against all other objects based on a given rule

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
jsonObject *

search object

jsonElement *

the json element path to the evaluation rule for all other objects, for example ["customContent", "insertType"]

jsonValue *

the logical evaluation rule, for example "car"

See:
Returns:

boolean

Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_spaceObjectsOverlap(objectOne, objectTwo) → {boolean}

Checks if two spaceObjects overlap

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
objectOne *
objectTwo *
See:
Returns:

true if overlay, false otherwise

Type
boolean
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_SVG_x(x) → {float}

Returns the SVG x-coordinate of screen x-coordinate reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
x int

screen x-coordinate

See:
Returns:

x_svg - x-coordinate in SVG

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_SVG_x_toScreen(svgx) → {int}

Returns the screen x-coordinate of a SVG x-coordinate reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
svgx float

SVG x-coordinate

Returns:

x_svg - x-coordinate

Type
int

cvjs_SVG_y(y) → {float}

Returns the SVG y-coordinate of screen x-coordinate reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
y int

screen x-coordinate

See:
Returns:

y_svg - x-coordinate in SVG

Type
float
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjs_SVG_y_toScreen(svgy) → {int}

Returns the screen x-coordinate of a SVG x-coordinate reference point

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
svgy float

SVG x-coordinate

Returns:

x_svg - x-coordinate

Type
int

cvjsspace_addCircleSpaceObject(f_div)

Add a Space Object Circle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_addPolygonSpaceObject(f_div)

Add a Space Object Polygon

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_addRectangleSpaceObject(f_div)

Add a Space Object Rectangle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_changeSpaceObjectDisplayMode(f_div, displayModal)

Sets the mode of Space Object to either display or create

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

displayModal boolean

flag to display SpaceObjectEditModal, if undefined modal is true

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_clearSpaceObjects(f_div)

Deletes all Space Objects

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_copyCircleSpaceObject(f_div)

Copy a Space Object Circle

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_createNewJSonSpaceObject() → {Object}

Return a new JSON structure with default content: var jsonStructure = { "path": path, "tags": tags, "node": node, "area": area, "outerhtml": outerHTML, "occupancy": occupancy, "name": name, "type": type, "id": id, "defaultcolor": defaultcolor, "highlightcolor": highlightcolor, "selectcolor": selectcolor, "layer": layer, "group": group, "linked": linked, "attributes": attributes, "attributeStatus": attributeStatus, "displaySpaceObject": displaySpaceObject, "translate_x": translate_x, "translate_y": translate_y, "zvalue": "1", "scale_x": scale_x , "scale_y": scale_y , "rotate": rotate, "transform": transform, "svgx": svgx, "svgy": svgx, "dwgx": dwgx, "dwgy": dwgy , "customContent" : "customobject", "pageNumber" : pageNumber, "pageName" : pageName "block" : "", "blockAttributeId" : "", "blockAttributeCount" : "", "clickhandler" : "", "href" : "", "parent" : "" }

CADViewer Internal Command Groups: All.

See:
Returns:

jsonSpaceObject - Object with the entire space objects content

Type
Object
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_deleteSpaceObject(f_div)

Delete a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_displaySpaceObjectsStructure(f_div)

Display of Space Object structure in User Mode, with enabled seach panel

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_moveSpaceObject(f_div)

Interactively move a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_resizeSpaceImageObject(f_div)

Interactively resize a Space Image Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_resizeSpaceObject(f_div)

Interactively resize a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.  

                          

cvjsspace_rotateSpaceObject(f_div)

Interactively rotates a Space Object

CADViewer Internal Command Groups: All.

Parameters:
Name Type Description
f_div string

name of div containing CADViewer canvas

See:
Example
See CADViewer Reference Samples. These Samples implements selected interface commands and various API methods.