ADD_MEASURE_ATTRS

The ADD_MEASURE_ATTRS command allows you to add/update feature measure attributes to all of the line and area features in a loaded vector layer.

The following parameters are supported by the command:

  • FILENAME - filename of the layer to update. If an empty value is passed in, all layers that were created by the script, such as those from a GENERATE_CONTOURS command, will be updated. When running the script in the context of the main map view (including loading a workspace) you can also pass in the value 'USER CREATED FEATURES' to have the 'User Created Features' layer updated or 'SELECTED LAYERS' to have any layers selected in the Control Center.
  • AREA_UNITS - specifies the units to use when storing area measurements. The following values are supported:
    • ACRES
    • HECTARES
    • "SQUARE FEET"
    • "SQUARE KILOMETERS"
    • "SQUARE METERS"
    • "SQUARE MILES"
  • DISTANCE_UNITS- specifies the units to use when storing linear distance measurements. The following values are supported:
    • METRIC - meters for shorter distances, kilometers for longer
    • STATUTE - feet for shorter distances, miles for longer
    • YARDS - yards for shorter distances, kilometers for longer
    • NAUTICAL - feet for shorter distances, nautical miles for longer
    • CHAINS - chains for shorter distances, miles for longer
  • MEASURE_UNIT_TYPE - specifies how to handle measurement values of different sizes
    • AUTO - automatically use base units for smaller measurements and large units for long (i.e. meters for shorter distances, kilometers for longer)
    • BASE - always use base units, regardless of size. For example, always use meters for distance. Use this if you want to numerically compare values
    • LARGE - always use large units, regardless of size. For example, always use kilometers for distance. Use this if you want to numerically compare values