ArcPad Scripting Object Model
ScaleRectangle Method
See Also  Example  Send comments on this topic.
Factor
Required. A Double that represents the scale factor.
Rectangle Object : ScaleRectangle Method

Glossary Item Box

Description

Scales the rectangle by the specified amount.

Syntax

object.ScaleRectangle ( factor)

Parameters

Factor
Required. A Double that represents the scale factor.

Example

Zooms in on the map by 50%
ScaleRectangle Example (VBScript)Copy Code
Sub ZoomIn
  Dim objRect
  'Get the current map extent
  Set objRect = Application.Map.Extent
  'Scale the extent by 50%
  Call objRect.ScaleRectangle(0.5)
  'Set the new map extent
  Application.Map.Extent = objRect
  Set objRect = Nothing
End Sub
Zooms in on the map by 50%
ScaleRectangel Example (JScript)Copy Code
function ZoomIn()
{
  // Get the current map extent
  var objRect = Application.Map.Extent;
  // Scale the extent by 50%
  objRect.ScaleRectangle(0.5);
  // Set the new map extent
  Application.Map.Extent = objRect;
  objRect = null;
}

See Also

© 2012 All Rights Reserved.