Search all API Methods
Methods
closestPoint(pathNode, point) → {Object}
Return the Closest point on a path given a reference point
Parameters:
Name | Type | Description |
---|---|---|
pathNode |
string | SVG path |
point |
Object | (x,y) of reference point |
Returns:
nearestPoint - (x,y) of nearest point on path
- Type
- Object
cvjs_activateSpaceObjectModal_Id(rmid)
Activate modal on Space Object
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of space object modal to activate |
cvjs_activateSpaceObjectModal_Node(node)
Activate modal on Space Object
Parameters:
Name | Type | Description |
---|---|---|
node |
string | Node of space object modal to activate |
cvjs_addCircleSpaceObject(floorplan_div)
Add a Space Object Circle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_addDragRectangleImageSpaceObject(floorplan_div)
Add a Drag Size Size Image Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_addFixedSizeCustomSpaceObject(floorplan_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer)
Add a Fixed Size Space Object Custom Rectangle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_addFixedSizeCustomSpaceObjectXY(floorplan_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer, xcor, ycor, coordinate_flag, textArray, scaleFactor, textStyles, scaleText, hexColorText, leftFactor)
Add a Fixed Size Space Object Custom Rectangle at coordinates x, y
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
ycor |
int | y coordinate |
coordinate_flag |
int | 0 is SVG coordinates, 1 is DWG coordinates, 0 is default |
textArray |
Object | array with lines of text content in Space Object |
scaleFactor |
float | scale factor at insertion, 1.0 is default |
textStyles |
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 |
hexColorText |
Array | array containing color of each line of text in the Space Object |
leftFactor |
float | left adjustment factor of text in the Space Object |
cvjs_addFixedSizeImageSpaceObject(floorplan_div)
Add a Fixed Size Image Space Object with
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_addFixedSizeImageSpaceObjectXY(floorplan_div, xcor, ycor)
Add a Fixed Size Image Space Object with
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
xcor |
int | x coordinate in SVG coordinates |
ycor |
int | y coordinate in SVG coordinates |
cvjs_addGraphicsToSpaceObjectGroup(currentNode_underbar, baseGraphics, objectTag)
Add graphics to a space object group
Parameters:
Name | Type | Description |
---|---|---|
currentNode_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 |
cvjs_addObjectToSpaceObjectGroup(currentNode_underbar, graphicsTag, objectTag, isGroup)
Add a graphics object or space object group to a space object group
Parameters:
Name | Type | Description |
---|---|---|
currentNode_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 |
cvjs_addPinMarker(floorplan_div, spaceObjectId, spaceObjectName, spaceObjectType, layer)
Add a Pin Marker Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_addPolygonSpaceObject(floorplan_div)
Add a Space Object Polygon
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_addRectangleCustomSpaceObject(floorplan_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer)
Add a Space Object Custom Rectangle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_addRectangleSpaceObject(floorplan_div)
Add a Space Object Rectangle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_addSelectedToOriginalStyles(rmid)
If an object has been selected, then add it to the list of Original Styles
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object object |
cvjs_addSingleSpaceObject(floorplan_div, currentNode_name, currentNode_id, currentNode_layer, currentNode_group, currentNode_attributes, currentNode_attributeStatus, currentNode_type, currentNode_tags, currentNode_occupancy, currentNode_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.
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
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_Path |
string | The path of the Space Object as an SVG path |
cvjs_addSpaceObjectDirectXY(floorplan_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, coordinate_flag, xcor, ycor, textArray, scaleFactor, colorObject, textStyles, scaleText, hexColorText, leftFactor)
Add a Fixed Size Space Object Custom Rectangle at coordinates x, y
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
coordinate_flag |
int | 0 is SVG coordinates, 1 is DWG coordinates, 0 is default |
xcor |
int | x coordinate |
ycor |
int | y coordinate |
textArray |
Object | array with lines of text content in Space Object |
scaleFactor |
float | scale factor at insertion, 1.0 is default |
colorObject |
Object | object containing colors and style of default setting of Space Object, "none" provides standard default color |
textStyles |
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 |
hexColorText |
Array | array containing color of each line of text in the Space Object |
leftFactor |
float | left adjustment factor of text in the Space Object |
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
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
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true: click handlers are added to objects on load, false: no handers added on load |
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 |
cvjs_AddTextAndTBorderOnSpaceObjectId(txtLayer, Id, leftScale, textStringArr, textStyleArr, scaleTextArr, hexColorTextArr, clipping, centering)
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 |
centering |
boolean | true if centering of text inside of Space Object, false is default |
cvjs_AddTextAndTBorderOnSpaceObjectId_GlobalHeight(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, based on global height of drawing |
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 |
cvjs_AddTextAndTBorderOnSpaceObjectNode(txtLayer, nodeId, leftScale, textStringArr, textStyleArr, scaleTextArr, hexColorTextArr, clipping, centering)
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 |
centering |
boolean | true if centering of text inside of Space Object, false is default |
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 |
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 |
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 |
cvjs_addVqRoomsGraphics_newNode(currentNode_underbar, graphicsObject)
Sets up a graphics Group object with the current Node_underbar
Parameters:
Name | Type | Description |
---|---|---|
currentNode_underbar |
String | the current internal ID of a Group object |
graphicsObject |
Object | the graphical base object, to which the Group is built around |
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 |
cvjs_ajaxPostCallbackVariable_thumbNails(callbackStatus)
Set the ajax control callback variable
Parameters:
Name | Type | Description |
---|---|---|
callbackStatus |
boolean | set to false then monitor then true |
cvjs_AllGroupsOff()
Turn all Object Space groups off - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_AllGroupsOn()
Turn all Object Space groups on - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_allLayersInDrawingOn(floorplan_div)
Sets all layers in drawing On
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_AllLayersOff()
Turn all Object Space layers off - Object Spaces, Sticky Notes and Redlines are differentiated.
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 |
cvjs_allSpaceObjectsOff(floorplan_div)
Turn all Space Object off
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
cvjs_allSpaceObjectsOn(floorplan_div)
Turn all Space Objects on
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
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 |
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 |
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 |
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) |
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 |
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 |
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 |
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 |
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) |
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 |
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 |
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 |
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 |
cvjs_batchConvertDrawingsToPDF(drawingFilesArray, pageOrientationArray, pageSizeArray, pageResolutionArray)
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.
Parameters:
Name | Type | Description |
---|---|---|
drawingFilesArray |
Array.<string> | String array with name and location of drawings |
pageOrientationArray |
Array.<string> | String array with orientation of drawings: landscape/portrait |
pageSizeArray |
Array.<string> | String array with papersizes of drawings |
pageResolutionArray |
Array.<string> | Array with page resolutions |
cvjs_batchConvertDrawingsToPDF_CustomReport(string, drawingFilesArray, pageOrientationArray, pageSizeArray, pageResolutionArray, 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.
Parameters:
Name | Type | Description |
---|---|---|
string |
floorPlan - Name of the floorplan div for batch processing | |
drawingFilesArray |
Array.<string> | String array with name and location of drawings |
pageOrientationArray |
Array.<string> | String array with orientation of drawings: landscape/portrait |
pageSizeArray |
Array.<string> | String array with papersizes of drawings |
pageResolutionArray |
Array.<string> | Array with page resolutions |
string |
batchFilesToPDF_Controller - Name of the php document that creates the report when the graphics is created | |
Object |
callbackMethod - callBackMethod to decorate each drawing before publishing |
cvjs_buildFolderTree(FileLocation, DocumentLocation, floorplan_div)
Build a tree structure in which to be able to load CADViewer dynamically
Parameters:
Name | Type | Description |
---|---|---|
FileLocation |
string | location of file tree folder |
DocumentLocation |
string | location of current document |
floorplan_div |
string | name of the Element 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....
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. |
cvjs_CADViewerPro(cadviewerpro)
Changes CADViewer from CADViewer Community to CADViewer Pro
Parameters:
Name | Type | Description |
---|---|---|
cadviewerpro |
boolean | true for CADViewer Pro, false for CADViewer Community |
cvjs_calibrateMeasurement(floorplan_div)
Calibrate measurement
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_changePageByNumber(floorplan_div, newpagenumber) → {boolean}
Change page on the current drawing based on page number
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
newpagenumber |
int | a number between 1 and the total pages in the drawing |
Returns:
status - false if newpagenumber outside of range, true if page change
- Type
- boolean
cvjs_changeSpaceObjectDisplayMode(floorplan_div, displayModal)
Sets the mode of Space Object to either display or create
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
displayModal |
boolean | flag to display SpaceObjectEditModal, if undefined modal is true |
cvjs_changeSpaceObjectID(currentId, newId) → {boolean}
Change the ID of a current Space Object
Parameters:
Name | Type | Description |
---|---|---|
currentId |
string | The current ID of the Space Object |
newId |
String | The new ID of the Space Object |
Returns:
flag - true if changed, otherwise false. Note, it cannot be changed into an existing ID
- Type
- boolean
cvjs_changeSpaceObjectLayer(currentId, newLayer) → {boolean}
Change the layer of a current Space Object
Parameters:
Name | Type | Description |
---|---|---|
currentId |
string | The current ID of the Space Object |
newLayer |
string | The new layer of the Space Object |
Returns:
flag - true if changed, otherwise false
- Type
- boolean
cvjs_changeSpaceObjectLinkStatus(currentId, linkFlag) → {boolean}
Set the link status Space Object
Parameters:
Name | Type | Description |
---|---|---|
currentId |
string | The current ID of the Space Object |
linkFlag |
boolean | The new link Status of the Space Object |
Returns:
flag - true if changed, otherwise false
- Type
- boolean
cvjs_changeSpaceObjectName(currentId, newName) → {boolean}
Change the Name of a current Space Object
Parameters:
Name | Type | Description |
---|---|---|
currentId |
string | The current ID of the Space Object |
newName |
string | The new Name of the Space Object |
Returns:
flag - true if changed, otherwise false
- Type
- boolean
cvjs_changeSpaceObjectType(currentId, newType) → {boolean}
Change the Space Type of a current Space Object
Parameters:
Name | Type | Description |
---|---|---|
currentId |
string | The current ID of the Space Object |
newType |
string | The new Type of the Space Object |
Returns:
flag - true if changed, otherwise false
- Type
- boolean
cvjs_changeText_On_BlockHandle(handle, textArr)
Changes visible text attribute objects on a block, referenced through its block handle
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 |
cvjs_changeText_On_BlockHandleDiv(handle, textArr, floorplan_div) → {boolean}
Changes visible text attribute objects on a block, referenced through its block handle
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 |
floorplan_div |
string | name of div containing CADViewer canvas |
Returns:
false if handle not found otherwise true
- Type
- boolean
cvjs_changeTextOnSpaceObjectGroup(spaceObjectId,, subGroupObjectId,, newText)
Copy a space group object into a new group object
Parameters:
Name | Type | Description |
---|---|---|
spaceObjectId, |
string | original space object ID |
subGroupObjectId, |
string | sub group space object ID containing text |
newText |
string | replacement text string |
cvjs_checkBlockHandleDiv(handle, floorplan_div) → {boolean}
Checks if a block handle is present on the floorplan
Parameters:
Name | Type | Description |
---|---|---|
handle |
string | AutoCAD block handle reference |
floorplan_div |
string | name of div containing CADViewer canvas |
Returns:
false if handle not found otherwise true
- Type
- boolean
cvjs_checkRoomHandleDiv(rmid, floorplan_div) → {boolean}
Checks if a RoomID is present on a given floorplan
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object to highlight |
floorplan_div |
string | name of the div on which the CADViewerJS instance is placed |
Returns:
false if rmid not found otherwise true
- Type
- boolean
cvjs_clear_collab_redline(floorplan_div)
Clear the redlines in collaboration session
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_clearAllCustomTooltips()
Clears all custom tooltips
cvjs_clearAllHighlightHandleObjectStyles()
Clear all Highlights on AutoCAD Handle tagged geometrical objects
cvjs_clearAllHighlightSpaceObjectDirect(floorplan_div)
Clear all Highlight on all Space Objects and returns to default settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
cvjs_clearAllImageLinks(floorplan_div)
Clears all image links from the canvas
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_clearAllRedlineHiddenUsers()
Clear all redline and stickyNote userId from hidden users list
cvjs_clearAllRedlineLockedUsers()
Clear all redline and stickyNote userId from locked users list
cvjs_clearCurrentRedline(floorplan_div)
Clear all redlines currently visible
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_ClearDrawing(floorplan_div)
Clears the drawing space of CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the div canvas object to which CADViewer is allocated |
cvjs_clearDrawingHyperlinks()
Clears the drawing from any highlight or modals active on Hyperlinks
cvjs_clearDrawingRedlines()
Clears the drawing from any redlines
cvjs_clearDrawingSpaceObjects()
Clears the drawing from any highlight or modals active on Space Objects
cvjs_clearDrawingStickyNotes()
Clears the drawing from any highlight or modals active on StickyNotes
cvjs_clearHighlightSpaceObjectDirect(floorplan_div, objectID)
Clear the Highlight a Space Object and returns to default settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_clearLayer(layer) → {none}
Clears the current layer
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be cleared |
Returns:
- Type
- none
cvjs_clearLayerDiv(layer, floorplan_div) → {none}
Clears the current layer on a named floorplan div
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be cleared |
floorplan_div |
string | name of floorplan div |
Returns:
- Type
- none
cvjs_clearQuickCounts(floorplan_div)
Clear the quick counts counter
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_clearSpaceLayer() → {none}
Clears and initialize the general Space Layer for highlights
Returns:
- Type
- none
cvjs_clearSpaceObjects(floorplan_div)
Deletes all Space Objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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 |
Returns:
- Type
- none
cvjs_click(id, handle, entity)
Callback method from CADViewer when an AutoCAD handle object has been clicked
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the ID of the object, this ID can be used to reference the object using jQuery |
handle |
String | the AutoCAD handle of the object, this is an unique ID for each geometrical unit in the drawing, |
entity |
String | the entity associated with the Handle, including the AutoCAD AcDb prefix to entities |
cvjs_colorAllLayersInDrawing(floorplan-div, hexColor)
Toggle the color settings Black /White
Parameters:
Name | Type | Description |
---|---|---|
floorplan-div |
string | the ID of the Element in which CADViewer is running |
hexColor |
string | color of all layers |
cvjs_colorSingleSVGHyperlink(hyperlinkId, hyperFill, hyperOpacity)
Add color to an xlink SVG hyperlinks to have it behave like a dynamic highlight
Parameters:
Name | Type | Description |
---|---|---|
hyperlinkId |
string | the |
hyperFill |
string | the new fill color, of type #00FF00 |
hyperOpacity |
float | the opacity of the fill, a value between 0.0 and 1.0. |
cvjs_compareDrawings_LoadSecondDrawing(floorplan_div)
Loads the second drawing for compare with drawing currently loaded
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_compareDrawings_ToggleDrawingOverlay(floorplan_div)
Toggles the overlaid drawings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_compareDrawings_ToggleDrawings(floorplan_div)
Toggles the drawings individually
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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
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 |
cvjs_connectTextInstances(searchString1, textInstance1, searchString1, textInstance1, lengthfactor1, lengthfactor2)
Connect Text Strings; connects two text strings with a line and arrow
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 |
cvjs_conversion_addAXconversionParameter(name, value-, floorplan_div)
Add an AutoXchange conversion control parameter for server based conversion
Parameters:
Name | Type | Description |
---|---|---|
name |
string | conversion parameter name |
value- |
string | conversion parameter value, if no value set "" |
floorplan_div |
string | name of the div on which the floorplan is places |
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
cvjs_conversion_clearAXconversionParameters(floorplan_div)
Clears the custom AutoXchange conversion control parameter for server based conversion
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of the div on which the floorplan is places |
cvjs_Conversion_forPrint(floorplan_div, originatingContent, originatingUsername, originatingPassword, fileFormat)
Conversion for Print , either SVG or PDF with JSON handling.
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
originatingContent |
string | base file name |
originatingUsername |
string | username or "" |
originatingPassword |
string | password or "" |
fileFormat |
string | "pdf" or "svg" |
cvjs_conversion_getContentResponse()
Get the current type of content response
Returns:
string - Returns type of content response - "file | embedded | stream"
cvjs_conversion_setApplicationServiceParameters(applicationPlatform, applicationPlatformUsername, applicationPlatformUserID, ServiceToken, leaveStreamOnServerOnServer)
Sets control parameter for service conversion
Parameters:
Name | Type | Description |
---|---|---|
applicationPlatform |
string | - |
applicationPlatformUsername |
string | |
applicationPlatformUserID |
string | |
ServiceToken |
string | |
leaveStreamOnServerOnServer |
int |
cvjs_conversion_setContentFormat(contentFormat)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
contentFormat |
string | "DWG | DXF| DWF | DGN - DGN currently not implemented", |
cvjs_conversion_setContentResponse(userLabel)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
userLabel |
string | " optional label returned in the response",, |
cvjs_conversion_setContentType(contentType)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
contentType |
string | "file | embedded | stream" |
cvjs_conversion_setUserLabel(userLabel)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
userLabel |
string | " optional label returned in the response",, |
cvjs_copyCircleSpaceObject(floorplan_div)
Copy a Space Object Circle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_copyGroupObject(originSpaceObjectId, newSpaceObjectId)
Copy a space group object into a new group object
Parameters:
Name | Type | Description |
---|---|---|
originSpaceObjectId |
string | original space object ID |
newSpaceObjectId |
string | new Space Object Id |
cvjs_copyMeasurementField(floorplan_div)
Copies the content of the measurement field to the clipboard
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_createSpaceObjectGroup(currentNode_underbar, baseGraphics, customSpaceObjectId, customSpaceObjectName, customSpaceObjectType, customLayer, customGroup)
Creates a Space Object Group based on initialization values and a boase graphics
Parameters:
Name | Type | Description |
---|---|---|
currentNode_underbar |
String | the current internal ID of a Group object |
baseGraphics |
Object | the graphical base object, to which the Group is built around |
customSpaceObjectId |
String | the public exposed ID of the group object |
customSpaceObjectName |
String | the public exposed Name of the group object |
customSpaceObjectType |
String | the public exposed Type of the group object |
customLayer |
String | the layer of the group object |
customGroup |
String | a general group name, to which the group object can be part of |
cvjs_currentHost() → {string}
Finds the current host of the library
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
Returns:
maxNode - the current maximum node id
- Type
- string
cvjs_currentSpaceSettings()
return current settings object
cvjs_currentURL() → {string}
Finds the current url of the library
Returns:
url - current location
- Type
- string
cvjs_customCanvasMethod_globalScale()
Creates the global scale and delta translation values for SVG coordinate calculaiton in custom Canvas Methods
cvjs_dblclick(id, handle, entity)
Callback method from CADViewer when an AutoCAD handle object has been double clicked
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the ID of the object, this ID can be used to reference the object using jQuery |
handle |
String | the AutoCAD handle of the object, this is an unique ID for each geometrical unit in the drawing, |
entity |
String | the entity associated with the Handle, including the AutoCAD AcDb prefix to entities |
cvjs_debugMode(debug)
Sets debug mode
Parameters:
Name | Type | Description |
---|---|---|
debug |
boolean | true for debug traces, false otherwise |
cvjs_deleteLastRedline(floorplan_div)
Deletes the last drawn Redline
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_deleteSingleRedline(floorplan_div)
Deletes a single redline
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_deleteSpaceImageObject(floorplan_div)
Delete a Space Image Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_deleteSpaceObject(floorplan_div)
Delete a Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_deleteSpaceObjectDirectXY(floorplan_div, objectID) → {boolean}
Delete Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
Returns:
flag - true if deleted, false if objectID undefined
- Type
- boolean
cvjs_directDownloadStickyNotesRedlines(floorplan_div, filename)
Trigger a direct download of the current redline on canvas into a file for local save
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
filename |
string | name of redline file of screen content to download, it's format extension must be .js |
cvjs_directUploadStickyNotesRedlines(floorplan_div)
Trigger a direct local source load of a redline file into the current canvas
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
cvjs_DisablePrintIcon(floorplan_div)
Disables print Icon
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | name of Element in which CADViewer is running |
cvjs_displayAllInterfaceControls(mode, floorplan_div)
Removes all icon interface components for viewing, redlining, etc. so that developers can control their own interface
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer |
cvjs_displayAllInterfaceControlsZoomDisk(floorplan_div)
Show the zoom disk
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | the div running CADViewer |
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 |
cvjs_displayInformationModal(floorplan_div, text, modalHeight, modal_left,, modal_top,)
Activates and displays the information modal with text
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_displaySpaceObjectsStructure(floorplan_div)
Display of Space Object structure in User Mode, with enabled seach panel
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_displayTopMenuIconBar(display_status, floorplan_div)
Controls top menu icon bar visibility
Parameters:
Name | Type | Description |
---|---|---|
display_status |
boolean | default is true, use false to hide menu bar |
floorplan_div |
String | div in which CADViewer is implemented |
cvjs_displayTopNavigationBar(display_status, floorplan_div)
Controls top menu navigation bar visibility
Parameters:
Name | Type | Description |
---|---|---|
display_status |
boolean | default is true, use false to hide menu bar |
floorplan_div |
String | div in which CADViewer is implemented |
cvjs_dragBackgroundToBack_SVG(floorplan_div)
Sends the dragging background to back - default
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_dragBackgroundToFront_SVG(floorplan_div)
Brings the dragging background to front - used for drawings with static filled polygons
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
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.
cvjs_drawRedline_Freehand(floorplan_div)
Draws a freehand redline - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_drawRedline_Freehand_globalColorWidth()
Draws a freehand redline - uses global values of color and width
cvjs_drawRedlineArrow(floorplan_div)
Draws a redline polyline with arrow - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_drawRedlineCloud(floorplan_div)
Draws a redline cloud - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_drawRedlineFilledPolygon(floorplan_div)
Draws a redline filled polygon - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_drawRedlineFilledRectangle(floorplan_div)
Draws a redline filled rectangle - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_drawRedlinePolyline(floorplan_div)
Draws a redline polyline - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_drawRedlineRectangle(floorplan_div)
Draws a redline rectangle - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_drawRedlineText(floorplan_div)
Draws a redline text - uses global settings of color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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.
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.
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.
cvjs_drawSpaceObject_FilledRedlineRectangle()
Draws interactively a filled redline rectangle. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
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.
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.
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.
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.
cvjs_drawSpaceObject_RedlineArrowPolyline()
Draws interactively a redline polyline with arrow. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineCloud()
Draws interactively a cloud. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineEllipse()
Draws interactively a Redline Ellipse . Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineEllipseCloud()
Draws interactively a Redline Ellipse Cloud . Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineFilledPolygon()
Draws interactively a redline polygon. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlinePolyline()
Draws interactively a redline polyline. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineRectangle()
Draws interactively a redline rectangle. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawStickyNote(floorplan_div)
Draws a freehand stickynote - uses global settings of user and user id
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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.
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 |
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 |
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 |
cvjs_emailScreenAsPDFwithRedlines(floorplan_div, custom_content)
Saves a floorplan with overlays as SVG file, then embed it into a pdf and send it as email
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
custom_content |
object | custom controlled information |
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
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 |
cvjs_EnablePrintIcon(floorplan_div)
Enables print Icon
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | name of Element in which CADViewer is running |
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) |
cvjs_encodeURIcallToserver(flag)
Sets flag to control if call to server php for conversion shall be URI encoded or not. Default is true.
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | default is true. Set to true to custom implement this feature |
cvjs_executeCustomCanvasMethod_click(generic_mousemove_method, generic_mousedown_method, generic_mouseup_method, generic_dblclick_method, generic_init_method)
Execute a custom implemented canvas method for mouse operation, click operations
Parameters:
Name | Type | Description |
---|---|---|
generic_mousemove_method |
method | A placeholder method for mouse move |
generic_mousedown_method |
method | A placeholder method for mouse down |
generic_mouseup_method |
method | A placeholder method for mouse up |
generic_dblclick_method |
method | A placeholder method for mouse double click |
generic_init_method |
method | A placeholder method executed when mouse interaction on canvas initiated |
cvjs_executeCustomCanvasMethod_drag(generic_start_method, generic_stop_method, generic_move_method, generic_init_method)
Execute a custom implemented canvas method for drag
Parameters:
Name | Type | Description |
---|---|---|
generic_start_method |
method | A placeholder method executed at start drag |
generic_stop_method |
method | A placeholder method executed at stopping of drag |
generic_move_method |
method | A placeholder method executed when drag is initiated and movement takes place |
generic_init_method |
method | A placeholder method executed when drag is initiated |
cvjs_executeCustomCanvasMethod_nodrag(generic_mousemove_method, generic_mousedown_method, generic_mouseup_method, generic_dblclick_method, generic_init_method)
Execute a custom implemented canvas method for mouse operation, no drag
Parameters:
Name | Type | Description |
---|---|---|
generic_mousemove_method |
method | A placeholder method for mouse move |
generic_mousedown_method |
method | A placeholder method for mouse down |
generic_mouseup_method |
method | A placeholder method for mouse up |
generic_dblclick_method |
method | A placeholder method for mouse double click |
generic_init_method |
method | A placeholder method executed when mouse interaction on canvas initiated |
cvjs_exitCompareDrawings(floorplan_div)
Exit compare drawing and returns to base drawing
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_exitQuickCount(floorplan_div)
Exit quick count, alternative method to double click or Esc
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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 |
cvjs_fileLoadFromSharePointServer(mode)
Sets file loading so that it done from a SharePoint Server
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 |
cvjs_generateShareFileDrawingList()
Calls server side PHP controller to fetch file list from Sharepoint server. A CAD server tree is built for jstree file selector.
cvjs_getAllRedlines_TextList() → {String}
Generate list with all redline text and their corresponding userId
Returns:
value - Returns Id, redline text list; (userid,redlinetext);(userid,redlinetext)
- Type
- String
cvjs_getAllRedlines_UserIdList() → {String}
Generate list with all redlines users
Returns:
value - Returns Id list, separated by ;
- Type
- String
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 |
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 |
Returns:
value - Returns the attributeStatus
- Type
- object
cvjs_getCurrentMeasurementUnit() → {string}
Returns the setting of Measurement Units on the current drawing/page from the active floorplan_div
Returns:
units - Measurement Unit (mmn, cm, m, feet, inch)
- Type
- string
cvjs_getCurrentMultiPage_FileName() → {string}
Returns the current fileName from the MultiPages list
Returns:
url - current location
- Type
- string
cvjs_getCurrentPage() → {int}
Returns the current page number in the document loaded
Returns:
pageNumber
- Type
- int
cvjs_getLanguages() → {string}
Get the languages supported in CADViewer
Returns:
languages - string with available languages
- Type
- string
cvjs_getLayerForSpaceObject(floorplan_div, ObjectID) → {string}
Get the associated layer name for the Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
ObjectID |
String | Space Object Id on layer, -1 if none found |
Returns:
layerName - name of the layer field of the Space Object
- Type
- string
cvjs_getMultiSelect() → {boolean}
Controls the multiselect variable status
Returns:
multiSelect - value of multiselect flag
- Type
- boolean
cvjs_getRedlineHiddenUsersList() → {String}
Lists all redline and stickyNote userId from hidden users list
Returns:
value - Returns Id list
- Type
- String
cvjs_getRedlineLockedUsersList() → {String}
Lists all redline and stickyNote userId from locked users list
Returns:
value - Returns Id list
- Type
- String
cvjs_getServerBackEndUrl() → {string}
Get the current ServerBackEndUrl variable;
Returns:
ServerBackEndUrl - ServerBackEndUrl of current CADViewer settings
- Type
- string
cvjs_getServerLocation() → {string}
Get the current ServerLocation variable;
Returns:
ServerLoction - server location of html Element on which CADViewer is located
- Type
- string
cvjs_getServerURL() → {string}
Get the current ServerURL variable;
Returns:
ServerURL - server url of html Element on which CADViewer is located
- Type
- string
cvjs_getSpaceObjectBoundingBox(id) → {Object}
Returns a list with all Ids in the Space Object structure
Parameters:
Name | Type | Description |
---|---|---|
id |
String | SpaceId |
Returns:
boundingBox - Returns the bounding box
- Type
- Object
cvjs_getSpaceObjectDefaultLayer(floorplan_div) → {string}
Get the creation layer for Space Objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
Returns:
layerName - name of the default Space Object layer
- Type
- string
cvjs_getSpaceObjectDirectXYCoord(floorplan_div, objectID, coordinate_flag) → {Array}
Get current Space Object Coordinates
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
Returns:
coords - x and y coordinate of object , null if undefined
- Type
- Array
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 |
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
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 |
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 |
Returns:
value - Returns the Name corresponding to the given nodeId, -1 if not found
- Type
- object
cvjs_getSpaceObjectNamesList() → {array}
Returns a list with all Names in the Space Object structure
Returns:
value - Returns Names list
- Type
- array
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 |
Returns:
value - Returns the NodeId corresponding to the given Id, -1 if not found
- Type
- object
cvjs_getSpaceObjectNodeList() → {array}
Returns a list with all NODES in the Space Object structure
Returns:
value - Returns Id list
- Type
- array
cvjs_getSpaceObjectTypefromId(Id) → {object}
Returns the Type of a given Space Object ID
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object in which to retrive the corresponding Type |
Returns:
value - Returns the Type corresponding to the given Id, -1 if not found
- Type
- object
cvjs_getStickyNoteInfo() → {string}
Get the content of all StickyNotes
Returns:
stickyNoteContent - xml wrapped content: userid, id, name, date, text, page
- Type
- string
cvjs_getSvgToWorldUnits() → {float}
Returns the setting of SVG to World Units on the current drawing/page from the active floorplan_div
Returns:
svgToWorldUnits - conversion factor for measurements
- Type
- float
cvjs_GetURLParameter(sParam) → {string}
Retrieves a given parameter from the windows.location interface
Parameters:
Name | Type | Description |
---|---|---|
sParam |
string | name of parameter to retrieve |
Returns:
the parameter if found, otherwise ""
- Type
- string
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 |
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 |
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 |
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 |
cvjs_hatchSpace(rmid, graphicalPattern, colorHex, fillOpacity)
Apply a predefined pattern on a graphical Space Object
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" |
colorHex |
string | color of hatch in hex form, for example: #FF0000 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_hideAllInterfaceControls(floorplan_div)
Hide the page change modal
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | the div running CADViewer |
cvjs_hideAllRedlines_ExceptCurrentUser()
Hide all redlines except current userId
cvjs_hideAllRedlines_ExceptUser(userId)
Hide all redlines except named userId
Parameters:
Name | Type | Description |
---|---|---|
userId |
string | the userId to be displayed, all other hidden |
cvjs_hideAllRedlines_HiddenUsersList()
Hide all redlines with userId on the Hidden Users List
cvjs_hideInformationModal(floorplan_div)
Hides the information modal with text
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_hideObjectInSpaceObjectGroup(currentNode_underbar, objectTag)
Hide an object inside a Space Object Group
Parameters:
Name | Type | Description |
---|---|---|
currentNode_underbar |
string | base object name of graphics group |
objectTag |
string | sub id tag, to be hidden |
cvjs_hideOnlyPop()
Remove the popup click color
cvjs_hideToolTip()
Hides the standard tooltip previously shown with cvjs_showToolTipLocation(tiptext, x, y)
cvjs_highlightAllSpaceObjects(roomstyle, layer)
Highlights all Space Objects with a given style on a specified external layer
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 |
cvjs_HighlightHandleObjectStyles(hexColor, lineWeightFactor, opacity, tooltip, id, handle)
Highlights and AutoCAD Handle tagged geometrical objects
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 |
cvjs_highlightRoomCSS_layer(rmid, roomstyle, layer)
Highlights a Space Object with a given style on a given external layer
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 |
cvjs_highlightRoomCSS_layersort(rmid, roomstyle, layer, layer2)
Highlights a Space Object with a given style on a given external layer
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 |
cvjs_highlightRoomCSS_layersortDiv(rmid, roomstyle, layer, floorplan_div) → {boolean}
Highlights a Space Object with a given style on a given external layer
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 |
floorplan_div |
string | name of the div on which the CADViewerJS instance is placed |
Returns:
false if rmid not found otherwise true
- Type
- boolean
cvjs_highlightRoomImmediate(rmid, cleardrawing)
Highlight a Space Object using defined selectColors
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 |
cvjs_highlightSpace(rmid, roomstyle)
Highlights a Space Object with a given style on a given external layer
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
cvjs_highlightSpaceBorderCSS_layersort(Id, roomstyle, layer, layer2, lineWeightFactor)
Highlights a Space Object bordr with a given style on a given external 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 | external layer on which to draw the highlight |
layer2 |
string | layer is repositioned and put on top of layer2 |
lineWeightFactor |
floar | scale factor on border line weight |
cvjs_highlightSpaceBorderCSS_layersortDiv(rmid, roomstyle, layer, floorplan_div, lineWeightFactor) → {boolean}
Highlights a Space Object bordr with a given style on a given external layer
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 |
floorplan_div |
string | name of the div on which the CADViewerJS instance is placed |
lineWeightFactor |
floar | scale factor on border line weight |
Returns:
false if rmid not found otherwise true
- Type
- boolean
cvjs_highlightSpaceObjectDirect(floorplan_div, objectID, colorobject)
Highlight a Space Object with a css settings of a Color Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_highlightSpaceObjectId(rmid, roomstyle, layer)
Highlights a Space Object with a given style on a given external layer
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 |
cvjs_highlightSpaceObjectIdDiv(rmid, roomstyle, layer, floorplan_div)
Highlights a Space Object with a given style on a given external layer
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 |
floorplan_div |
string | floorplan div with CADViewer instance |
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 |
cvjs_IdObjectClicked() → {string}
Identify the id of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
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.
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 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 |
cvjs_InitCADViewer(floorplan_div, image, javascripts_folder)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/ |
cvjs_InitCADViewer_app(floorplan_div, app_folder, imagePathDirect)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/" |
imagePathDirect |
string | direct paths to Images, typically "/assets/cadviewer/app/images/" |
cvjs_InitCADViewer_app_highLight(floorplan_div, app_folder, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/ |
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 |
cvjs_InitCADViewer_app_highLight_popUp(floorplan_div, app_folder, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/ |
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 |
cvjs_InitCADViewer_highLight(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer 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 |
cvjs_InitCADViewer_highLight_popUp(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer 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 |
cvjs_InitCADViewer_highLight_popUp_app(floorplan_div, app, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/" |
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 |
cvjs_InitCADViewer_highLight_popUp_dual_Id(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody, cvjsPopUpBody2)
Initializes CADViewer, any of the methods cvjs_InitCADViewer_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer 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 |
cvjs_InitCADViewerJS(floorplan_div, image, javascripts_folder)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/ |
cvjs_InitCADViewerJS_app(floorplan_div, app)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/", on Angular "/assets/cadviewer/app/ |
cvjs_InitCADViewerJS_app_highLight(floorplan_div, app_folder, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/ |
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 |
cvjs_InitCADViewerJS_app_highLight_popUp(floorplan_div, app_folder, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/ |
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 |
cvjs_InitCADViewerJS_highLight(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer 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 |
cvjs_InitCADViewerJS_highLight_popUp(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer 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 |
cvjs_InitCADViewerJS_highLight_popUp_app(floorplan_div, app_folder, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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/" |
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 |
cvjs_InitCADViewerJS_highLight_popUp_dual_Id(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody, cvjsPopUpBody2)
Initializes CADViewer, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer 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 |
cvjs_initCADViewerPro_FileLoadModal(floorplan_div)
CADViewer Pro Initialization class, to be called as part of init of base version
FileLoad Module
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_initCADViewerPro_Section02(floorplan_div)
CADViewer Pro Initialization class, to be called as part of init of base version
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_initCADViewerPro_Section03(floorplan_div)
CADViewer Pro Initialization class, to be called as part of init of base version
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_InitializeSVGHyperlinkClick(floorplan_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);
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_initMultiSelect()
Initialize multi-select
cvjs_initZeroWidthHandling(floorplan_div, scale_factor)
Init ZW class handling, automated Zoom and adjustment of zerowidth
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
scale_factor |
int | scale factor on zero width lines when zooming |
cvjs_insertImageLink(floorplan_div)
Insert image link
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_interactiveLayerOff(floorplan_div)
Turn a single layer on interactively
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | div of the CADViewerJS canvas |
cvjs_interactiveSearchText(floorplan_div)
Activates the interactive Text Modal
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_LayerList(floorplan_div)
Open the Layer List menu for layer handling
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_LayerListSpaceObject(floorplan_div, mode)
Opens the layer list for Space Objects for setting of Room/Text Layer processing
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_layerNamefromObjectID(myObjectId) → {string}
Return orginal file layer name based on SVG object ID
Parameters:
Name | Type | Description |
---|---|---|
myObjectId |
string | id of the element in the SVG file |
Returns:
layer - layer name
- Type
- string
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 |
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 |
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 |
cvjs_LayerOn_OthersOff()
Turn single Object Space layer on, turn all other layers off - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_loadAllImageLinks(floorplan_div, custom_content)
Load all object image links
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
custom_content |
object | custom controlled information |
cvjs_loadBitmapsViaServerPath(mode)
Enables bitmaps to be loaded via server handler instead of direct load
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true for bitmap file load through server handler |
cvjs_loadCADViewerLanguage(language, languagelocation)
Set the language in CADViewer by first loading the language file
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 |
cvjs_loadCustomSVGLayer(fileName, floorplan_div, layer)
Loads a SVG file into a custom layer
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of SVG file to load |
floorplan_div |
string | name of Element on which CADViewer is located |
layer |
object | Layer on which to place the file content |
cvjs_LoadDrawing(floorplan_div, FileName)
Loads a drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewerJS_ methods
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_LoadDrawing_Conversion(floorplan_div, originatingContent, FileNameNoExtension, originatingUsername, originatingPassword)
Loads a DWG drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewerJS_ methods
The method connects to the TailorMade Restful API, alternative Open Source alternatives for conversion of DWG, DXF,DWF and DGN,PCF files
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_LoadDrawing_SVG(floorplan_div, FileNamePath, FileName, ScriptPath)
Loads a SVG drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewerJS_ methods
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
ScriptPath |
string | relative location of the javascript folder from the calling document |
cvjs_LoadDrawingInternal(floorplan_div, FileNamePath, FileNameNoExtension, serverCallBack)
Loads a drawing into CADViewer, this method can only be used after intialization of CADViewer through the cvjs_InitCADViewerJS_ methods
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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. |
cvjs_loadDrawingsWithSpaceObjects(floorplan_div)
Opens the File Loader Modal to load and convert drawing with space objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_loadSpaceObjects(floorplan_div, custom_content)
Loads Space Object to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
custom_content |
object | custom controlled information |
cvjs_loadSpaceObjectsDirect(floorplan_div, spaceObjectUrl)
Loads Space Object to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
spaceObjectUrl |
String | SpaceObject file to load |
cvjs_loadStamp(fileName, floorplan_div, layer)
Loads an stamp file into a custom layer
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of SVG file to load |
floorplan_div |
string | name of Element on which CADViewer is located |
layer |
object | Layer on which to place the file content |
cvjs_loadStickyNotesRedlines(floorplan_div, custom_content)
Loads redlines and sticky notes to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
custom_content |
object | custom controlled information |
cvjs_LoadTopIconMenuViewing(floorplan_div)
Set the Community Menu if no XML file has been designated for menu configuration
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_lockAllRedlines_ExceptCurrentUser()
Lock all redlines except current userId
cvjs_lockAllRedlines_ExceptUser(userId)
Lock all redlines except named userId
Parameters:
Name | Type | Description |
---|---|---|
userId |
string | the userId to be editable, all other locked |
cvjs_lockAllRedlines_LockedUsersList()
Lock all redlines with userId on the Lock Users List
cvjs_make_collab_presenter(floorplan_div)
Take control and become the presenter in collab sessiojn
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_makeGraphicsObjectOnCanvas(objectType, graphicsObject) → {Object}
Creates a graphical object on Canvas
Parameters:
Name | Type | Description |
---|---|---|
objectType |
String | type of object, Implemented is 'path', polyline |
graphicsObject |
String | graphics object |
Returns:
svgCanvasObject - returns an SVG canvas object, that can be Styled and manipulated
- Type
- Object
cvjs_makeLegendUpperRight(upperRightDeltaX, upperRightDeltaX, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, legendColorArr, highlight_handles_style_object)
Make a legend in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
scaleTextArr |
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 |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
legendColorArr |
Array.<string> | Array with the hex colors of the color box associated with each legend text |
highlight_handles_style_object |
Object | object with the styles used for highlight |
cvjs_makeLegendUpperRightDiv(upperRightDeltaX, upperRightDeltaX, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, legendColorArr, floorplan_div, highlight_handles_style_object)
Make a legend in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
scaleTextArr |
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 |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
legendColorArr |
Array.<string> | Array with the hex colors of the color box associated with each legend text |
floorplan_div |
string | name of div containing CADViewer canvas |
highlight_handles_style_object |
Object | object with the styles used for highlight |
cvjs_makeStampUpperRight(upperRightDeltaX, upperRightDeltaX, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, legendColorArr)
Make a stamp in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
scaleTextArr |
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 |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
legendColorArr |
Array.<string> | Array with the hex colors of the color box associated with each legend text |
cvjs_makeStampUpperRightDiv(upperRightDeltaX, upperRightDeltaX, roomLayer, headerScale, headerStringArrr, headerStyle, headerHexColor, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, hexColorFrame, floorplan_div)
Make a stamp in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
roomLayer |
string | name of layer to draw stamp |
headerScale |
float | Header text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height |
headerStringArrr |
Array.<string> | Array with the header text to be displayed on a per line basis |
headerStyle |
object | Style array of the header text |
headerHexColor |
string | Hex color of header text |
scaleTextArr |
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 |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
hexColorFrame |
string | Hex color of the frame |
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_makeTextObjectOnCanvas(x, y, textObject) → {Object}
Creates a graphical text object on Canvas
Parameters:
Name | Type | Description |
---|---|---|
x |
float | x coord |
y |
float | y coord |
textObject |
String | text object |
Returns:
svgCanvasObject - returns an SVG canvas object, that can be Styled and manipulated
- Type
- Object
cvjs_Measurement(floorplan_div)
Activates the measurement modal
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_measurementCallback(cvjs_currentMeasurementLength, cvjs_currentMeasurementArea, cvjs_units)
Callback method from CADViewer which application programmers can use to interface their own applications
Parameters:
Name | Type | Description |
---|---|---|
cvjs_currentMeasurementLength |
float | measured length in current measurement operation |
cvjs_currentMeasurementArea |
float | measureed area in current measurement operation, if any |
cvjs_units |
String | the units of the current measurement operation |
cvjs_mergeDXFDWG(floorplan_div)
Merge redline content into original DWG for re-distribution
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_mergePDFwithRedlines(filePath, urlPath, fileName, floorplan_div)
Saves a floorplan with overlays as SVG file
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 |
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_mergeQR(floorPlan_div, custom_content)
Function to merge a QR into a drawing for download
Parameters:
Name | Type | Description |
---|---|---|
floorPlan_div |
String | name of the div that contains CADViewer |
custom_content |
object | custom controlled information |
cvjs_modifySpaceObjectDirectXY(floorplan_div, spaceObjectId, svgImagePath, textArray, scaleFactor, textStyles, scaleText, hexColorText, leftFactor) → {boolean}
Modify a Fixed Size Space Object Custom Rectangle content
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
spaceObjectId |
string | Unique ID of the space object. NOTE! |
svgImagePath |
string | name of path containing wallpaper object |
textArray |
Object | array with lines of text content in Space Object |
scaleFactor |
float | scale factor at insertion, 1.0 is default |
textStyles |
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 |
hexColorText |
Array | array containing color of each line of text in the Space Object |
leftFactor |
float | left adjustment factor of text in the Space Object |
Returns:
flag - true if objectID exists, false otherwise
- Type
- boolean
cvjs_mouseenter(id, handle, entity)
Callback method from CADViewer when mouse enter on an AutoCAD handle object
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the ID of the object, this ID can be used to reference the object using jQuery |
handle |
String | the AutoCAD handle of the object, this is an unique ID for each geometrical unit in the drawing, |
entity |
String | the entity associated with the Handle, including the AutoCAD AcDb prefix to entities |
cvjs_mouseenter_handleObjectStyles(hexColor, lineWeightFactor, opacity, tooltip, id, handle)
Control the highlight of AutoCAD Handle tagged geometrical objects
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 |
cvjs_mouseleave(id, handle, entity)
Callback method from CADViewer when mouse leave on an AutoCAD handle object
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the ID of the object, this ID can be used to reference the object using jQuery |
handle |
String | the AutoCAD handle of the object, this is an unique ID for each geometrical unit in the drawing, |
entity |
String | the entity associated with the Handle, including the AutoCAD AcDb prefix to entities |
cvjs_mouseout(id, handle, entity)
Callback method from CADViewer when mouse out on an AutoCAD handle object
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the ID of the object, this ID can be used to reference the object using jQuery |
handle |
String | the AutoCAD handle of the object, this is an unique ID for each geometrical unit in the drawing, |
entity |
String | the entity associated with the Handle, including the AutoCAD AcDb prefix to entities |
cvjs_mouseout_handleObjectStyles(id, handle)
Reset the highlight from a AutoCAD Handle tagged geometrical objects on mouse leave
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id of space Object, generic pass through |
handle |
String | handle of space Object, generic pass through |
cvjs_mouseover(id, handle, entity)
Callback method from CADViewer when mouse over on an AutoCAD handle object
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the ID of the object, this ID can be used to reference the object using jQuery |
handle |
String | the AutoCAD handle of the object, this is an unique ID for each geometrical unit in the drawing, |
entity |
String | the entity associated with the Handle, including the AutoCAD AcDb prefix to entities |
cvjs_moveFixedSizeCustomSpaceObjectXY(floorplan_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer, xcor, ycor)
Add a Fixed Size Space Object Custom Rectangle at coordinates x, y
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_moveSpaceObject(floorplan_div)
Interactively move a Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_moveSpaceObjectDirectXY(floorplan_div, objectID, coordinate_flag, xcor, ycor) → {boolean}
Moves a Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
Returns:
flag - true if objectID exists, false otherwise
- Type
- boolean
cvjs_multipagePDFtoSVG_PhpLoad(moade)
Load multipage PDF converter to SVG through php
Parameters:
Name | Type | Description |
---|---|---|
moade |
flag | loading converted SVG from PDF via php, default is false and direct load of svg |
cvjs_NameObjectClicked() → {string}
Identify the name of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
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 |
Returns:
layerObject - Returns a new layer as a group on the SVG canvas
- Type
- object
cvjs_newLayerDiv(layer, floorplan_div) → {object}
Creates a new layer
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be created |
floorplan_div |
string | name of floorplan div |
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.
Returns:
nodeId - The nodeId is (-1) in case of no current object selected
- Type
- string
cvjs_ObjectBoundingBox_ScreenCoord(rmid) → {Object}
Returns a Bounding Box of Space Object in screen coordinates
Parameters:
Name | Type | Description |
---|---|---|
rmid |
int | Room ID of Space Object |
Returns:
myBoundingBox - upper right and lower left corner of bounding box defined by myBoundingBox.x, myBoundingBox.y, myBoundingBox.x2, myBoundingBox.y2
- Type
- Object
cvjs_OnLoadEnd()
Callback method from CADViewer when when the drawing has been fully loaded
Users use this to do DB calls, set up arrays, etc.
cvjs_OnLoadEndRedlines()
Callback method from CADViewer when when Redlines has been fully loaded
Users use this to do processing of users, etc.
cvjs_openFileLoadToServer(floorplan_div)
Calls the file manager, set the enable file manager load to true prior to calling this method
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the div of the CADViewerJS canvas |
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 |
cvjs_openRedlineLoadModal(floorplan-div)
Opens the Redline Load Modal for server interaction with redlines
Parameters:
Name | Type | Description |
---|---|---|
floorplan-div |
string | the ID of the Element in which CADViewer is running |
cvjs_openRedlineSaveModal(floorplan-div)
Opens the Redline Save Modal for server interaction with redlines
Parameters:
Name | Type | Description |
---|---|---|
floorplan-div |
string | the ID of the Element in which CADViewer is running |
cvjs_openSpaceObjectSaveModal(floorplan-div)
Opens the SpaceObject Save Modal for server interaction with redlines
Parameters:
Name | Type | Description |
---|---|---|
floorplan-div |
string | the ID of the Element in which CADViewer is running |
cvjs_overwriteDefaultDeviceSettings(mode)
Overwrite default icon menu settings on devices
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 |
cvjs_PageChangeList(floorplan_div)
Open the Page Change menu to select a page in a multipage drawing
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_panDown()
Pans the current active drawing one step down
cvjs_panLeft()
Pans the drawing one step to the left
cvjs_panRight()
Pans the current active drawing one step to the right
cvjs_panUp()
Pans the current active drawing one step up
cvjs_Print(floorplan_div)
Funtion to open print model, interactively set paper size, resolution and orientation and then print
API method linked to icon interface
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_printCanvasPaperSize()
Function to print to papersize, based on settings provided in cvjs_setPrintOrientation(), cvjs_setPrintResolutionDpi() and cvjs_setPrintPaperSize()
cvjs_printScreenAsPDFwithRedlines(floorplan_div, custom_content)
Saves a floorplan with overlays as SVG file, then embed it into a pdf and display in own window
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
custom_content |
object | custom controlled information |
cvjs_printToPdf_windowRelativeSize(scale)
Sets the size of the print window as a relation of the screen between 0 and 1
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 |
cvjs_PrintToPDFWindowRelativeSize(factor)
Sets the size of the pop-up browser page with the resulting Print To PDF file
Parameters:
Name | Type | Description |
---|---|---|
factor |
string | pop-up window relative screen size, a value between 0 and 1, default is 0.4 |
cvjs_publishPDF_modal_hide(floorplan_div)
Publish redlined content as PDF
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_quickCount(floorplan_div)
Activate quick count,
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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
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 |
Returns:
overlapping - true if overlapping, false otherwise
- Type
- boolean
cvjs_redrawViewBox()
Redraws the current ViewBox, thereby refreshing the screen with same zoom settings
cvjs_removeCustomCanvasMethod()
Removes all handers associated with a custom canvas method
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 |
cvjs_removeSelectedAndReturnOriginalStyle(rmid, _mySpaceArray) → {Object}
Remove a multiselected object and return the original style of that object
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object object to add hatches |
_mySpaceArray |
Object | custom array for multiselected spaces |
Returns:
attributesObject - object containing all styles in the selected object
- Type
- Object
cvjs_resetInitialization_FloorplanDiv()
Reset the initialization of floorplans
cvjs_resetSVGHyperlinkColors()
Reset colors on xlink SVG Hyperlinks. The hyperlinks are typically transparent, but can be controlled to do interactive highlight.-
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 |
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 |
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 |
cvjs_resetZoomPan(floorplan_div)
Zoom Extents on the drawing
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_resizeSpaceImageObject(floorplan_div)
Interactively resize a Space Image Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_resizeSpaceObject(floorplan_div)
Interactively resize a Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_resizeWindow_3D(model3D, floorplan)
Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location
Parameters:
Name | Type | Description |
---|---|---|
model3D |
string | name of canvas element containing 3D model |
floorplan |
string | name of SVG element containing floorplan |
cvjs_resizeWindow_fixedSize(widthFloorplan, heightFloorplan, floorplan)
Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location
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 |
cvjs_resizeWindow_fixedSize_location(widthFloorplan, heightFloorplan, floorplan, xPos, yPos)
Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location
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 |
cvjs_resizeWindow_position(floorplan)
Resize CADViewer canvas after browser window changes, automatic adjustment based on canvas size and location
Parameters:
Name | Type | Description |
---|---|---|
floorplan |
string | name of SVG element containing canvas |
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
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
cvjs_restApiConverter()
Returns the recommended converter for this library
cvjs_restApiConverterVersion()
Returns the minimum recommended converter version number for this library
cvjs_returnActiveSpaceObjects(floorplan_div) → {Array}
Return a list of all Space Objects on an active layer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
Returns:
IdArrary - Array with Space Object Id's
- Type
- Array
cvjs_returnAllSpaceObjects(spaceID) → {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,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
]
SpaceObjects :[ { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
]
Parameters:
Name | Type | Description |
---|---|---|
spaceID |
string | Id of the Space Object to return |
Returns:
jsonSpaceObject - Object with all space objects content
- Type
- Object
cvjs_returnAllSpaceObjectsOnLayer(floorplan_div, layerName) → {Array}
Get all Space Objects with a given layer Association
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
layerName |
string | name of the layer field of the Space Object |
Returns:
IdArrary - Array with Space Object Id's
- Type
- Array
cvjs_returnIsSpaceMultipleSelected(rmid, spaceArray) → {boolean}
Checks is a given space already has been selected
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object object to add hatches |
spaceArray |
array | array with { space, attrObj} over selected spaces |
Returns:
selected - true if selected, false otherwise
- Type
- boolean
cvjs_returnOriginalStyleAndRemoveSelected(rmid, mySpaceArray) → {Object}
Remove a multiselected object and return the original style of that object
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object object to add hatches |
mySpaceArray |
Object | custom array for multiselected spaces |
Returns:
attributesObject - object containing all styles in the selected object
- Type
- Object
cvjs_returnSelectedOriginalStyles(rmid) → {Object}
Return the original style of a space object
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object object |
Returns:
attributesObject - object containing all styles in the selected object
- 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,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
var jsonStructure = { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
Returns:
jsonSpaceObject - Object with the entire space objects content
- Type
- Object
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,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
var jsonStructure = { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
Parameters:
Name | Type | Description |
---|---|---|
spaceID |
string | Id of the Space Object to return |
Returns:
jsonSpaceObject - Object with the entire space objects content
- Type
- Object
cvjs_returnSpaceObjectSelected() → {string}
Returns the current object selected on active floorplan
Returns:
lastObj- current space object selected, -1 if no current selection
- Type
- string
cvjs_rotateAngle(angle, floorplan_div)
Rotates an angle based from 0
Parameters:
Name | Type | Description |
---|---|---|
angle |
float | rotation angle |
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_rotateBackward(floorplan_div)
Rotates 90 degrees forward
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_rotateForward(floorplan_div)
Rotates 90 degrees forward
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_rotateSpaceObject(floorplan_div)
Interactively rotates a Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_saveAllImageLinks(floorplan_div, custom_content)
Saves all image links
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
custom_content |
object | custom controlled information |
cvjs_saveAsSVG(floorplan_div)
Save current object as SVG, including redlines and space objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_saveAsSVGOnServer(floorplan_div, FileLocation, custom_content)
Save current object as SVG, including redlines and space objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
FileLocation |
string | name of file to save |
custom_content |
object | custom controlled information |
cvjs_saveCustomSVGLayer(fileName, floorplan_div, layer, custom_content)
Saves a custom layer as SVG file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of Element on which CADViewer is located |
layer |
object | Layer with custom information |
custom_content |
object | custom controlled information |
cvjs_saveFloorplanAsPDF(fileName, floorplan_div, custom_content)
Saves a floorplan with overlays as PDF file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of Element on which CADViewer is located |
custom_content |
object | custom controlled information |
cvjs_saveFloorplanAsPDFtoSharePoint(fileName, floorplan_div, sharepointFolder, sharepointUserName, custom_content)
Saves a floorplan with overlays as PDF file, upload to SharePoint folder
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_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 |
cvjs_saveFloorplanAsSVG(fileName, floorplan_div, custom_content)
Saves a floorplan with overlays as SVG file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of Element on which CADViewer is located |
custom_content |
object | custom controlled information |
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
Parameters:
Name | Type | Description |
---|---|---|
serverPath |
string | path on Server to save image content |
image_fileName |
string | name of image file on server. |
cvjs_saveScreenAsImage_makeTumbnails(serverPath, image_fileName, sizeThumb1, thumb1_fileName, sizeThumb2, thumb2_fileName)
Save screen image to server
On the server two thumbnails are created
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_fileName |
string | filename of thumbnail one on server |
sizeThumb2 |
int | size in pixels of thumbnail two |
thumb2_fileName |
string | filename of thumbnail two on server |
cvjs_saveScreenAsImage_stickyNoteInfo_makeTumbnails(serverPath, image_fileName, sizeThumb1, thumb1_fileName, sizeThumb2, thumb2_fileName)
Save screen image to server as well as list of stickyNote content and information
On the server two thumbnails are created
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_fileName |
string | filename of thumbnail one on server |
sizeThumb2 |
int | size in pixels of thumbnail two |
thumb2_fileName |
string | filename of thumbnail two on server |
cvjs_saveScreenAsPDF(pageOrientation, pageSize, pageResolution)
Captures the screen image and creates a single page PDF
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 |
cvjs_saveScreenAsPDF_email(pageOrientation, pageSize, pageResolution, floorplan_div)
Captures the screen image and creates a single page PDF, which is attached to email
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 |
floorplan_div |
string | div on which CADViewer is places |
cvjs_saveScreenAsPDF_uploadServer(pageOrientation, pageSize, pageResolution, floorplan_div)
Captures the screen image and creates a single page PDF, which is uploaded to Sharepoint server
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 |
floorplan_div |
string | div on which CADViewer is places |
cvjs_saveSpaceObjects(floorplan_div, filepath, custom_content)
Saves Space Objectws to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
filepath |
String | file path |
custom_content |
object | custom controlled information |
cvjs_saveStamp(fileName, floorplan_div, layer)
Saves a stamp layer to a file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of Element on which CADViewer is located |
layer |
object | Layer with custom information , roomLayer |
cvjs_saveStickyNoteInfo(fileName, floorplan_div, custom_content)
Saves all stickynote content as - xml wrapped content: userid, id, name, date, text, page
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of Element on which CADViewer is located |
custom_content |
object | custom controlled information |
cvjs_saveStickyNotesRedlines(floorplan_div, display_modal, custom_content)
Saves redlines and sticky notes to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
display_modal |
boolean | display save modal. If undefined -> true |
custom_content |
object | custom controlled information |
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 |
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 |
cvjs_searchTextInstance(searchString, zoomFactor, textInstance) → {boolean}
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 |
Returns:
true if found, otherwise false
- Type
- boolean
cvjs_sendCustomCanvasToBack(floorplan_div)
Sends the custom canvas to back - used for drawings with static filled polygons
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_sendCustomCanvasToFront(floorplan_div)
Brings the custom canvas to front - default
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_setAngular(mode)
Set Angular Mode
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | set flag for Angular mode. Default is false |
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 |
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" |
cvjs_setBackgroundColor(floorplan_div)
Calls modal for setting background color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setBackgroundColorHex(color, floorplan_div)
Set the background color of CADViewer canvas, using HEX
Parameters:
Name | Type | Description |
---|---|---|
color |
hex | of background, hex string, omit # |
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setCallbackForModalDisplay(callbackForkModalDisplay, customModalPopUpBody, populateMyCustomModalPopUpBody)
Space Object modals control for external retrieval of modal data.
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 |
cvjs_setCallbackMeasurement(callbackMode)
Sets measurements to be echoed through method cvjs_measurementCallback(cvjs_currentMeasurementLength, cvjs_units[cvjs_active_floorplan_div_nr]);
Parameters:
Name | Type | Description |
---|---|---|
callbackMode |
boolean | false is default, true if measurement shall be echoed through method |
cvjs_setCallbackMethod(callbackMethodName, callbackMethod)
Set Custom implementation of Callback Methods:
Methods implemented:
cvjs_OnLoadEnd()
cvjs_graphicalObjectOnChange(type, graphicalObject, spaceID)
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 |
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 |
cvjs_setCollaborationServerFolder(server_path)
Sets the server path for collaboration content
Parameters:
Name | Type | Description |
---|---|---|
server_path |
string | : default is "C:\\xampp\\htdocs\\CV-JS_2_4_1\\php\\collaboration\\"; |
cvjs_setCollaborationServerUrl(url_name)
Sets the server Url for collaboration content
Parameters:
Name | Type | Description |
---|---|---|
url_name |
string | : default is "../php/collaboration/"; |
cvjs_setCollaborationSessionName(sessions_name)
Sets the sessions name for the collaboration session
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 |
cvjs_setCompareDrawings_LoadSecondDrawingDirect(floorplan_div, fileName)
Sets the name of the second drawing for compare load, bypassing load modal
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
fileName |
string | name of drawing |
cvjs_setCompareDrawings_StandardModal(floorplan_div)
Second drawing in compare files are set to be loaded via modal - default action
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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 |
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 |
cvjs_setCreationMode(cvjs_supressPopUp, cvjs_creationMode, excludeID)
Sets the display mode of Space Object modals
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. |
cvjs_setCurrentLanguage(language, floorplan_div)
Updates all modeals and callouts based on currentLanguage
Parameters:
Name | Type | Description |
---|---|---|
language |
int | language as a index from the XML language settings file |
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setCurrentMeasurementUnits(floorplan_div, units, svgToWorldUnit)
Sets Unit and Measurement World Unit Transformation on current page
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_setCurrentNodeValues(currentNode_underbar, currentNode_name, currentNode_id, currentNode_layer, currentNode_group, currentNode_attributes, currentNode_attributeStatus, currentNode_type, currentNode_tags, currentNode_occupancy, currentNode_linked, currentNode_translate_x, currentNode_translate_y, currentNode_scale_x, currentNode_scale_y, currentNode_rotate, currentNode_transform, currentNode_area)
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. |
currentNode_translate_x |
string | translation x after move |
currentNode_translate_y |
string | translation y after move |
currentNode_scale_x |
string | scale after resize |
currentNode_scale_y |
string | scale after resize |
currentNode_rotate |
string | rotation |
currentNode_transform |
string | Set of transformation on current object |
currentNode_area |
string | The area of the object |
cvjs_setCurrentRedlineValues(currentRedline_underbar, currentRedline_name, currentRedline_id, currentRedline_layer, currentRedline_group, currentRedline_color, currentRedline_StrokeWidth, currentRedline_drawingRotation)
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_drawingRotation |
int | rotation angle of drawing |
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, currentRedline_drawingRotation)
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 |
currentRedline_drawingRotation |
string | rotation of the page the redline is done on |
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". |
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 |
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 |
cvjs_setCurrentRedlineValues_StrokeWidth(currentRedline_StrokeWidth)
Sets the current Redlines value
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_StrokeWidth |
float | width of the Redline |
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 |
cvjs_setCurrentSpaceObjectNodeValues(currentNode_underbar, currentNode_name, currentNode_id, currentNode_layer, currentNode_group, currentNode_attributes, currentNode_attributeStatus, currentNode_type, currentNode_tags, currentNode_occupancy, currentNode_linked, currentNode_translate_x, currentNode_translate_y, currentNode_scale_x, currentNode_scale_y, currentNode_rotate, currentNode_transform, currentNode_area)
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. |
currentNode_translate_x |
string | translation x after move |
currentNode_translate_y |
string | translation y after move |
currentNode_scale_x |
string | scale after resize |
currentNode_scale_y |
string | scale after resize |
currentNode_rotate |
string | rotation |
currentNode_transform |
string | Set of transformation on current object |
currentNode_area |
string | The area of the object |
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 |
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, currentStickyNote_drawingRotation)
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 |
currentStickyNote_drawingRotation |
int | rotation of page on which the note is on |
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. |
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. |
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 |
cvjs_setCustomMergedEmailHandler(handlerName)
Sets the name of server side handler to custom control merged content sent as email
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setCustomModalsContent(hbody, dual_hbody_flag, hbody2)
Sets Space Object modals to custom type
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 |
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
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 |
cvjs_setCustomPDFprintController(handlerName)
Sets the name of server side controller to custom control print as PDF inside print modal
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
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()
Parameters:
Name | Type | Description |
---|---|---|
customPrintAsPDF |
boolean | default is false. Set to true to custom implement this feature |
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 |
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 |
cvjs_setCustomTopMenuXML(xml_config_file, floorplan_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
Parameters:
Name | Type | Description |
---|---|---|
xml_config_file |
String | XML top menu configuration file |
floorplan_div |
String | div in which CADViewer is implemented |
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 |
cvjs_setDgnWorkSpace(workspace, workspacepath)
Sets the DGN workspace file
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. |
cvjs_setDgnWorkSpaceServerPath(workspacepath)
Sets the DGN workspace internal Server Path
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. |
cvjs_setDisableClickDrag(flag)
Control if interactive drag inside a space, shall be disabled or not
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | false for interactive drag, true to disable, false is default. |
cvjs_setDragBackgroundOnTop(floorplan_div)
Moves the drag background on top, typically for image and text intensive PDF files
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_setDragBackgroundToBack(floorplan_div)
Moves the drag background to its default position, at the back, typically for CAD files
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of Element on which CADViewer is located |
cvjs_setFileLoadTimeOut(floorplan_div, timeout)
Sets the time-out wait for file load
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
timeout |
int | The time-out in seconds |
cvjs_setFileModalEditMode(mode)
Controls if the File Modal shall allow edit mode
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | suppress edit mode in file modal. |
cvjs_setGenericColor()
Calls modal for setting redline color
cvjs_setGetFileController(handlerName)
Sets the name of server side controller to load drawings after conversion
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setGlobalSpaceImageObjectScaleFactor(factor)
Sets a scale factor of Image Space Objects when placed out in the canvas
Parameters:
Name | Type | Description |
---|---|---|
factor |
float | scalefactor, default is 1.0 |
cvjs_setHandlerSettings(handlerType, floorplan_div)
Set the Handers for server communication
Parameters:
Name | Type | Description |
---|---|---|
handlerType |
String | the following settings are implemented: 'ReactJS', 'Angular', 'DotNET', 'PHP', 'Servlets', NodeJS' |
floorplan_div |
String | the floorplan div in which CADViewer is running |
cvjs_setIconInterfaceControls_ClassicSkin(mode, floorplan_div)
Set the classic icon desk, larger on desktop, smaller on devices
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer |
cvjs_setIconInterfaceControls_ClassicSkin_DevicesSizeOnly(mode, floorplan_div)
Set the classic icon desk, device size on all platforms
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer |
cvjs_setIconInterfaceControls_DisableIcons(mode, floorplan_div)
Removes the icon interface for viewing, redlining, etc. so that developers can control their own interface
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer |
cvjs_setIconInterfaceControls_ImageInsert()
Sets the icon interface for enabling image insert
cvjs_setIconInterfaceControls_MimimumDisk(mode, floorplan_div)
Set minimum icon desk, same size on all platforms
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer |
cvjs_setIconInterfaceControls_PageModal(mode, disableNavButtons, floorplan_div)
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 |
floorplan_div |
String | the div running CADViewer |
cvjs_setIconInterfaceControls_PanZoomDisk(mode, floorplan_div)
Set panzoom desk, same size on all platforms
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer |
cvjs_setIconInterfaceControls_SpaceManagement(floorplan_div)
Sets the icon interface for enabling space management
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setIconInterfaceControls_ViewingOnly(floorplan_div)
Sets the icon interface for viewing, layerhanding, measurement, etc. only
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setImageSpaceObjectParameters(loadSpaceImage_Location, loadSpaceImage_ID, loadSpaceImage_Type, loadSpaceImage_Layer)
Sets the parameters when creating an Image Space Object
Parameters:
Name | Type | Description |
---|---|---|
loadSpaceImage_Location |
string | location of the image object (SVG or bitmap) |
loadSpaceImage_ID |
string | ID of the Image Space Object |
loadSpaceImage_Type |
string | Type of the Image Space Object |
loadSpaceImage_Layer |
string | name of div containing CADViewer canvas |
cvjs_setInformationModalType(modal)
Activates and displays the information modal with text
Parameters:
Name | Type | Description |
---|---|---|
modal |
int | type, 1 for bootstrap modal, 2 for standard floating modal, default is bootstrap modal |
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
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true for standard load, false for overlay of drawings on concequitive loads. |
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/" |
cvjs_setInsertImageObjectsAbsolutePath_FileName(path, serverPath, fileName)
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/" |
fileName |
string | filename, "myobject.js" |
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/" |
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 |
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 |
cvjs_setJSFileOldType(oldtype)
Sets the loading of filetypes to be the old CADViewer type, in which each file consists of four separate files
Parameters:
Name | Type | Description |
---|---|---|
oldtype |
boolean | true for oldtype, false for standard new type. Default is false. |
cvjs_setLanguage(Language)
Set the language in CADViewer
Parameters:
Name | Type | Description |
---|---|---|
Language |
string | name of the language |
cvjs_setLicenseKeyDirect(licensekey)
Pass over the license key directly
The command will activate the license key
Parameters:
Name | Type | Description |
---|---|---|
licensekey |
String | string containing the license key JSON array |
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
Parameters:
Name | Type | Description |
---|---|---|
licensePath |
String | path to the license key location |
cvjs_setLoadMultipleRedlinesStickyNotes(mode:)
Sets the mode for loading multiple redlines and overlay the previous loaded
Parameters:
Name | Type | Description |
---|---|---|
mode: |
boolean | true to overlay redlines, false to clear redline when new is loaded, default is false |
cvjs_setMergeDXF(floorplan_div)
Calls modal for merge DXF document
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setMultiSelect(multiSelect)
Controls the multiselect variable status
Parameters:
Name | Type | Description |
---|---|---|
multiSelect |
boolean | multiselect flag, default is false |
cvjs_setNodeJSserver(mode)
Set NodeJS Server flag
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | set flag for nodejs handling. NodeJS server behaves differently for print, default false |
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 |
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
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 |
cvjs_setPasswordProtectionServerAccess(passwordprotection)
Sets password protection for Server Access
Parameters:
Name | Type | Description |
---|---|---|
passwordprotection |
boolean | true for passwordprotection, false otherwise |
cvjs_setPhpPath(path)
Sets the location to the php folder
Parameters:
Name | Type | Description |
---|---|---|
path |
string | current location of php scripts, typically ../php/ |
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 |
cvjs_setPrintModal_printGreyScaleflag(printGreyScaleflag)
Controls if GreyScale feature is included in print Modal
Parameters:
Name | Type | Description |
---|---|---|
printGreyScaleflag |
boolean | true is default, set to false to hide printGreyScaleflag in Print Modal |
cvjs_setPrintModal_PrintPDF(printPDFflag, printAsPDF)
Controls if Print to PDF feature is included in print Modal
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 |
cvjs_setPrintModal_PrintToScale(printToScaleflag)
Controls if Print to Scale feature is included in print Modal
Parameters:
Name | Type | Description |
---|---|---|
printToScaleflag |
boolean | true is default, set to false to hide PrintToScale in Print Modal |
cvjs_setPrintModalCustomCheckBox(mode, print_modal_custom_checkbox)
Extents the Print Modal with a custom controlled checkbox
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Add checkbox to interface, default is false |
print_modal_custom_checkbox |
string | name of the custom method branch |
cvjs_setPrintModalCustomCheckBoxFromFile(mode, print_modal_custom_checkbox)
Extents the Print Modal with a custom controlled checkbox
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" |
cvjs_setPrintModalCustomDualTextBox(mode, custom_textbox_variables_list_filename)
Extents the Print Modal with a custom controlled textbox
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$$$ |
cvjs_setPrintModalCustomDualTextBoxFromFile(mode, custom_textbox_variables_list_filename)
Extents the Print Modal with a custom controlled textbox
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$$$ |
cvjs_setPrintModalCustomTextBox(mode, print_modal_custom_textbox_variables_list)
Extents the Print Modal with a custom controlled textbox
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$$$ |
cvjs_setPrintModalCustomTextBoxFromFile(mode, custom_textbox_variables_list_filename)
Extents the Print Modal with a custom controlled textbox
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$$$ |
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/" |
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 |
cvjs_setPrintOrientation(orientation)
Sets the print orientation
Parameters:
Name | Type | Description |
---|---|---|
orientation |
string | print orientation, portrait or landscape |
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 |
cvjs_setPrintPaperSizeasSVGObject(mode)
Controls if the Print object in standard print shall be SVG based or based on HTML5 bitmap object
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | default is true = SVG based print object |
cvjs_setPrintResolutionDpi(dpi)
Sets the print resolution
Parameters:
Name | Type | Description |
---|---|---|
dpi |
int | print resolution in dpi, minumum is 75dpi, standard is 300 |
cvjs_setPublishPDF(floorplan_div)
Calls modal for publish PDF document
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setQRCodeInsertion(PercentXFromLowerLeft, PercentYFromLowerLeft, cvjs_widthPercent)
Sets the insertion location of QR Codes
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 |
cvjs_setRedlineColor(floorplan_div)
Calls modal for setting redline color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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/" |
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" |
cvjs_setRedlineThickness(floorplan_div)
Calls modal for setting redline color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
cvjs_setRelativeScriptsPath(scriptsPath)
Set the scripts path to folder with CADViewer javascripts
Parameters:
Name | Type | Description |
---|---|---|
scriptsPath |
string | paths to Scripts, typically "../javascripts" |
cvjs_setRestApiController(myConverterDoc)
Set the engine controller document handling conversions
Parameters:
Name | Type | Description |
---|---|---|
myConverterDoc |
string | name of the document handling conversions |
cvjs_setRestApiControllerLocation(myAXlocation)
Set the engine controller location for this library,
Parameters:
Name | Type | Description |
---|---|---|
myAXlocation |
string | location of the server side autoXchange structure |
cvjs_setReturnPDFparamsController(handlerName)
Sets the name of server side controller to return path structure for PDF conversion
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerAccessToPost(flag)
Sets ajax call for server access call for Post
jQuery.ajax({
type: 'POST',
url: serverUrl,
data: JSON.stringify(object),
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | true for Post, false standard php case |
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',
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | true for servlets, false standard php case |
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 |
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 |
cvjs_setServerBackEndUrl(ServerLocationBackEndUrl)
Pass over the current settings for ServerLocationbackendUrl
Parameters:
Name | Type | Description |
---|---|---|
ServerLocationBackEndUrl |
string | server location of html Element on which CADViewer is located |
cvjs_setServerCopyFileHandler(handlerName)
Sets the name of server side copy-file controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerCreateThumb_StickyNote_Controller(controller)
Sets the server controller to save screen as bitmap and create thumbnails
Parameters:
Name | Type | Description |
---|---|---|
controller |
String | the name of the controller |
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 |
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 |
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 |
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 |
cvjs_setServerGetQRCodeController(serverGetQRCodeController)
Sets the insertion location of QR Codes
Parameters:
Name | Type | Description |
---|---|---|
serverGetQRCodeController |
String | controller name |
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 |
cvjs_setServerListDirectoryHandler(handlerName)
Sets the name of server side directory list controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerLoadHandler(handlerName)
Sets the name of server side load-file controller document for file list load
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
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 |
cvjs_setServerLocationURL(ServerLocation, ServerURL)
Pass over the current settings of the calling html document context
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 |
cvjs_setServerMergeDWGHandler(handlerName)
Sets the name of server side merge DWG controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerPDFConverterController(handlerName)
Sets the name of server side controller to control PDF conversion
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerRedlinesListDirectoryHandler(handlerName)
Sets the name of server side directory redlines list controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
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 |
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 |
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 |
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
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() |
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
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() |
cvjs_setServerScreenToPDFController(controller)
Sets the server ScreenToPDF PHP controller document
Parameters:
Name | Type | Description |
---|---|---|
controller |
String | The location of this document is in: cvjs_phpPath if php, else it will use handler folder. |
cvjs_setServerScreenToPDFHandler(controller)
Sets the server ScreenToPDF PHP controller document
Parameters:
Name | Type | Description |
---|---|---|
controller |
String | The location of this document is in: cvjs_phpPath if php, else it will use handler folder. |
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,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
var jsonStructure = { "path": path,
"tags": tags,
"node": node,
"area": area,
"outerhtml": outerHTML,
"occupancy": occupancy,
"name": name,
"type": type,
"id": id,
"defaultcolor": defaultcolor,
"layer": layer,
"group": group,
"linked": linked,
"attributes": attributes,
"attributeStatus": attributeStatus,
"displaySpaceObjects": displaySpaceObjects,
"translate_x": translate_x,
"translate_y": translate_y,
"scale_x": scale_x ,
"scale_y": scale_y ,
"rotate": rotate,
"transform": transform}
Parameters:
Name | Type | Description |
---|---|---|
jsonSpaceObject |
Object | Object with the entire space objects content |
Returns:
flag - true if created, otherwise false
- Type
- boolean
cvjs_setSpaceObjectOnLayer(floorplan_div, objectID, layerName)
Associate Space Object with a Layer
Parameters:
Name | Type | Description |
---|---|---|
floorplan_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 |
cvjs_setSpaceObjectOnOff(floorplan_div, objectID, displayStatus)
Set the display status of Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
objectID |
string | id of the space object |
displayStatus |
string | "on" to display, "off" to hide, default is "on" |
cvjs_setSpaceObjectsAbsolutePath(path, serverPath)
Sets the absolute path for the space object location, relative path is not used
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/" |
cvjs_setSpaceObjectsDefaultLayer(floorplan_div, layerName)
Set the creation layer for Space Objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of floorplan div |
layerName |
string | name of the layer field of the Space Object |
cvjs_setSpaceObjectUrl(file)
Sets the name and url of the Space Object file to load, The Space Object file is has the extension .js
Parameters:
Name | Type | Description |
---|---|---|
file |
string | String containg url and name of space_object.js file |
cvjs_setSpacePolygonOnLayer(floorplan_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.
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer canvas |
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 |
cvjs_setStickyNoteSaveRedlineUrl(file)
Sets the name and url of the redline file to save. The redline file can be .js , .dxf or .xml
Parameters:
Name | Type | Description |
---|---|---|
file |
string | String containg url and name of redline.js/redline.ext file |
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: