// Paste CustomData function Main() { if (!fw.selection || !fw.selection.length) return; var dom = fw.getDocumentDOM(); var origSel = fw.selection; var data = null; dom.selectNone(); dom.clipPaste("do not resample", "vector"); if (fw.selection.length) { data = fw.selection[0].customData; dom.deleteSelection(false); } fw.selection = origSel; if (data) { var isEmpty = true; for (var prop in data) { isEmpty = false; break; } if (isEmpty) { var okToPasteEmpty = fw.yesNoDialog("Data set is empty, continue?"); if (!okToPasteEmpty) { return; } } var i = fw.selection.length; while(i--) { fw.selection[i].customData = data; } } } Main();