CADViewer JS API Reference

Members

cvjs_displayMagnifyingGlassFlag

REDLINE /STICKYNOTE SAVE LOAD - PRINT
Source:

cvjs_stickynote

REDLINE /STICKYNOTE SAVE LOAD - PRINT
Source:

defaultColor

default color for standard Space Object selection mode - not selected
Source:
default color for URL Hyperlinks - not selected
Source:
default color for URL Hyperlinks - not selected _ blank
Source:

defaultColor_linked

default color for Space Object supressPopUpModal mode - linked
Source:

defaultColor_unlinked

default color for Space Object supressPopUpModal mode - unlinked
Source:

highlight

default color for standard Space Object selection mode - highlighted
Source:
default color for URL Hyperlinks selection mode - highlighted
Source:

highlight_linked

highlight color for Space Object supressPopUpModal mode - linked
Source:

highlight_unlinked

highlight color for Space Object supressPopUpModal mode - unlinked
Source:

isSmartPhoneOrTablet

control variable for determinating smartphone or tablet
Source:

layerlist_offset_flag

Open the Layer List menu for layer handling
Source:

selectColor

default color for standard Space Object selection mode - selrcted
Source:
default color for URL Hyperlinks selection mode - selected
Source:

selectColor_linked

selected color for Space Object supressPopUpModal mode - linked
Source:

selectColor_unlinked

selected color for Space Object supressPopUpModal mode - unlinked
Source:

text_style_arial_9pt_normal

text style for adding text into Space Objects
Source:

text_style_arial_11pt_bold

text style for adding text into Space Objects
Source:

text_style_dialog

text style for adding text into Space Objects
Source:

vqStickyNotes

StickyNotes and Redlines are independent of nodes files
Source:

Methods

cvjs_activateSpaceObjectModal_Id(rmid)

Activate modal on Space Object
Parameters:
Name Type Description
rmid string Id of space object modal to activate
Source:

cvjs_activateSpaceObjectModal_Node(node)

Activate modal on Space Object
Parameters:
Name Type Description
node string Node of space object modal to activate
Source:

cvjs_addSVGClickHandler_onLoad(mode)

Set the clickhandler mode for SVG on load. The default is false The clicked object will be returned in the callback method: cvjs_SVGfileObjectClicked(id) , this method is user implemented
Parameters:
Name Type Description
mode boolean true: click handlers are added to objects on load, false: no handers added on load
Source:

cvjs_AddTextAndTBorderOnSpaceObject3Lines(txtLayer, nodeId, tborderId, leftScale, textId1, textString1, textStyle1, scaleText1, hexColorText1, textId2, textString2, textStyle2, scaleText2, hexColorText2, textId3, textString3, textStyle3, scaleText3, hexColorText3)

Add three lines of text, individually formatted and styled, inside a Space Object
Parameters:
Name Type Description
txtLayer string layer to apply the text
nodeId string nodeId of the graphical object in which to place the text
tborderId string Text Border Id of the new graphical object in which to place the text, of type "TBORDER_xxx"
leftScale float distance from the left border of Space Object, value between 0 and 1
textId1 string Text Id of the first text object, of type "TEXT_xxx"
textString1 string first line of text
textStyle1 object textstyle of text line 1, 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
scaleText1 string relative scale of text line 1, value between 0 and 1
hexColorText1 string color of text line 1 in hex form, for example: #AA00AA
textId2 string Text Id of the second text object, of type "TEXT_yyy"
textString2 string second line of text
textStyle2 object textstyle of text line 2, formattet as a java script object with css style elements
scaleText2 string relative scale of text line 2, value between 0 and 1
hexColorText2 string color of text line 2 in hex form, for example: #AA00AA
textId3 string Text Id of the third text object, of type "TEXT_zzz"
textString3 string third line of text
textStyle3 object textstyle of text line 3, formattet as a java script object with css style elements
scaleText3 string relative scale of text line 3, value between 0 and 1
hexColorText3 string color of text line 3 in hex form, for example: #AA00AA
Source:

cvjs_AddTextAndTBorderOnSpaceObjectId(txtLayer, Id, leftScale, textStringArr, textStyleArr, scaleTextArr, hexColorTextArr, clipping)

Add multiple of text, individually formatted and styled, inside a Space Object
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
textStyleArr 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
scaleTextArr array Array with relative scale of text lines, value between 0 and 1
hexColorTextArr array Array of color of text lines in hex form, for example: #AA00AA
clipping boolean true if clipping of text inside of Space Object, false if text to cross Space Object borders
Source:

cvjs_AddTextAndTBorderOnSpaceObjectNode(txtLayer, nodeId, leftScale, textStringArr, textStyleArr, scaleTextArr, hexColorTextArr, clipping)

Add multiple of text, individually formatted and styled, inside a Space Object
Parameters:
Name Type Description
txtLayer string layer to apply the text
nodeId string nodeId 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
textStyleArr 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
scaleTextArr array Array with relative scale of text lines, value between 0 and 1
hexColorTextArr array Array of color of text lines in hex form, for example: #AA00AA
clipping boolean true if clipping of text inside of Space Object, false if text to cross Space Object borders
Source:

cvjs_AddTextOnObject(txtLayer, nodeId, leftScale, textString1, textStyle1, scaleText1, hexColorText1, textString2, textStyle2, scaleText2, hexColorText2, textString3, textStyle3, scaleText3, hexColorText3)

Add three layers of text, individually formatted and styled, inside a Space Object
Parameters:
Name Type Description
txtLayer string layer to apply the text
nodeId string nodeId 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
textString1 string first line of text
textStyle1 object textstyle of text line 1, 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
scaleText1 string relative scale of text line 1, value between 0 and 1
hexColorText1 string color of text line 1 in hex form, for example: #AA00AA
textString2 string second line of text
textStyle2 object textstyle of text line 2, formattet as a java script object with css style elements
scaleText2 string relative scale of text line 2, value between 0 and 1
hexColorText2 string color of text line 2 in hex form, for example: #AA00AA
textString3 string third line of text
textStyle3 object textstyle of text line 3, formattet as a java script object with css style elements
scaleText3 string relative scale of text line 3, value between 0 and 1
hexColorText3 string color of text line 3 in hex form, for example: #AA00AA
Source:

