GithubHelp home page GithubHelp logo

macrohru-swat's Introduction

MacroHRU-SWAT

Macro to average HRU's annual outputs of SWAT

The macro allows user to average the Hydrological Response Units (HRU’s) results from an annual run of the Soil and Water Assessment Tool (SWAT). The result is a spatially multi-annual average of all the HRU’s for the period selected by the user. Joining the results obtained from the run to the HRU’s shapefile, it is possible to make maps and analyze any variable of the water balance over the basin.

This macro is presented in both languages English and Spanish. It was developed in Visual Basic for Applications (VBA) under ArcGIS platform.

This document is a guide to ensure the correct operation of the macro. This macro works correctly in ArcGIS 9.3. If you will work with ArcGIS 10, you will need to follow the next steps:

STEP 1

First of all, it is necessary to have installed VBA on ArcGIS 10. ArcGIS 10 does not have the VBA package installed by default; hence, you must install it as follows:

To use map documents that contain VBA code for ArcGIS Desktop Concurrent Use

The VBA license needs to be authorized on the license manager on your network. You can check if a VBA license is available for use by viewing the Availability list in ArcGIS Administrator after setting the license manager. Contact your organization's license administrator to authorize VBA licenses if you do not have any VBA licenses.

  1. Install ArcGIS Desktop VBA Resources for Developers from the installation media if you haven't done so already.
  2. Open ArcGIS Administrator, click Desktop in the table of contents, and then make sure you have the appropriate concurrent use product selected and the license manager set.

To use map documents that contain VBA code for ArcGIS Desktop Single Use

  1. Install ArcGIS Desktop VBA Resources for Developers from the installation media if you haven't done so already.
  2. Open ArcGIS Administrator, click Desktop in the table of contents, then make sure you have the appropriate single use product selected.
  3. Click Authorize Now and follow the instructions to authorize VBA. If you have requested the authorization number for VBA, it would have been in an e-mail from Esri Customer Service. It will also be visible in the Authorization and Provisioning section of the Customer Care site. If you cannot locate this information, contact Esri Customer Service.

The previous explanation was taken from ArcGIS Resource Center. If you are interested in a more detailed explanation please refer to http://gis.stackexchange.com/questions/15656/install-vba-on-arcgis-10.

STEP 2

Open the file *.mxt by double click. This file contains the macro to average the results of HRU’s in an annual run. If you get a warning while opening the macro on ArcGIS 10, please follow these steps:

  1. In the folder attached with this email, you will find the file mscomct2.ocx, which controls dates in VBA. You will need to copy this *.ocx file in these paths:

a. C:\Windows\SysWOW64 and

b. C:\Windows\System32 2. You will need to register this file using the command line, with the tool regsvr32 (bear in mind you will need administrative privileges) in both folders:

a. C:\Windows\SysWOW64>regsvr32 mscomct2.ocx

b. C:\Windows\System32>regsvr32 mscomct2.ocx

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

macrohru-swat's People

Contributors

jevago262000 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.