Introduction. Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications

Similar documents
DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan

Government Girls Polytechnic, Bilaspur

#820 Computer Programming 1A

PULSE Automation programming in Visual Basic. From BK training lectures arranged by Jiří Tůma & Radovan Zadražil

Excel & Visual Basic for Applications (VBA)

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Part 1: An Introduction

Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials

VB.NET Programming Fundamentals

BarTender s ActiveX Automation Interface. The World's Leading Software for Label, Barcode, RFID & Card Printing

Getting Started with STATISTICA Enterprise Programming

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

DIABLO VALLEY COLLEGE CATALOG

Working with the Geodatabase Using SQL

.NET Overview. Andreas Schabus Academic Relations Microsoft Österreich GmbH

CST STUDIO SUITE Introduction in VBA Macro usage and programming

National Database System (NDS-32) Macro Programming Standards For Microsoft Word Annex - 8

Unleashing Hidden Powers of Inventor with the API Part 1. Getting Started with Inventor VBA Hello Inventor!

Visual Basic Programming. An Introduction

Excel & Visual Basic for Applications (VBA)

Scripting with CAMMaster And Visual Basic.NET

Computer Programming I

Computer Programming I & II*

What is ArcGIS Comprised Of?

BarTender Integration Methods. Integrating BarTender s Printing and Design Functionality with Your Custom Application WHITE PAPER

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

Siemens Applied Automation Page 1 11/26/03 9:57 PM. Maxum ODBC 3.11

ArcGIS. Writing Geoprocessing Scripts With ArcGIS

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Java (12 Weeks) Introduction to Java Programming Language

Course MS10975A Introduction to Programming. Length: 5 Days

Database Automation using VBA

El Dorado Union High School District Educational Services

Ray Chance President Browsercraft, LLC

1/20/2016 INTRODUCTION

Pemrograman Dasar. Basic Elements Of Java

The C Programming Language course syllabus associate level

Athena Knowledge Base

OpenOffice.org 3.2 BASIC Guide

Applications Development

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Creating Datalogging Applications in Microsoft Excel

Introduction to Java

CAPIX Job Scheduler User Guide

Upgrading a Visual Basic Application to.net:

What is a programming language?

Developing Database Business Applications using VB.NET

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

A Microsoft Access Based System, Using SAS as a Background Number Cruncher David Kiasi, Applications Alternatives, Upper Marlboro, MD

VB.NET - WEB PROGRAMMING

A Comparative Analysis of Programming Languages for GIS

Module 2 - Multiplication Table - Part 1-1

Advanced Workflow Concepts Using SharePoint Designer 2010

Creating Dynamics User Model Dynamic Linked Library (DLL) for Various PSS E Versions

Programming with the Dev C++ IDE

Library Management System

Chapter 12 Programming Concepts and Languages

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT,

Java Programming Fundamentals

COM+ OVERVIEW OF MICROSOFTS COM, DCOM AND COM+ COMPONENT TECHNOLOGIES DCOM - COM+ Peter R. Egli INDIGOO.COM. indigoo.com. 1/20 Rev. 1.

UniFinger Engine SDK Manual (sample) Version 3.0.0

RIT Installation Instructions

Teaching Non-majors Computer Programming Using Games as Context and Flash ActionScript 3.0 as the Development Tools

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Java the UML Way: Integrating Object-Oriented Design and Programming

High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser)

Chapter 1 Fundamentals of Java Programming

CHAPTER 1: CLIENT/SERVER INTEGRATED DEVELOPMENT ENVIRONMENT (C/SIDE)

ANDROID DEVELOPER RESUME USA

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

EMC Documentum Composer

TRANSITION FROM TEACHING VB6 TO VB.NET

A Comparison of SAS versus Microsoft Excel and Access s Inbuilt VBA Functionality

ESRI Mobile GIS Solutions Overview. Shane Clarke ESRI

COURSE TITLE COURSE DESCRIPTION

Introduction to Java Applications Pearson Education, Inc. All rights reserved.

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

TS2Mascot. Introduction. System Requirements. Installation. Interactive Use

Chapter 1 Java Program Design and Development

CRM Setup Factory Installer V 3.0 Developers Guide

Return of the Codes: SAS, Windows, and Your s Mark Tabladillo, Ph.D., MarkTab Consulting, Atlanta, GA Associate Faculty, University of Phoenix

A Brief Introduction to MySQL

Programming and Software Development CTAG Alignments

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

How To Build Gis Applications With An Arcgis Engine

SUMMARY Moderate-High: Requires Visual Basic For Applications (VBA) skills, network file services skills and interoperability skills.

Exercise 1: Python Language Basics

SQL Server An Overview

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers

ArcGIS Pro. James Tedrick, Esri

Cross-platform event logging in Object Pascal

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

RationalRose2000e Using Rose Visual Basic

ClientAce WPF Project Example

An Esri White Paper June 2010 Tracking Server 10

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

ASP.NET. Web Programming. Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

Introduction to Python

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Moving from CS 61A Scheme to CS 61B Java