cvjs_addUserIdToHiddenRedlineUsers(userId)

Add userId to list of redline and stickyNote users to be hidden (on load)
Parameters:
Name Type Description
userId string the userId to be added to the hidden users list
Source:

cvjs_addUserIdToLockedRedlineUsers(userId)

Add userId to list of redline and stickyNote users to be locked (on load)
Parameters:
Name Type Description
userId string the userId to be added to the hidden users list
Source:

cvjs_adjustMinimumLineThickness(precentage)

Adjust minimum line thickness
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
Source:

cvjs_AllGroupsOff()

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

cvjs_AllGroupsOn()

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

cvjs_allLayersInDrawingOn()

Sets all layers in drawing On
Source:

cvjs_AllLayersOff()

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

cvjs_AllLayersOn()

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

cvjs_allowFileLoadToServer(mode)

Enables file load through the icon interface, or allows it only through the encapsulating application
Parameters:
Name Type Description
mode boolean true for file load through File Manager, default is false
Source:

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

Apply a predefined pattern on a graphical Space Object
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"
colorHex string color of hatch in hex form, for example: #FF0000
fillOpacity float fill opacity of pattern, value between 0 and 1
Source:

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

Apply a predefined pattern on a graphical Space Object
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"
colorHex string color of hatch in hex form, for example: #FF0000
fillOpacity float fill opacity of pattern, value between 0 and 1
Source:

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

Apply a predefined pattern on a URL
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"
colorHex string color of hatch in hex form, for example: #FF0000
fillOpacity float fill opacity of pattern, value between 0 and 1
Source:

cvjs_ApplyRelativeLinearGradientOnObject_layerSort(layer, nodeId, xStart, yStart, xEnd, yEnd, startColor, middleColor, endColor, fillOpacity, layer2)

Apply a linear gradient, with definition of gradient vector, with three colors on a graphical Space Object
Parameters:
Name Type Description
layer string layer to apply the pattern
nodeId string nodeId of the graphical object
xStart float gradient vector x start point, value between 0 and 1
yStart float gradient vector y start point, value between 0 and 1
xEnd float gradient vector x end point, value between 0 and 1
yEnd float gradient vector y end point, value between 0 and 1
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
layer2 string layer which to prepend the gradient layer (typically the main Space Object layer)
Source:

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

Apply a standard linear gradient with two colors on a graphical Space Object
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
Source:

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

Apply a standard linear gradient with two colors on a graphical Space Object
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
Source:

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

Apply a standard linear gradient with three colors on a graphical Space Object
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
Source:

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

Apply a standard linear gradient with three colors on a graphical Space Object
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
Source:

cvjs_ApplyRelativeRadialGradientOnObject_layerSort(layer, nodeId, xC, yC, radius, startColor, middleColor, endColor, fillOpacity, layer2)

Apply a radial gradient, with definition of gradient vector, with three colors on a graphical Space Object
Parameters:
Name Type Description
layer string layer to apply the pattern
nodeId string nodeId of the graphical object
xC float gradient vector x start point, value between 0 and 1
yC float gradient vector y start point, value between 0 and 1
radius float gradient vector radius, value between 0 and 1
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
layer2 string layer which to prepend the gradient layer (typically the main Space Object layer)
Source:

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

Apply a standard radial gradient with two colors on a graphical Space Object
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
Source:

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

Apply a standard radial gradient with two colors on a graphical Space Object
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
Source:

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

Apply a standard radial gradient with three colors on a graphical Space Object
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
Source:

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

Apply a standard radial gradient with three colors on a graphical Space Object
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
Source:

cvjs_calibrateMeasurement()

Calibrate measurement
Source:
Clears all image links from the canvas
Source:

cvjs_clearAllRedlineHiddenUsers()

Clear all redline and stickyNote userId from hidden users list
Source:

cvjs_clearAllRedlineLockedUsers()

Clear all redline and stickyNote userId from locked users list
Source:

cvjs_clearCurrentRedline()

Clear all redlines currently visible
Source:
Clears the drawing from any highlight or modals active on Hyperlinks
Source:

cvjs_clearDrawingRedlines()

Clears the drawing from any redlines
Source:

cvjs_clearDrawingSpaceObjects()

Clears the drawing from any highlight or modals active on Space Objects
Source:

cvjs_clearDrawingStickyNotes()

Clears the drawing from any highlight or modals active on StickyNotes
Source:

cvjs_clearLayer(layer) → {none}

Clears the current layer
Parameters:
Name Type Description
layer string name of layer to be cleared
Source:
Returns:
Type
none

cvjs_clearTextLayer(layer) → {none}

Clears the current layer and resets Text border objects
Parameters:
Name Type Description
layer string name of layer to be cleared
Source:
Returns:
Type
none

cvjs_conversion_addAXconversionParameter()

Clears the AutoXchange conversion control parameter for server based conversion
Source:

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 JS
Source:

cvjs_conversion_clearAXconversionParameters()

Clears the AutoXchange conversion control parameter for server based conversion
Source:

cvjs_conversion_getContentResponse()

Get the current type of content response
Source:
Returns:
string - Returns type of content response - "file | embedded | stream"

cvjs_conversion_setContentFormat(contentFormat)

Sets control parameter for conversion
Parameters:
Name Type Description
contentFormat string "DWG | DXF| DWF | DGN - DGN currently not implemented",
Source:

cvjs_conversion_setContentResponse(userLabel)

Sets control parameter for conversion
Parameters:
Name Type Description
userLabel string " optional label returned in the response",,
Source:

cvjs_conversion_setContentType(contentType)

Sets control parameter for conversion
Parameters:
Name Type Description
contentType string "file | embedded | stream"
Source:

