How to get paste blocking behavior

Started by bht, April 03, 2011, 08:10:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bht

Hi,

I discovered that it is useful to draw components in separate documents and then paste them into the main document (all with OLE eg document.paste(true, false)).

But with this I also discovered intermittent timing issues, in a way that the paste function returned before the document was ready for further manipulation.

My workaround solution was to add a delay.

Do you know a better way? Ideally, paste would block until the drawing is ready. Is there a way to schedule a callback for this? Or is there a function that I can call in a timer loop that returns some kind of document ready status?


Dr PR

bht,

Good question. Sorry I can't provide an answer.

When you paste into an existing file there are several things that effect how long it will be before the program is ready again for editing.

1. The larger the source and/or destination files are, the longer it takes the program to build the new display list. Really large copy objects (>10 Mbytes) can take quite a while to paste. If the destination file is also really large (>100 Mbytes) the delay can be up to a minute.

2. If the destination file is shaded (not wireframe) the program will stop to render the new objects. Again, in really large (>200 Mbytes) files this can take up to two hours (2.6 GHz 64 bit machine with 1000 MHz FSB).

The increase in time is not linear. A 2X size file takes more than twice as long as a 1X size file.

3. Other display details, like shadows in shaded images or all the little points in Point Select mode, will slow things down.

4. The more windows you have open the longer it takes to regenerate the display.

****

When I am doing these things manually, after starting the operation I click on an item in the menu bar. The pull-down menu doesn't open until the program is ready to run again. This is my large visual "flag" that tells me the program is ready again.

Is there a "question" you can ask the program after you start the paste operation? Soemthing like asking for file information? If so, you probably won't get an answer until the program is ready for the next paste.
DesignCAD user since 1987