CADViewer Technical Documentation, Installation Guide and Reference Samples Library

Redlines Formats

Redlines and SticyNote shares a common javascript structure in CADViewer v6.

For CADViewer v7 and CADViewer v8, the data-structure of Redlines and StickyNotes have been updated to a JSON based structure similar to Space Objects.

CADViewer 7/CADViewer 8 Redline Format

The base JSON structure for a CADViewer 7/CADViewer 8 Redline Object is:

When using the general JSON extration method, see Functional implementation for Redline/StickyNotes , all redlines are consolidated into a {‘RedlineObjects’:[]} structure.

var RedlineObject = { 	"node":  node,
                        "outerhtml": outerhtml,
                        "name":  name,
                        "type":  type,
                        "id":  id,
                        "layer":  layer,
                        "group":  layer,
                        "color":  color,
                        "strokeWidth":  strokeWidth,
                        "fill":  fill,
                        "username":  username,
                        "userid":  userid,
                        "currentPage":  currentPage,
                        "triange_design":  triangle_design,
                        "polypath_arrow":  polypath_arrow,
                        "redline_text":  redline_text,
                        "redline_font_size":  redline_font_size,
                        "fill_opacity":  fill_opacity,
                        "transform":  transform,
                        "drawingRotation":  drawingRotation
}

CADViewer 7/CADViewer 8 StickyNote Format

The base JSON structure for a CADViewer 7 /CADViewer 8 StickyNote Object is:

When using the general JSON extration method, see Functional implementation for Redline/StickyNotes , all stickynotes are consolidated into a {‘StickyNoteObjects’:[]} structure.

var StickyNoteObject = {    "node":  node,
                            "outerhtml": outerhtml,
                            "name":  name,
                            "id":  id,
                            "layer":  layer,
                            "group":  layer,
                            "text":  text,
                            "userid":  userid,
                            "currentPage":  currentPage,
                            "date":  date,
                            "linked":  linked,
                            "transform":  transform,
                            "drawingRotation":  drawingRotation,
                        }

CADViewer 6 - Javascript Format for Redlines and StickyNotes

In CADViewer version 6, all Redlines and StickyNotes are consolidated into a single javascript structure.

Note: that this structure cannot be loaded into CADViewer when running under a frame-work (ReactJS, VueJS, Angular, etc.), therefore for the frame-works use CADViewer 7.

var cvjs_stickyNotesRedlines_Base = {
					0: {
						node: "RED_1",
						name: "redline1",
						id: "1",
						layer: "RedLineLayer",
						group: "unassigned",
						color: "#ffa500",
						strokeWidth: "3",
						fill: "#ffa500",
						username: "James Smith",
						userid: "user_01",
						currentPage: 1,
						triangle_design: "none",
						polypath_arrow: "none",
						redline_text: "none",
						fill_opacity: "0.1",
						transform: "none",
						drawingRotation: 0
					}	
}

function cvjs_setUpStickyNotesRedlines(paper){

var cItemRed1= paper.path("M510.58354806405697,941.9953880236635L1009.5158180567371,914.9529885660656L991.9382584092984,1366.5610595079495L933.7970995754631,1384.1386191553881L513.2877880098167,983.9111071829402L513.2877880098167,983.9111071829402L513.2877880098167,983.9111071829402L510.58354806405697,941.9953880236635Z    ").attr({stroke: "#ffa500", "stroke-width": "3", "fill": "#ffa500", "fill-opacity": "0.1"})
.data("node","RED_1");
vqRedlines.push(cItemRed1);
cvjs_stickyNotesRedlines.push(cvjs_stickyNotesRedlines_Base[0]);
 cvjs_redline=1; 
 cvjs_stickynote=0; 
}

jQuery(document).ready(function() { 
	stickynotesRedlines_loaded = true; 
}); 
stickynotesRedlines_loaded = true; 
Last updated on 4 Feb 2023
Published on 9 Apr 2020