cvjs_conversion_setUserLabel(userLabel)

Sets control parameter for conversion
Parameters:
Name Type Description
userLabel string " optional label returned in the response",,
Source:

cvjs_currentHost() → {string}

Finds the current host of the library
Source:
Returns:
host - current hostlocation
Type
string

cvjs_currentMaxNodeId() → {string}

Retrieves the current maximum Node Id for all Space Objects, retrieve and increment when creating new graphical objects
Deprecated:
  • Yes
Source:
Returns:
maxNode - the current maximum node id
Type
string

cvjs_currentMaxSpaceNodeId() → {string}

Retrieves the current maximum Node Id for all Space Objects, retrieve and increment when creating new graphical objects
Source:
Returns:
maxNode - the current maximum node id
Type
string

cvjs_currentURL() → {string}

Finds the current url of the library
Source:
Returns:
url - current location
Type
string

cvjs_debugMode(debug)

Sets debug mode
Parameters:
Name Type Description
debug boolean true for debug traces, false otherwise
Source:

cvjs_displayCustomToolTip(id)

Set a custom tooltip overwriting the standard tooltip displaying either Name or Id
Parameters:
Name Type Description
id string id of the custom tooltip object to be displayed
Source:

cvjs_displayInformationModal(text)

Activates and displays the information modal with text
Parameters:
Name Type Description
text String string to display
Source:

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.
Source:

cvjs_drawRedlineArrow()

Draws a redline polyline with arrow - uses global settings of color and width
Source:

cvjs_drawRedlineCloud()

Draws a redline cloud - uses global settings of color and width
Source:

cvjs_drawRedlineFilledPolygon()

Draws a redline filled polygon - uses global settings of color and width
Source:

cvjs_drawRedlineFilledRectangle()

Draws a redline filled rectangle - uses global settings of color and width
Source:

cvjs_drawRedlinePolyline()

Draws a redline polyline - uses global settings of color and width
Source:

cvjs_drawRedlineRectangle()

Draws a redline rectangle - uses global settings of color and width
Source:

cvjs_drawRedlineText()

Draws a redline text - uses global settings of color
Source:

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.
Source:

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.
Source:

cvjs_drawSpaceObject_FilledRedlineRectangle()

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

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.
Source:

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.
Source:

cvjs_drawSpaceObject_RedlineArrowPolyline()

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

cvjs_drawSpaceObject_RedlineCloud()

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

cvjs_drawSpaceObject_RedlineFilledPolygon()

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

cvjs_drawSpaceObject_RedlinePolyline()

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

cvjs_drawSpaceObject_RedlineRectangle()

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

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.
Source:

cvjs_dynamicResizeTextOnSpaceObject(nodeUnderbar)

Dynamic resize and change location of text objects drawn on Space Object
Parameters:
Name Type Description
nodeUnderbar string the data node containing the Space Object to which the text is associated
Source:

cvjs_dynamicResizeTextOnSpaceObject_Id(id)

Dynamic resize and change location of text objects drawn on Space Object
Parameters:
Name Type Description
id string the id of the data node containing the Space Object to which the text is associated
Source:

cvjs_dynamicResizeTextOnSpaceObject_Name(name)

Dynamic resize and change location of text objects drawn on Space Object
Parameters:
Name Type Description
name string the name of the data node containing the Space Object to which the text is associated
Source:

cvjs_encapsulateUrl_callback(true:)

Encapsulate Url in JavaScript callback method cvjs_Url_callback(). Developer gets control over all hyperlinks in drawing
Parameters:
Name Type Description
true: boolean enable callback method false: disable callback method (link directly from drawing)
Source:

cvjs_fileLoad_setContentFormat(fileFormat)

Sets fileformat for file-load
Parameters:
Name Type Description
fileFormat string "PNG, JPG, GIF", to set bitmap, "JS" for standard load
Source:

cvjs_getAttributeFromSpaceObjectNode(NodeId, name) → {object}

Retrieves an attribute value from a Space Object
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
Source:
Returns:
value - Returns the value pair corresponding to the given name
Type
object

cvjs_getAttributeStatus(NodeId) → {object}

Retrieves the attribute status from a Space Object
Parameters:
Name Type Description
NodeId string Node id of the Space Object in which to retrive the status
Source:
Returns:
value - Returns the attributeStatus
Type
object

cvjs_getRedlineHiddenUsersList() → {String}

Lists all redline and stickyNote userId from hidden users list
Source:
Returns:
value - Returns Id list
Type
String

cvjs_getRedlineLockedUsersList() → {String}

Lists all redline and stickyNote userId from locked users list
Source:
Returns:
value - Returns Id list
Type
String

cvjs_getSpaceObjectIdfromNode(Id) → {object}

Returns the first Id in the Space Object structure based on a nodeId
Parameters:
Name Type Description
Id string Node id of the Space Object in which to retrive the id data filed
Source:
Returns:
value - Returns the id corresponding to the given nodeId, -1 if not found
Type
object

cvjs_getSpaceObjectIdList() → {array}

Returns a list with all Ids in the Space Object structure
Source:
Returns:
value - Returns Id list
Type
array

cvjs_getSpaceObjectNamefromId(Id) → {object}

Returns the first Name in the Space Object structure based on an Id
Parameters:
Name Type Description
Id string Id of the Space Object in which to retrive the name
Source:
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
Parameters:
Name Type Description
NodeId string Node id of the Space Object in which to retrive the Name data filed
Source:
Returns:
value - Returns the Name corresponding to the given nodeId, -1 if not found
Type
object

cvjs_getSpaceObjectNodefromId(Id) → {object}

Returns the first NodeId in the Space Object structure based on an Id
Parameters:
Name Type Description
Id string Id of the Space Object in which to retrive the Node id
Source:
Returns:
value - Returns the NodeId corresponding to the given Id, -1 if not found
Type
object

cvjs_GroupOff(layer)

