Author Topic: Clipboard Functions ?  (Read 1689 times)

0 Members and 1 Guest are viewing this topic.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Clipboard Functions ?
« on: August 17, 2014, 12:23:45 PM »
This line will clear the clipboard of all contents;

Code - Auto/Visual Lisp: [Select]
  1. (startapp "cmd /c \"echo off | clip\"" )
  2.  

Any ideas on how to check if the clipboard has any contents at all (not just text), specifically i am looking to see if a png image is in there.

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: Clipboard Functions ?
« Reply #1 on: August 17, 2014, 01:00:21 PM »
That line will clear only text clipboard contents... Pictures or other CAD entities stored in clipboard will remain there until you really quit CAD... I must say by my knowledge that there is no other way to empty it if objects are in memory... And to see what's stored, only way is to paste it...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Clipboard Functions ?
« Reply #2 on: August 17, 2014, 01:11:01 PM »
Marco,

I tested by pasting a png image into the clipboard, then executed the line of code, then tried to paste image. It was not there to paste.

Anyway I believe I can use the "GetClipboardSequenceNumber" and compare results before copying to clipboard and after, to be sure contents have changed.

Any thoughts on how to institute this.

Thanks,
Bruce

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: Clipboard Functions ?
« Reply #3 on: August 17, 2014, 02:05:16 PM »
Hmm... You are right, but something always remains in memory - empty MTEXT entity...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Clipboard Functions ?
« Reply #4 on: August 17, 2014, 02:35:42 PM »
I saw that to, that has to be something AutoCad is interpreting wrong, how could the clipboard go from containing a png file to an empty mtext entity without out pasting anything into it.