Transcription:

Introduction Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications 1

Computer Software Architecture Application macros and scripting - AML, Avenue, Python - Visual Basic for Applications (VBA) Software Applications (AP) ArcMap, Word, Excel - Binary executables (.exe) Software Development Tools VB,.NET, C++, Java - Compilers Operating System (OS) e.g., Windows XP / UNIX Central Processing Unit (CPU) Different Types of Computer Programming Tools Compiler Source code -> object code CPU reads object code and executes instructions Interpreter Scripts, macro programming language Applications (e.g., MS Word) read scripts and executes instructions VBA 2

ArcGIS Programming Compiler approach Java, C++,.NET, VB compiler GIS code libraries: ArcGIS Engine, ArcObjects Interact through COM (Component Object Model) components (e.g., ActiveX DLL) http://www.esri.com/software/arcgis/arcgisengine/about/demos.html Stand-alone EXE Interpreter approach ArcMap and ArcCatalog GIS code libraries: ArcObjects Interact through VBA VBA macro (scripts) 3

Software Engineering and Design Software Design Process 4

Software Design & Programming Requirement analysis Structured systems analysis Data specification Program specification GUI Components of Computer Programming Programming language Algorithm Editor Code libraries and resources (.lib &.obj) Compiler/Interpreter Debugger Packaging/Deployment tools Integrated development environment (IDE) 5

VB and ArcGIS VBA Environment What are the differences between Visual Basic, VBA, and VBScript? When would I use one over another? Visual Basic is a stand-alone tool for creating separate software components, such as executable programs, COM components and ActiveX Controls, and is useful when you must build a specialized solution from scratch. VBA offers the same powerful tools as Visual Basic in the context of an existing application, and is the best option for customizing software that already meets most of your needs. VBScript is a lightweight version of the Visual Basic language, and is designed specifically for use on Web pages. While scripting can sometimes be used for simple automation, VBA is the premier technology designed specifically for application automation. Unlike VBA, VBScript does not have an integrated development environment (IDE). 6

Computer Language Components Syntax Subroutine, procedures, functions (intrinsic and external) Expressions and statements Keywords Naming convention Variables / constants Data types Declaration Assignment and retrieval Operands / operators Arithmetic, logical, assignment, bitwise, Scope Exception / error handling Visual components IDE, GUI Objects VB Statements a = 3 b = 2 + 5 c = a + b d = d + 1 avalue = 1 + 6 / 3 * 2 ^ (1 + 1) bvalue = a + b / c * d ^ 2 If a > b Then c = 3 7

Procedures/Subroutines/Functions Private Sub MyFirstControl_Click() VB Codes End Sub Example Sub Hello_World() Dim a As Integer Dim i As Integer a = 3 For i = 1 To a Debug.Print Hello World! Next End Sub 8

VBA Data Types Data type Boolean Byte Integer Long Currency Single Double Date String (variable-length) String (fixed-length) Currency Object Variant Storage size 2 bytes 1 byte 2 bytes 4 bytes 4 bytes 8 bytes 8 bytes 10 bytes + string length Length of string 8 bytes 4 bytes 16 bytes to variant length Range True or False 0 to 255-32,768 to 32,767-2,147,483,648 to 2,147,483,647-922,337,203,685,477.5808 to 922,337,203,685,477.5807-3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values January 1, 100 to December 31, 9999 0 to approximately 2 billion String 1 to approximately 65,400-922,337,203,685,477.5808 to 922,337,203,685,477.5807 Any Object reference Dim X As Boolean Dim X As String, Dim Y(10) As String If you do not specify a data type, the Variant data type is assigned by default, i.e., Dim X. VB Variables Naming Convention Examples: Global Const cdmypi = 3.14159 Dim bselected As Boolean Public gimapno As Integer 9

Object-Oriented Programming (OOP) Object Events (response to triggers) Properties Methods Class (a collections of similar objects) Events Properties Methods Interface (for accessing properties and methods of objects) Object Model 1.Orchard is a type of farm (there are many other types of farm). - association 2. An orchard has trees. - composition 3. A tree has branches. - composition 4. A branch can grow fruit. - instantiation 5. A branch can grow leaves. - instantiation 6. An apple tree is a tree. type inheritence 10

VB Control Naming Convention 11

How to save your programs in ArcGIS? ArcGIS Normal template (Normal.mxt) A base template (*.mxt) A map document (*.mxd) Where to Find Help? VB VBA Online Help (F1 on the VBA IDE).Net2TheMax http://www.dotnet2themax.com/ MicroSoft Developer Network (MSDN) http://msdn2.microsoft.com/ Windows API Reference http://msdn2.microsoft.com/en-us/library/aa383749.aspx ArcObjects ArcGIS Desktop Help for VB6/VBA Developers ArcScripts http://arcscripts.esri.com/ ESRI Developer Network (EDN) http://edndoc.esri.com/arcobjects/9.2/welcome.htm ESRI ArcObjects Library Reference http://resources.esri.com/help/9.3/arcgisdesktop/com/vba_start.htm 12