Turn single Object Space group off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name Type Description
layer string name of group to turn off
Source:

cvjs_GroupOn(layer)

Turn single Object Space group on - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name Type Description
layer string name of group to turn on
Source:

cvjs_GroupOn_AllOff(layer)

Turn single Object Space group on, all other groups are turned off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name Type Description
layer string name of group to turn on
Source:

cvjs_GroupOn_OthersOff(layer)

Turn single Object Space group on, all other groups are turned off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name Type Description
layer string name of group to turn on
Source:

cvjs_hideAllRedlines_HiddenUsersList()

Hide all redlines with userId on the Hidden Users List
Source:

cvjs_highlightAllSpaceObjects(roomstyle, layer)

Highlights all Space Objects with a given style on a given layer
Parameters:
Name Type Description
roomstyle object JSON formattet object containg the styling of the Space Objects
layer string layer on which to draw the highlights
Source:

cvjs_highlightSpaceObjectId(Id, roomstyle, layer)

Highlights a Space Object with a given style on a given layer
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 layer on which to draw the highlight
Source:

cvjs_highlightURL(Id, roomstyle, layer)

Highlights a URL with a given style on a given layer
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
Source:

cvjs_idObjectClicked() → {string}

Identify the id of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Source:
Returns:
objectId - The objectId is (-1) in case of no current object selected
Type
string

cvjs_IdObjectClicked() → {string}

Identify the id of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Source:
Returns:
objectId - The objectId is (-1) in case of no current object selected
Type
string

cvjs_Init_ConversionServer(rest_api_url, rest_api_php, username, password)

Set up CADViewer JS for the call to the server side custom implementation of the API controlling conversions of DWG,DXF, and DWF files through AutoXchange
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
Source:

cvjs_InitCADViewerJS(floorplan_div, image, javascripts_folder)

Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS 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/
Source:

cvjs_InitCADViewerJS_highLight(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes)

Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS is allocated
cvjsRoomPolygonBaseAttributes object javascript object containing fill, color and stroke properties for display of Space Object roompolygons
cvjsRoomPolygonHighlightAttributes object javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons
cvjsRoomPolygonSelectAttributes object javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons
Source:

cvjs_InitCADViewerJS_highLight_popUp(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)

Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS is allocated
cvjsRoomPolygonBaseAttributes object javascript object containing fill, color and stroke properties for display of Space Object roompolygons
cvjsRoomPolygonHighlightAttributes object javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons
cvjsRoomPolygonSelectAttributes 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
Source:

cvjs_InitCADViewerJS_highLight_popUp_dual_Id(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody, cvjsPopUpBody2)

Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS is allocated
cvjsRoomPolygonBaseAttributes object javascript object containing fill, color and stroke properties for display of Space Object roompolygons
cvjsRoomPolygonHighlightAttributes object javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons
cvjsRoomPolygonSelectAttributes 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
Source:

cvjs_InitializeModals()

Initializes CADViewer JS modals, method to set up modals for print, background change, redline color and thickness change
Source:

cvjs_interactiveLayerOff()

Turn a single layer on interactively
Source:

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.
Parameters:
Name Type Description
layer string name of layer to turn off
Source:

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.
Parameters:
Name Type Description
layer string name of layer to turn on
Source:

cvjs_LayerOn_AllOff(layer)

Turn single Object Space layer on, turn all other layers off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name Type Description
layer string name of layer to turn on
Source:

cvjs_LayerOn_OthersOff()

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

cvjs_LoadDrawing(floorplan_div, FileName)

Loads a drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS is allocated
FileName string the name and path to the location of the CADViewer JS drawing files to load in, the path is either absolute or relative to the document in which CADViewer JS is invoked
Source:

cvjs_LoadDrawing(floorplan_div, FileNamePath, FileNameNoExtension)

Loads a drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS is allocated
FileNamePath string the filepath to the location of the CADViewer JS drawing files to load in, the path is either absolute or relative to the document in which CADViewer JS is invoked
FileNameNoExtension string file name of the drawing without extension (CADViewer JS will automatically genrate naming and load in files associated with the file name)
Source:

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

Loads a DWG drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods The method connects to the TailorMade Restful API for conversion of DWG and DWF files
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS 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 JS 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
Source:

cvjs_LoadDrawing_SVG(floorplan_div, FileNamePath, FileName, ScriptPath)

Loads a SVG drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods
Parameters:
Name Type Description
floorplan_div string the SVG canvas object to which CADViewer JS 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 JS is invoked
FileName string file name of the SVG drawing
ScriptPath string relative location of the javascript folder from the calling document
Source:

cvjs_loadDrawingsWithSpaceObjects()

Opens the File Loader Modal to load and convert drawing with space objects
Source:

cvjs_lockAllRedlines_LockedUsersList()

Lock all redlines with userId on the Lock Users List
Source:

cvjs_Measurement()

Calibrate measurement
Source:

cvjs_NameObjectClicked() → {string}

Identify the name of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Source:
Returns:
Name - The Name is (-1) in case of no current object selected
Type
string

cvjs_newLayer(layer) → {object}

Creates a new layer
Parameters:
Name Type Description
layer string name of layer to be created
Source:
Returns:
layerObject - Returns a new layer as a group on the SVG canvas
Type
object

cvjs_NodeObjectClicked() → {string}

Identify the node identifier of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Source:
Returns:
nodeId - The nodeId is (-1) in case of no current object selected
Type
string

cvjs_openFileLoadToServer(myServerPathToFloorplans)

Calls the file manager, set the enable file manager load to true prior to calling this method
Parameters:
Name Type Description
myServerPathToFloorplans string full path to the location of the drawings (typically /home/myserver/drawings/floorplans/)
Source:

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.
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
Source:

cvjs_Print()

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

cvjs_printCanvasPaperSize()

Funtion to print to papersize, based on settings provided in cvjs_setPrintOrientation(), cvjs_setPrintResolutionDpi() and cvjs_setPrintPaperSize()
Source:

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
Parameters:
Name Type Description
flag boolean true for remove, false to leave as is
Source:

