TheSwamp

Code Red => VB(A) => Topic started by: Tuoni on June 07, 2007, 08:46:54 AM

Title: Copy object for use in another program
Post by: Tuoni on June 07, 2007, 08:46:54 AM
OK... I have looked hard for this but I can't find a way to do it... is it possible or am I flogging a dead horse?

I want to programmatically copy an object (for example a polyline) from modelspace in AutoCAD and insert/paste it into another program without having the background which is brought with it (we use black across the board here).

I have currently got a script which gets the bounding box of each object on the drawing and programmatically does a sendcommand("_COPYCLIP") - far from ideal for two reasons:

1) It takes the background with it
2) It does not copy fast enough to be pasted into the target application - I end up with lots of clones of the same object.

So... is this possible?  I'm not looking for code, just a nudge in the right direction :)
Title: Re: Copy object for use in another program
Post by: Guest on June 07, 2007, 10:03:41 AM
The only thing that I can think of is to WMFOUT selected objects (which won't bring along the black background), then have the program insert the WMF file from the saved location.

Other than that, I got nothing!
Title: Re: Copy object for use in another program
Post by: DaveW on June 07, 2007, 11:28:01 AM
Try copybase