function paste(copyData) {
    if (copyData === undefined) return;
    var data = JSON.parse(copyData);
    if (!data.logixClipBoardData) return;

    var currentScopeId = globalScope.id;
    for (let i = 0; i < data.scopes.length; i++) {
        if (scopeList[data.scopes[i].id] === undefined) {
            var isVerilogCircuit = false;
            var isMainCircuit = false;
            if(data.scopes[i].verilogMetadata) {
                isVerilogCircuit = data.scopes[i].verilogMetadata.isVerilogCircuit;
                isMainCircuit = data.scopes[i].verilogMetadata.isMainCircuit;
            }
            var scope = newCircuit(data.scopes[i].name, data.scopes[i].id, isVerilogCircuit, isMainCircuit);
            loadScope(scope, data.scopes[i]);
            scopeList[data.scopes[i].id] = scope;
        }
    }

    switchCircuit(currentScopeId);
    var tempScope = new Scope(globalScope.name, globalScope.id);
    var oldOx = globalScope.ox;
    var oldOy = globalScope.oy;
    var oldScale = globalScope.scale;
    loadScope(tempScope, data);

    var prevLength = tempScope.allNodes.length;
    for (let i = 0; i < tempScope.allNodes.length; i++) {
        tempScope.allNodes[i].checkDeleted();
        if (tempScope.allNodes.length != prevLength) {
            prevLength--;
            i--;
        }
    }

    var approxX = 0;
    var approxY = 0;
    var count = 0;

    for (let i = 0; i < updateOrder.length; i++) {
        for (let j = 0; j < tempScope[updateOrder[i]].length; j++) {
            const obj = tempScope[updateOrder[i]][j];
            obj.updateScope(globalScope);
            if (obj.objectType != 'Wire') {
                approxX += obj.x;
                approxY += obj.y;
                count++;
            }
        }
    }

    for (let j = 0; j < tempScope.CircuitElement.length; j++) {
        const obj = tempScope.CircuitElement[j];
        obj.updateScope(globalScope);
    }

    approxX /= count;
    approxY /= count;

    approxX = Math.round(approxX / 10) * 10;
    approxY = Math.round(approxY / 10) * 10;


    for (let i = 0; i < updateOrder.length; i++) {
        for (let j = 0; j < tempScope[updateOrder[i]].length; j++) {
            const obj = tempScope[updateOrder[i]][j];
            if (obj.objectType !== 'Wire') {
                obj.x += simulationArea.mouseX - approxX;
                obj.y += simulationArea.mouseY - approxY;
            }
        }
    }

    Object.keys(tempScope).forEach((l) => {
        if (tempScope[l] instanceof Array && l !== 'objects' && l !== 'CircuitElement') {
            globalScope[l].extend(tempScope[l]);
        }
    });
    for (let i = 0; i < tempScope.Input.length; i++) {
        tempScope.Input[i].layoutProperties.y = getNextPosition(0, globalScope);
        tempScope.Input[i].layoutProperties.id = generateId();
    }
    for (let i = 0; i < tempScope.Output.length; i++) {
        tempScope.Output[i].layoutProperties.x = globalScope.layout.width;
        tempScope.Output[i].layoutProperties.id = generateId();
        tempScope.Output[i].layoutProperties.y = getNextPosition(globalScope.layout.width, globalScope);
    }
    var canvasUpdate = true;
    updateSimulationSet(true);
    updateSubcircuitSet(true);
    scheduleUpdate();
    globalScope.ox = oldOx;
    globalScope.oy = oldOy;
    globalScope.scale = oldScale;


    forceResetNodesSet(true);
}
Helper function to paste
@param {JSON} copyData - the data to be pasted
@category events