cvjs_resetTextOnSpaceObject(nodeUnderbar)

Reset the location and size of text objects drawn on Space Object
Parameters:
Name Type Description
nodeUnderbar string the data node containing the Space Object to which the text is associated
Source:

cvjs_resetTextOnSpaceObject_Id(name-)

Reset the location and size of text objects drawn on Space Object
Parameters:
Name Type Description
name- string id of the data node containing the Space Object to which the text is associated
Source:

cvjs_resetTextOnSpaceObject_Name(name-)

Reset the location and size of text objects drawn on Space Object
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
Source:

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
Source:

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
Source:

cvjs_restApiConverter()

Returns the recommended converter for this library
Source:

cvjs_restApiConverterVersion()

Returns the minimum recommended converter version number for this library
Source:
Saves all image links
Source:

cvjs_searchReplaceText(searchString, replaceString)

Text Search; finds a text string in the drawing, and zooms over the search result
Parameters:
Name Type Description
searchString string the text string to search after
replaceString string the text string to replace with
Source:

cvjs_searchText(searchString, zoomFactor)

Text Search; finds a text string in the drawing, and zooms over the search result
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
Source:

cvjs_searchTextInstance(searchString, zoomFactor, textInstance)

Text Search; finds a text string in the drawing, and zooms over the search result
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
Source:

cvjs_setAttributeInSpaceObjectNode(NodeId, name, value)

Sets an attribute value in a Space Object
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
Source:

cvjs_setAttributeStatus(NodeId, attributeStatus)

Retrieves the attribute status from a Space Object
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"
Source:

cvjs_setBackgroundColor()

Calls modal for setting background color
Source:

cvjs_setBackgroundColorHex(color)

Set the background color of CADViewer JS canvas, using HEX
Parameters:
Name Type Description
color hex of background, hex string, omit #
Source:

cvjs_setCallbackForModalDisplay(callbacForkModalDisplay, customModalPopUpBody, populateMyCustomModalPopUpBody)

Space Object modals control for external retrieval of modal data.
Parameters:
Name Type Description
callbacForkModalDisplay 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
Source:

cvjs_setCallbackMeasurement(callbackMode)

Sets measurements to be echoed through method cvjs_measurementCallback(cvjs_currentMeasurementLength, cvjs_units);
Parameters:
Name Type Description
callbackMode boolean false is default, true if measurement shall be echoed through method
Source:

cvjs_setCallbackQuickCount(callbackMode)

Sets quickcounts to be echoed through method cvjs_quickcountCallback(cvjs_quickCountCounter);
Parameters:
Name Type Description
callbackMode boolean false is default, true if Quick Counts shall be echoed through method
Source:

cvjs_setConverter(converter, version)

Set the AutoXchange converter name and version to be used for the Rest conversion call
Parameters:
Name Type Description
converter string converter name
version string converter version
Source:

cvjs_setConverterCredentials(username, password)

Set the username and password to be used for the Rest conversion call
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
Source:

cvjs_setCreationMode(cvjs_creationMode)

Sets the display mode of Space Object modals
Parameters:
Name Type Description
cvjs_creationMode boolean false: standard modal on Space Object click as defined through setup method: InitCADViewerJS_ , true: modal is supressed, tooltip is ID of object, color setting is defined through the "linked" database field of the object.
Source:

cvjs_setCurrentNodeValues(currentNode_underbar, currentNode_name, currentNode_id, currentNode_layer, currentNode_group, currentNode_attributes, currentNode_attributeStatus, currentNode_type, currentNode_tags, currentNode_occupancy, currentNode_linked)

Sets the current Space Node values, these settings will be used to intialize space objects subsequently drawn with the draw methods
Parameters:
Name Type Description
currentNode_underbar string the NodeId linking data with graphical objects, of the form "NODE_xxx", where xxx is a number
currentNode_name string name of the space object to be visualized at the modal header
currentNode_id string id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries
currentNode_layer string layer of the Space Object
currentNode_group string group of the Space Object
currentNode_attributes string a list of attributes for the Space Object
currentNode_attributeStatus string status of attributes list, can be populated or unpopulated, controls if data is pulled externally
currentNode_type string the type attribute of the Space Object, the type is displayed at the modal header
currentNode_tags string list of tags assocated with the object, for retrieval at custom developed highlight
currentNode_occupancy string tag to describe occupancy, for retrieval at custom developed highlight
currentNode_linked boolean boolean variable to tell if object is associated with a database object or not. Depending on this flag highlight will differ. deprecated
Source:

cvjs_setCurrentRedlineValues(currentRedline_underbar, currentRedline_name, currentRedline_id, currentRedline_layer, currentRedline_group, currentRedline_color, currentRedline_StrokeWidth)

Sets the current Redlines values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name Type Description
currentRedline_underbar string the NodeId linking data with graphical objects, of the form "RED_xxx", where xxx is a number
currentRedline_name string id of the Redline, association to user producing markup
currentRedline_id string id of the Redline
currentRedline_layer string layer of the Redline
currentRedline_group string group of the Redline
currentRedline_color string color of the Redline as a hex values, for example "#FF0000".
currentRedline_StrokeWidth float width of the Redline
Source:

cvjs_setCurrentRedlineValues_All(currentRedline_underbar, currentRedline_name, currentRedline_id, currentRedline_layer, currentRedline_group, currentRedline_color, currentRedline_StrokeWidth, currentRedline_fill, currentRedline_fill_opacity, currentRedline_transform, currentRedline_username, currentRedline_userid, currentRedline_currentPage, currentRedline_polypath_arrow, currentRedline_triangle_design, currentRedline_redline_text)

