SAS Institute. The Power to Know

Use SAS Bridge for ESRI objects in a custom application

For information on the SAS Bridge for ESRI Class Library, you can open the .chm file which is installed with the SAS Bridge for ESRI product..

The components for SAS Bridge for ESRI are built on a set of classes that encapsulate the following:

You can use these classes to create your own custom export applications and macros. For example, you can create an application that exports data to SAS, and then runs other processes without intervention.

There is both a simple way to use these classes to export data and a more advanced approach. The more advanced approach requires more coding but enables greater flexibility and customization. Whichever way you choose, your code can run in either silent mode or verbose mode. In verbose mode, a progress dialog tracks the export progress. In silent mode, the progress dialog does not appear.

To use these classes in a VBA macro in ArcMap follow these steps:

Define a VBA macro in ArcMap:
  1. Select Tools Macros Visual Basic Editor from the ArcMap menubar.
  2. Select Tools References from the menu bar of the Visual Basic Editor.
  3. Select the following from the References window:
    • SAS Bridge for ESRI 2.0 Type Library
    • SAS: Integrated Object Model (IOM) (SAS System 9.1) Type Library
    • SAS WorkspaceManager 1.1 Type Library
  4. Select Insert Module from the menu bar of the Visual Basic Editor.
  5. Type the macro code. See Use SAS Bridge for ESRI objects in a custom application for sample macros that export ESRI data.
Run the macro:
  1. Select Tools Macros from the Visual Basic Editor menubar (or, Tools Macros Macros from the ArcMap menubar).
  2. Select the macro you want to run.
  3. Click Run.