Author Topic: ClipBoard Functions  (Read 6965 times)

0 Members and 1 Guest are viewing this topic.

LE

  • Guest
ClipBoard Functions
« on: December 21, 2005, 11:18:27 AM »
There is now under the "downloads" [freeones] section a new ARX application that includes the following functions:

(SetClipboardText [String])
(GetClipboardText)
(EmptyClipboard)

For AutoCAD 2004-2006 and Verticals.

ClipBoard.arx [67KB]

Quote
LUIS ESQUIVEL PROVIDES THIS PROGRAM "AS IS" AND WITH
ALL FAULTS. LUIS ESQUIVEL SPECIFICALLY DISCLAIMS ANY
IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE. LUIS ESQUIVEL DOES NOT WARRANT THAT
THE OPERATION OF THE PROGRAM WILL BE UNINTERRUPTED
OR ERROR FREE.

http://www.geometricad.com

Best regards;
Luis.

Crank

  • Swamp Rat
  • Posts: 1441
Re: ClipBoard Functions
« Reply #1 on: December 21, 2005, 01:52:14 PM »
(startapp "clipbrd")

 Vault Professional 2018     /      Building Design Suite Ultimate 2017     /     AEC Collection 2018 + 2019 +2020

LE

  • Guest
Re: ClipBoard Functions
« Reply #2 on: December 21, 2005, 02:15:13 PM »
(startapp "clipbrd")

I do not understand.... ?

The idea is to provide to the end user these new functions and use them directly in their lisp routines, there is DOSlib tm by Dale Fugier, an excellent extended application, but most of the lisp programmers would prefer to have an small size 3d party app, and without the message loading... for the proprietary issue.

Have fun.
« Last Edit: December 21, 2005, 09:35:36 PM by LE »

GDF

  • Water Moccasin
  • Posts: 1992
Re: ClipBoard Functions
« Reply #3 on: December 21, 2005, 03:07:31 PM »
Thanks Luis.

I can make good use of your function.

I've added this to my mnl file:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; AutoLoad Clipboard Application ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; http://www.geometricad.com
;;; by Luis Esquivel
;;; ClipBoard Functions:
;;; Usage: (SetClipboardText <String>)
;;; Usage: (GetClipboardText)
;;; Usage: (EmptyClipboard)
(defun ARCH:ClipBoard  ()
  (cond ((>= (distof (substr (getvar "acadver") 1 4)) 16.0)
         (if (not (member "clipboard.arx" (arx)))
           (arxload (findfile (strcat ARCH#SUPF "V_16/clipboard.arx")))))
        )
  (princ))


Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2019x64 Windows 10x64

LE

  • Guest
Re: ClipBoard Functions
« Reply #4 on: December 21, 2005, 09:37:14 PM »
Thanks Luis.

I can make good use of your function.


You are welcome, and that's the idea.

LE

  • Guest
Re: ClipBoard Functions
« Reply #5 on: December 21, 2005, 09:41:44 PM »
ClipBoard Functions C++ project solution [open source], may be available if required, for future or previous release version's of AutoCAD.

supportATgeometricadDOTcom

Regards.

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
Re: ClipBoard Functions
« Reply #6 on: December 22, 2005, 06:29:56 PM »
The idea is to provide to the end user these new functions and use them directly in their lisp routines ...

slaps forehead Doh, now I get it!

Many thanks Luis, very  :kewl:
TheSwamp.org  (serving the CAD community since 2003)

LE

  • Guest
Re: ClipBoard Functions
« Reply #7 on: December 22, 2005, 07:01:11 PM »
Here are some little sample on how to use the functions:

Code: [Select]
;; to set some text to the clipboard
_$ (SetClipboardText "This is a way to sent into the ClipBoard some text data")
T

;; here we can get the text inside the clipboard, coming from any application
_$ (setq string (GetClipboardText))
"This is a way to sent into the ClipBoard some text data"

;; this will empty the clipboard coming from any application
_$ (EmptyClipBoard)

T

HTH
« Last Edit: December 22, 2005, 07:10:15 PM by LE »

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
Re: ClipBoard Functions
« Reply #8 on: December 23, 2005, 12:31:38 PM »
Man that works like a charm Luis. Muchas gracias mi amigo.  :-)
TheSwamp.org  (serving the CAD community since 2003)

LE

  • Guest
Re: ClipBoard Functions
« Reply #9 on: December 23, 2005, 01:02:14 PM »
Man that works like a charm Luis. Muchas gracias mi amigo.  :-)

 :-)

LE3

  • Guest
Re: ClipBoard Functions
« Reply #10 on: November 05, 2010, 12:05:20 PM »
Never uploaded the source code for these functions, and before the code it is lost, here it is just in case:

Code: [Select]
//-----------------------------------------------------------------------------
//----- acrxEntryPoint.h
//-----------------------------------------------------------------------------
#include "StdAfx.h"
#include "resource.h"

//-----------------------------------------------------------------------------
#define szRDS _RXST("LESQ")

//-----------------------------------------------------------------------------
//----- ObjectARX EntryPoint
class Cclipboard17App : public AcRxArxApp {

public:
Cclipboard17App () : AcRxArxApp () {}

virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
// TODO: Load dependencies here

// You *must* call On_kInitAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;

acutPrintf(_T("\n\nClipBoard Functions:"));
acutPrintf(_T("\nUsage: (SetClipboardText <String>)"));
acutPrintf(_T("\nUsage: (GetClipboardText)"));
acutPrintf(_T("\nUsage: (EmptyClipboard)\n\n"));

return (retCode) ;
}

virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
// TODO: Add your code here

// You *must* call On_kUnloadAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;

// TODO: Unload dependencies here

return (retCode) ;
}

virtual void RegisterServerComponents () {
}

public:

// ----- ads_setclipboardtext symbol (do not rename)
static int ads_setclipboardtext(void)
{
struct resbuf *rb=acedGetArgs();
LPCTSTR pszText;
// temp string just for testing
CString tmp;

// get the argument
if (rb && (rb->restype==RTSTR)){
pszText=rb->resval.rstring;
rb=rb->rbnext;
tmp=pszText;
}
...

The complete source code below for download:

Pad

  • Bull Frog
  • Posts: 305
Re: ClipBoard Functions
« Reply #11 on: November 05, 2010, 12:27:43 PM »
Hi LE

could you upload the arx as well please.
the http://www.geometricad.com/ site seems to be no longer.

Thanks
P

LE3

  • Guest
Re: ClipBoard Functions
« Reply #12 on: November 05, 2010, 12:36:45 PM »
I will... also the version for AutoCAD 2010 and 2011... as soon as I can - and guess to upload also the visual studio solutions - so anyone here can make his/her own builds. 


could you upload the arx as well please.

LE3

  • Guest
Re: ClipBoard Functions
« Reply #13 on: November 05, 2010, 12:42:05 PM »
Here they are the full source code (including the Visual Studio Solutions inside the zip for 16&17) and the binaries for AutoCAD 16, 17 and 18 - later today will post the 18 too.

HTH

Note: Win32 versions only (included now the 18 version for AutoCAD 2010-2011 and verticals):
« Last Edit: November 05, 2010, 02:21:02 PM by LE »

Pad

  • Bull Frog
  • Posts: 305
Re: ClipBoard Functions
« Reply #14 on: November 05, 2010, 01:10:57 PM »
great thanks!