Sets the current Redlines values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name Type Description
currentRedline_underbar string the NodeId linking data with graphical objects, of the form "RED_xxx", where xxx is a number
currentRedline_name string id of the Redline, association to user producing markup
currentRedline_id string id of the Redline
currentRedline_layer string layer of the Redline
currentRedline_group string group of the Redline
currentRedline_color string color of the Redline as a hex values, for example "#FF0000".
currentRedline_StrokeWidth float width of the Redline
currentRedline_fill string color of the Redline fill values, for example "#FF0000".
currentRedline_fill_opacity float fill opacity of filled redline
currentRedline_transform string transform (redline arrow only)
currentRedline_username string redline username
currentRedline_userid string redline userid
currentRedline_currentPage int page on which the redline is
currentRedline_polypath_arrow string arrow redline geometry
currentRedline_triangle_design string arrow redline geometry
currentRedline_redline_text string text object in redline text
Source:

cvjs_setCurrentRedlineValues_Color(currentRedline_color)

Sets the current Redlines value
Parameters:
Name Type Description
currentRedline_color string color of the Redline as a hex values, for example "#FF0000".
Source:

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
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
Source:

cvjs_setCurrentRedlineValues_NameUserid(currentRedline_userid)

Sets the current Redlines name and userid values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name Type Description
currentRedline_userid string redline userid
Source:

cvjs_setCurrentRedlineValues_StokeWidth(currentRedline_StrokeWidth)

Sets the current Redlines value
Parameters:
Name Type Description
currentRedline_StrokeWidth float width of the Redline
Source:

cvjs_setCurrentRedlineValues_Userid(currentRedline_userid)

Sets the current Redlines values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name Type Description
currentRedline_userid string redline userid
Source:

cvjs_setCurrentSpaceObjectNodeValues(currentNode_underbar, currentNode_name, currentNode_id, currentNode_layer, currentNode_group, currentNode_attributes, currentNode_attributeStatus, currentNode_type, currentNode_tags, currentNode_occupancy, currentNode_linked)

Sets the current Space Node values, these settings will be used to intialize space objects subsequently drawn with the draw methods
Parameters:
Name Type Description
currentNode_underbar string the NodeId linking data with graphical obejcts, of the form "NODE_xxx", where xxx is a number
currentNode_name string name of the space object to be visualized at the modal header
currentNode_id string id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries
currentNode_layer string layer of the Space Object
currentNode_group string group of the Space Object
currentNode_attributes string a list of attributes for the Space Object
currentNode_attributeStatus string status of attributes list, can be populated or unpopulated, controls if data is pulled externally
currentNode_type string the type attribute of the Space Object, the type is displayed at the modal header
currentNode_tags string list of tags assocated with the object, for retrieval at custom developed highlight
currentNode_occupancy string tag to describe occupancy, for retrieval at custom developed highlight
currentNode_linked boolean boolean variable to tell if object is associated with a database object or not. Depending on this flag highlight will differ.
Source:

cvjs_setCurrentStickyNoteValues(currentStickyNote_underbar, currentStickyNote_name, currentStickyNote_id, currentStickyNote_layer, currentStickyNote_group, currentStickyNote_text, currentStickyNote_userid, currentStickyNote_date, currentStickyNote_linked)

Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods
Parameters:
Name Type Description
currentStickyNote_underbar string the NodeId linking data with graphical objects, of the form "NOTE_xxx", where xxx is a number
currentStickyNote_name string name of the Sticky Note - user name displayed at StickyNote modal
currentStickyNote_id string id of the Sticky Note object, used for pop-up highlight
currentStickyNote_layer string layer of the Sticky Note
currentStickyNote_group string group of the Sticky Note
currentStickyNote_text string text in the Sticky Note textfield, typically this is initially empty as users interactively add text to StickyNotes.
currentStickyNote_userid string UserID of StickyNotes.
currentStickyNote_date string creation date of the StickyNotes.
currentStickyNote_linked boolean boolean variable to tell if object is linked or not, internally controlled
Source:

cvjs_setCurrentStickyNoteValues_All(currentStickyNote_underbar, currentStickyNote_name, currentStickyNote_id, currentStickyNote_layer, currentStickyNote_group, currentStickyNote_text, currentStickyNote_userid, currentStickyNote_date, currentStickyNote_linked, currentStickyNote_transform, currentStickyNote_currentPage)

Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods
Parameters:
Name Type Description
currentStickyNote_underbar string the NodeId linking data with graphical objects, of the form "NOTE_xxx", where xxx is a number
currentStickyNote_name string name of the Sticky Note - user name displayed at StickyNote modal
currentStickyNote_id string id of the Sticky Note object, used for pop-up highlight
currentStickyNote_layer string layer of the Sticky Note
currentStickyNote_group string group of the Sticky Note
currentStickyNote_text string text in the Sticky Note textfield, typically this is initially empty as users interactively add text to StickyNotes.
currentStickyNote_userid string UserID of StickyNotes.
currentStickyNote_date string creation date of the StickyNotes.
currentStickyNote_linked boolean boolean variable to tell if object is linked or not, internally controlled
currentStickyNote_transform boolean transformation of note
currentStickyNote_currentPage string page on which the note is on
Source:

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
Parameters:
Name Type Description
currentStickyNote_name string name of the Sticky Note - user name displayed at StickyNote modal
currentStickyNote_userid string UserID of StickyNotes.
Source:

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
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.
Source:

cvjs_setCustomCallbackMethodOnLoadEnd(callbackMethodOnLoadEnd, myOnLoadEndMethod)

Set custom call back method for OnLoadEnd when drawings are loaded.
Parameters:
Name Type Description
callbackMethodOnLoadEnd boolean false: default - no custom method , true: custom method defined.
myOnLoadEndMethod function : method that is executed OnLoadEnd of drawing
Source:

cvjs_setCustomToolTip(customtooltip)

Set a custom tooltip overwriting the standard tooltip displaying either Name or Id
Parameters:
Name Type Description
customtooltip boolean true for custom tooltip, false otherwise
Source:

cvjs_setCustomToolTipValue(id, contentArr)

