Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Scripted export to bitmap not working (Qv11 personal)

A weird problem in a Qv 11 Personal Edition environment I use for testing.

I set up a .vbs script to automatically make some selections in a Qv document and then export the image of a sheet object. I would think this is a fairly routine operation and it did work just fine until today... And it still works just fine if I just replace the original document with another one and change the sheet object name accordingly, but nothing else. It's only when the script opens the original test document that the images fail to materialize even though I can still see the script opening the document file and directing the making of the selections. The problem actually started with the script only managing to export the last sheet object (2nd of 2 total) referenced but after one or two more test runs it stopped exporting altogether.

Qv.exe isn't left hanging, the script closes the document at the end and even booting the test machine doesn't help so it doesn't appear to be a memory leak type problem. It looks almost as if the original doc has run out of object handles and is giving the script NULL or otherwise faulty ones. I can see that happening if the script is handling dozens of objects in a single run but can't think of why each document would have a limited cache of sheet object handles build in. Unless it's a Personal Edition build-in limitation of some kind.

I'm not too worried about this feature in the test environment as I can always make a new test document as needed but I'd prefer to have some sort of explanation as to why this happens with the original document. I'd prefer not to get similar issues in the production environment, especially since I don't have full control of the machine where that is going to be set up.

So... Any ideas?

1 Solution

Accepted Solutions
Not applicable
Author

Thanks for the tip Deepak, although I couldn't follow up on it as I didn't have a working script debugger on the test machine

However, it turned out there was an error or at least an omission in the script: it didn't activate the sheets the objects it was trying to export are on, thus if the specific sheet was not active when the script ran no image got exported even though the object handle appears to have been valid in and of itself (at least it was valid enough that it generated no errors from method invocation).

So it's not some bizarre bug in either the Qv installation or the machine but instead a feature of the API itself.

As you were.

View solution in original post

2 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Interesting one. I've never seen this before. What happens when you debug your VBS, do you see the same behavior? There're no special limitations on functionality with Personal Edition - referring to RAM usage/management.

Cheers,

DV

Not applicable
Author

Thanks for the tip Deepak, although I couldn't follow up on it as I didn't have a working script debugger on the test machine

However, it turned out there was an error or at least an omission in the script: it didn't activate the sheets the objects it was trying to export are on, thus if the specific sheet was not active when the script ran no image got exported even though the object handle appears to have been valid in and of itself (at least it was valid enough that it generated no errors from method invocation).

So it's not some bizarre bug in either the Qv installation or the machine but instead a feature of the API itself.

As you were.