ArcPad Scripting Object Model
Refresh Method
See Also  Example  Send comments on this topic.
__MIDL__IMap0014
Optional. A Boolean that specifies whether to reload the drawing cache from the data files.
Map Object : Refresh Method

Glossary Item Box

Description

Refreshes the data in the map view.

Syntax

object.Refresh ( [__MIDL__IMap0014])

Parameters

__MIDL__IMap0014
Optional. A Boolean that specifies whether to reload the drawing cache from the data files.

Remarks

__MIDL__IMap0014 is a boolean specifying whether to reload the drawing cache from the data files. If __MIDL__IMap0014 is not passed or is specified as False then the map view is redrawn using the cached data. If __MIDL__IMap0014 is specified as True, then the drawing cache is reloaded from the data files (slower redraw). [Optional].

This method is very similar to the Redraw method. The difference is that the Redraw method causes the screen to be updated immediately, while the Refresh method posts an invalidate message to the Windows queue and the screen will update at the earliest convenience (that is, not necessarily immediately after calling the method).

Example

Gets an ArcPad map or layer file (via Open dialog box) and adds it to the current map.
ShowOpen Example (VBScript)Copy Code
Sub AddLayerExample
  Dim strDefExt, strFileFilter, strTitle, lngFlags, varResult
  'Set the arguments of the Open dialog box
  strDefExt = "apl"
  strFileFilter = "ArcPad Maps|*.apm|ArcPad Layers|*.jpg;*.shp;*.sid"
  strTitle = "Select ArcPad Data"
  lngFlags = &H1000   'only allow existing files to be specified
  'Show the Open dialog box and get the result
  varResult = CommonDialog.ShowOpen(strDefExt,strFileFilter,strTitle,lngFlags)
  'If a file is selected, add it to the map and refresh the map  
  If Not IsEmpty (varResult) Then  
    Application.Map.AddLayerFromFile (varResult)  
    Application.Map.Refresh
  End If
End Sub

See Also

© 2013 All Rights Reserved.