Set the content of a custom tooltip, based on the id of the object
Parameters:
Name Type Description
id string id for tooltip
contentArr arr content for custom tooltip, array with lines of text
Source:

cvjs_setDefaultJSPath(path)

Set the script paths to load default drawings for encapsulate png rendering, typically ../javascripts
Parameters:
Name Type Description
path string to default script-file folder
Source:

cvjs_setGenericColor()

Calls modal for setting redline color
Source:

cvjs_setIconInterfaceControls_ClassicSkin()

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

cvjs_setIconInterfaceControls_ClassicSkin_DevicesSizeOnly()

Set the classic icon desk, device size on all platforms
Source:

cvjs_setIconInterfaceControls_DisableIcons()

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

cvjs_setIconInterfaceControls_ImageInsert()

Sets the icon interface for enabling image insert
Source:

cvjs_setIconInterfaceControls_MimimumDisk()

Set minimum icon desk, same size on all platforms
Source:

cvjs_setIconInterfaceControls_PageModal(mode, disableNavButtons)

Disable/enable page change modal
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
Source:

cvjs_setIconInterfaceControls_PanZoomDisk()

Set panzoom desk, same size on all platforms
Source:

cvjs_setIconInterfaceControls_SpaceManagement()

Sets the icon interface for enabling space management
Source:

cvjs_setIconInterfaceControls_ViewingOnly()

Sets the icon interface for viewing, layerhanding, measurement, etc. only
Source:

cvjs_setInsertImageObjectsAbsolutePath(path, serverPath)

Sets the basolute path for the insert image object location, relative path is not used
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/"
Source:

cvjs_setInsertImageObjectsRelativePath(path, serverPath)

Sets the relative path for the insert image object location
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/"
Source:

cvjs_setJavaScriptsAbsoluteFolder(folder)

Set javascripts absolute folder url path. Used for print object to find scripts folder to access jquery and ajax
Parameters:
Name Type Description
folder string absolute jQuery javascripts folder url path
Source:

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
Parameters:
Name Type Description
folder string absolute jQuery javascripts folder url path and name
Source:

cvjs_setLicenseKeyDirect()

Pass over the license key directly The command will activate the license key
Source:

cvjs_setLicenseKeyPath()

Set the license key path, typically a path relative to the calling document, for example as ../javascripts The command will activate the license key
Source:

cvjs_setNoModalMode(cvjs_modalMode)

Sets the display mode of Space Object modals
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
Source:

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.
Parameters:
Name Type Description
panState boolean true for pan with thumbnails, false for pan with original image
Source:

cvjs_setPasswordProtectionServerAccess(passwordprotection)

Sets password protection for Server Access
Parameters:
Name Type Description
passwordprotection boolean true for passwordprotection, false otherwise
Source:

cvjs_setPhpPath(path)

Sets the location to the php folder
Parameters:
Name Type Description
path string current location of php scripts, typically ../php/
Source:

cvjs_setPhpUploadPath(Url)

Sets the location to the php upload folder, this can be on a different domain
Parameters:
Name Type Description
Url string location of upload_2.php document
Source:

cvjs_setPrintObjectPath(path)

Sets the location to the print objects
Parameters:
Name Type Description
path string location of print object relative to Controller, can also use absolute paths standard is "./temp_print/"
Source:

cvjs_setPrintObjectPathAbsolute(pathUrl, absolutePathServer)

Sets the location to the print objects
Parameters:
Name Type Description
pathUrl string location of print objects, web path
absolutePathServer string location of print objects, server side absolute path
Source:

cvjs_setPrintOrientation(orientation)

Sets the print orientation
Parameters:
Name Type Description
orientation string print orientation, portrait or landscape
Source:

cvjs_setPrintPaperSize(papersize)

Sets the paper size of print output
Parameters:
Name Type Description
papersize string String containg paper size, allowed settings are: A4, A3, A2, US LETTER, ANSI A, ANSI B, ANSI C
Source:

cvjs_setPrintResolutionDpi(dpi)

Sets the print resolution
Parameters:
Name Type Description
dpi int print resolution in dpi, minumum is 75dpi, standard is 300
Source:

cvjs_setRedlineColor()

Calls modal for setting redline color
Source:

cvjs_setRedlinesAbsolutePath(path, serverPath)

Sets the absolute path for the redlines location, relative path is not used
Parameters:
Name Type Description
path string abslute URL to the redlines location
serverPath string absolute path to the redlines location, "/home/cadviewerjs/redlines/"
Source:

cvjs_setRedlinesRelativePath(serverPath, path)

Sets the relative path for the redlines location
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"
Source:

cvjs_setRedlineThickness()

Calls modal for setting redline color
Source:

cvjs_setRelativeScriptsPath(scriptsPath)

Set the scripts path to folder with CADViewer JS javascripts
Parameters:
Name Type Description
scriptsPath string paths to Scripts, typically "../javascripts"
Source:

cvjs_setRestApiController(myConverterDoc)

Set the engine controller document handling conversions
Parameters:
Name Type Description
myConverterDoc string name of the document handling conversions
Source:

cvjs_setRestApiControllerLocation(myAXlocation)

Set the engine controller location for this library,
Parameters:
Name Type Description
myAXlocation string location of the server side autoXchange structure
Source:

cvjs_setServerAccessToPost(flag)

