Add [Scale Bar]

The Add method adds a new scale bar to the collection. Returns a ScaleBar object.

Syntax

object. Add

Golden Nugget : The object formerly known as Map Scale has been renamed to Scale Bar. This may affect older scripts that specifically called out the object by its previous name (e.g., Doc.Shapes.Item("Map Scale")). To resolve this, simply update your script to use the new name, or modify it to select the scale bar object by its type or item number, which is a more robust scripting practice.

Example

This example demonstrates how to create a scale bar.

'declare ScaleBar object

Dim ScaleBar As Object

 

'create new scale bar

Set ScaleBar = ScaleBars.Add

Used by: ScaleBars collection