Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reload and SaveAs in API

Hello,
I have written a VBS file which reloads a QlikView document and save it under an other name. But when I start the "SaveAs" command emmediately after the "Reload" command, QlikView crashes (no response, no saveing). It has something to do with the visible sheet. QlikView gives the program sequence back direct after the end of the QlikView script. But at that moment the controls are not updated on the sheet. If I wait for a few seconds after reloading or is the document opened with an empty sheet, no problems occurs. My question is: Is there any status in the document which gives us a hint when the controls are refreshed too?

Here is the VBS:


set Qv = CreateObject("QlikTech.QlikView")
Set qvDoc = Qv.OpenDoc("Test.qvw","Admin","1234")
qvDoc.Reload
rem *** should wait a little bit ***
qvDoc.SaveAs "NetTest.qvw"
qvDoc.CloseDoc
Qv.Quit


Regards
Michael

2 Replies
biester
Specialist
Specialist

Hi,

try a

qvDoc.GetApplication.WaitForIdle


there where you have the "rem" now. Perhaps that works...

Rgds,
Joachim

Not applicable
Author

Hi Joachim
Thanks for the reply. That is exactly I was looking for!

Regards
Michael