PdcCalculation.Refresh

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

Refresh

Description

Repaint the form of the calculation object

Notes

This method refreshes the calculation form.

Beware that this is really only a refresh not a save!

Code example

This code example creates a new calculation, reads a standard calculation into it, changes the production quantity and saves it. Then the calculation is shown on screen, after which another change is made (CustomerArticleNumber). This is not shown on screen until after the refresh method is called. Alternatively, use the property pdcCalculation.AutoRefresh = true to ensure that every change from the script is shown immediately in the form.

dim objCalc

  set objCalc = pdc.NewCalculation
  if objCalc.ReadFromArticle("1234") then
    objCalc.OrderQuantity = 3
    objCalc.Save
    objCalc.Show
    objCalc.CustomerArticleNo = "4321"
    objCalc.Refresh
  else
    msgbox "Could not read article"
  end if

Availability