cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Had to refresh(F5) to get the the sheet to load. How to fix this?

yoohooos
12-Amethyst

Had to refresh(F5) to get the the sheet to load. How to fix this?

I used to have this problem when I had regular sheet. However, now, I'm using API and input everything using API, but my output isn't refreshing. I have to open, refresh and open again by hand. Anyone faced this issue before?

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi,

API documentation in help is not really helpful in difference between WS.ResumeCalculation and WS.Synchronize

 

PauseCalculation()—Pauses the calculation.
ResumeCalculation()—Resumes the calculation.

Synchronize()—Synchronizes, or recalculates, the worksheet.

 

Cheers

Terry

View solution in original post

5 REPLIES 5

Hi,

Try the WS.ResumeCalculation statement to refresh after input via API.

Cheers

Terry

What are the differences between WS.ResumeCalculation and WS.Synchronize? 

Hi,

API documentation in help is not really helpful in difference between WS.ResumeCalculation and WS.Synchronize

 

PauseCalculation()—Pauses the calculation.
ResumeCalculation()—Resumes the calculation.

Synchronize()—Synchronizes, or recalculates, the worksheet.

 

Cheers

Terry

Also, I originally, I had both WS.ResumeCalculation and WS.Synchronize in my code but it didn't help.

 

I have WS.Synchronize all over my code as I have to retrieve some outputs and check them along the calculation. It amazed me that those values I obtained before all calculation are completed and stored in excel sheet are fine and updated. However, before I exit using ws.SaveAs() ws.Close(), I reported all outputs and they are not update and my hundreds of cal sheet have same last output. 

Hi,

Another thing to try is to change the default time API application waits for Prime to recalculate the document?

 

DefaultCalculationTimeout(arg)—Defines the default time that the application waits for the engine to recalculate the document. The method affects different types of Get/SetValue APIs, excluding APIs that use a parameter for passing the time-out value.
arg (integer) is the number of seconds to wait, 0 do not wait, or –1 to wait indefinitely.
The default time-out value is 60 seconds.

 

Cheers

Terry

Announcements

Top Tags