View Single Post
Rather than building this structure from the ground up, maybe converting the output of option 2 would be quicker.

This fragment should remove the connecting lines and set the notes field to have the label string. It's worth about what you paid for it :-)

tell application "OmniGraffle Professional 5"
	tell canvas of front window
		set myGraphics to every graphic
		repeat with myGraphic in myGraphics
			tell myGraphic
				if class is shape then
					set myProps to properties
					set labeltext to myProps's text
					set notes to last item of labeltext -- must be a better way, but what is it?
				else if class of myGraphic is line then
					delete myGraphic
				end if
			end tell
		end repeat
	end tell
end tell
You could use the choose file with multiple selections allowed construct to prompt you for the files you want to keep or exclude, then go down the list deleting the unwanted ones.