Board index » delphi » Copy dxf file onto the windows clipboard for pasting

Copy dxf file onto the windows clipboard for pasting

Does anyone know a simple way of copying an AutoCAD *.dxf file on to the
Windows clipboard , so that it can be pasted into a drawing package?
 

Re:Copy dxf file onto the windows clipboard for pasting


you can assign images to the clipboard using Assign.  The help file says the
following:

==============
Use Assign to copy pictures to and from the clipboard. For example, the
following code copies the bitmap from a TBitmap instance (Bitmap1) to the
clipboard.

Clipboard.Assign(Bitmap1);

If a bitmap is on the clipboard, the following code copies it to Bitmap1.

Bitmap1.Assign(Clipboard);

The Formats property lists the formats used by the clipboard. Different
kinds of graphic object (such as bitmaps and metafiles) have their own
formats. Use the HasFormat method to determine whether the information on
the clipboard is stored in a format compatible with the object you want to
assign it to.
==============

So, for example, if you have the image on your screen you can do the
following:

Clipboard.Assign(Image1.Picture);

HTH

Gord

Quote
"William" <wvido...@metse.com> wrote in message

news:3ef07f7a@newsgroups.borland.com...
Quote
> Does anyone know a simple way of copying an AutoCAD *.dxf file on to the
> Windows clipboard , so that it can be pasted into a drawing package?

Re:Copy dxf file onto the windows clipboard for pasting


Copying bitmaps to clipboard is not the what I want to achieve. The aim is
to select a AutoCAD file from within a Delphi app and copy and paste it in
AutoCAD itself. There appears to be scant documentation for other files
apart from text, images and WAV files.

W.

Quote
gc <gcu...@fimc.nospam.com> wrote in message

news:3ef36ae3$1@newsgroups.borland.com...
Quote
> you can assign images to the clipboard using Assign.  The help file says
the
> following:

> ==============
> Use Assign to copy pictures to and from the clipboard. For example, the
> following code copies the bitmap from a TBitmap instance (Bitmap1) to the
> clipboard.

> Clipboard.Assign(Bitmap1);

> If a bitmap is on the clipboard, the following code copies it to Bitmap1.

> Bitmap1.Assign(Clipboard);

> The Formats property lists the formats used by the clipboard. Different
> kinds of graphic object (such as bitmaps and metafiles) have their own
> formats. Use the HasFormat method to determine whether the information on
> the clipboard is stored in a format compatible with the object you want to
> assign it to.
> ==============

> So, for example, if you have the image on your screen you can do the
> following:

> Clipboard.Assign(Image1.Picture);

> HTH

> Gord

> "William" <wvido...@metse.com> wrote in message
> news:3ef07f7a@newsgroups.borland.com...
> > Does anyone know a simple way of copying an AutoCAD *.dxf file on to the
> > Windows clipboard , so that it can be pasted into a drawing package?

Re:Copy dxf file onto the windows clipboard for pasting


Quote
"William" <wvido...@metse.com> wrote in message

news:3ef80483@newsgroups.borland.com...

Quote
> Copying bitmaps to clipboard is not the what I want to achieve. The aim is
> to select a AutoCAD file from within a Delphi app and copy and paste it in
> AutoCAD itself. There appears to be scant documentation for other files
> apart from text, images and WAV files.

There are only a limited number of 'standard' clipboard formats, and DXF is
not one of them. Windows also supports something like 'custom clipboard
format', but these are not standard. One possibly hard way to build
clipboard communication with a certain feature in an app like AutoCAD, is
copying data from within AutoCAD first and taking a look at what's on the
clipboard with a good tool that allows you to see clipboard format
identifier strings and the raw data, next. If you can deduct what it is
(possible a custom format identified by a string and the pure dxf file data
if you're lucky), than maybe you can come up with code that builds similar
data, and copies it to the clipboard a format registered with the same
identifying string.

Joris

Re:Copy dxf file onto the windows clipboard for pasting


Quote
"Joris" <PleaseRepl...@TheGroupInstead.be> wrote in message <news:3ef99880@newsgroups.borland.com>...
> "William" <wvido...@metse.com> wrote in message
> news:3ef80483@newsgroups.borland.com...
> > Copying bitmaps to clipboard is not the what I want to achieve. The aim is
> > to select a AutoCAD file from within a Delphi app and copy and paste it in
> > AutoCAD itself. There appears to be scant documentation for other files
> > apart from text, images and WAV files.

> There are only a limited number of 'standard' clipboard formats, and DXF is
> not one of them. Windows also supports something like 'custom clipboard
> format', but these are not standard. One possibly hard way to build
> clipboard communication with a certain feature in an app like AutoCAD, is
> copying data from within AutoCAD first and taking a look at what's on the
> clipboard with a good tool that allows you to see clipboard format
> identifier strings and the raw data, next. If you can deduct what it is
> (possible a custom format identified by a string and the pure dxf file data
> if you're lucky), than maybe you can come up with code that builds similar
> data, and copies it to the clipboard a format registered with the same
> identifying string.

> Joris

Hello,
  Dear William, we have dxf export tool for Delphi.
www.cadsofttools.com. Maybe we can help you to solve the problem?
Best regards,
Evgeny,
i...@cadsofttools.com

Re:Copy dxf file onto the windows clipboard for pasting


Thanks for the tip Joris.

Other Threads