Sets ajax call for server access call for Servlets $.ajax({ type: 'POST', url: serverUrl, data: JSON.stringify(object),
Parameters:
Name Type Description
flag boolean true for servlets, false standard php case
Source:

cvjs_setServerAccessToServlet(flag)

Sets ajax call for server access call for Servlets $.ajax({ url: "jsonservlet - cvjs_setRestApiControllerLocation + cvjs_setRestApiController", type: 'POST', dataType: 'json', data: JSON.stringify(article), contentType: 'application/json', mimeType: 'application/json',
Parameters:
Name Type Description
flag boolean true for servlets, false standard php case
Source:

cvjs_setServerAppendFileHandler(handlerName)

Sets the name of server side append-file controller document
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setServerAppendFileHandlerPrint(handlerName)

Sets the name of server side append-file controller document for print
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setServerDeleteFileHandler(handlerName)

Sets the name of server side delete-file controller document
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setServerDeleteFileHandlerPrint(handlerName)

Sets the name of server side delete-file controller document for print
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setServerFileLocation(myServerPathToFloorplans, floorplanPath, floorplanUrl, username, password)

Set up the location of folder in server in which files are upload to and accessed from
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
Source:

cvjs_setServerFileLocation_AbsolutePaths(myServerPathToFloorplans, floorplanPath, username, password)

Set up the location of folder in server in which files are upload to and accessed from
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
Source:

cvjs_setServerHandlersPath(path)

Sets the location of the server side handers for load, save, append and print controls
Parameters:
Name Type Description
path string location of print handlers, in the standard case this in the "/php/" folder with redline and file controllers
Source:

cvjs_setServerLoadHandlerRedlines(handlerName)

Sets the name of server side load-file controller document for redline load
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setServerSaveFileHandler(handlerName)

Sets the name of server side save-file controller document
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setServerSaveFileHandlerPrint(handlerName)

Sets the name of server side save-file controller document for print
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setServerSaveHandlerRedlines(handlerName)

Sets the name of server side save-file controller document for redline save
Parameters:
Name Type Description
handlerName string name of the controller/handler document
Source:

cvjs_setStickyNoteRedlineUrl(file)

Sets the name and url of the redline file to load, The redline file is has the extension .js
Parameters:
Name Type Description
file string String containg url and name of redline.js file
Source:

cvjs_setStickyNoteSaveRedlineUrl(file)

Sets the name and url of the redline file to save. The redline file is has the extension .js
Parameters:
Name Type Description
file string String containg url and name of redline.js file
Source:

cvjs_setSupressHyperlinkColors(supressflag)

Sets the the response of
Parameters:
Name Type Description
supressflag boolean true to supress hyperlink colors, false to keep standard highlight
Source:

cvjs_setUrl_singleDoubleClick(click)

Sets the click response of URl links to either single click or double click
Parameters:
Name Type Description
click int 1: single click 2: double click
Source:

cvjs_sortLayers_insertAfter(layer1, layer2) → {boolean}

Sort two layers in order, insert layer2 after layer1
Parameters:
Name Type Description
layer1 string name of layer one
layer2 string name of layer two
Source:
Returns:
- true if sorted, false otherwise
Type
boolean

cvjs_sortLayers_prepend(layer1, layer2) → {boolean}

Sort two layers in order, prepend layer2
Parameters:
Name Type Description
layer1 string name of layer one
layer2 string name of layer two
Source:
Returns:
- true if sorted, false otherwise
Type
boolean

cvjs_sortLayersInOrder(layer1, layer2) → {boolean}

Sort two layers in order
Parameters:
Name Type Description
layer1 string name of layer one
layer2 string name of layer two
Source:
Returns:
- true if sorted, false otherwise
Type
boolean

cvjs_startSearchText()

Calls the interactive modal for text search
Source:

cvjs_StickyNoteClicked() → {string}

Identify the node identifier of the last Sticky Note selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Source:
Returns:
nodeId - The nodeId is (-1) in case of no current object selected
Type
string

cvjs_swapLayersInDrawing()

Swap drawing layers On/Off
Source:

cvjs_updateDrawingRedlines()

Update redlines after page change
Source:

cvjs_version() → {string}

Display the current version number of the CADViewer JS toolkit and viewer
Source:
Returns:
version - current version number
Type
string

cvjs_windowResize(doResize, topRows, widthReduction, floorplan, wrapper)

Resize CADViewer JS canvas after browser window changes
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 $(window).resize(function() {}
topRows int height of top rows in pixels
widthReduction int with size of external elements in pixel, full window relative canvas size
floorplan string name of SVG element containing canvas
wrapper string name of wrapper div containing floorplan canvas
Source:

cvjs_windowResize_position(doResize, floorplan)

Resize CADViewer JS canvas after browser window changes, automatic adjustment based on canvas size and location
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 $(window).resize(function() {}
floorplan string name of SVG element containing canvas
Source:

cvjs_windowResize_position_border(doResize, border, floorplan)

Resize CADViewer JS canvas after browser window changes, automatic adjustment based on canvas size and location
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 $(window).resize(function() {}
border float border size in pixels
floorplan string name of SVG element containing canvas
Source:

cvjs_windowResize_position_fixedHeightWidthRelation(doResize, hwRelation, floorplan)

Resize CADViewer JS canvas after browser window changes, automatic adjustment based on canvas size and location
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 $(window).resize(function() {}
hwRelation float relationship between height and width of canvas element
floorplan string name of SVG element containing canvas
Source:

cvjs_windowResize_scrollbar(doResize, topRows, widthReduction, floorplan, wrapper, scrollBar)

Resize CADViewer JS canvas after browser window changes, adjusts for scrollbar appearing when canvas is larger than browser window
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 $(window).resize(function() {}
topRows int height of top rows in pixels
widthReduction int with size of external elements in pixel, full window relative canvas size
floorplan string name of SVG element containing canvas
wrapper string name of wrapper div containing floorplan canvas
scrollBar int pixel size to width adjustment
Source:

cvjs_windowResize_scrollbar_bordermargin(doResize, topRows, widthReduction, floorplan, wrapper, scrollBar, borderMargin)

Resize CADViewer JS canvas after browser window changes, adjusts for scrollbar appearing when canvas is larger than browser window, adjusting for border around canvas
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 $(window).resize(function() {}
topRows int height of top rows in pixels
widthReduction int with size of external elements in pixel, full window relative canvas size
floorplan string name of SVG element containing canvas
wrapper string name of wrapper div containing floorplan canvas
scrollBar int pixel size for width adjustment
borderMargin int pixel size for width adjustment
Source:

setOriginatingFileUsernamePassword()

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