GeoCOM Reference Manual
Provided Samples
Leica TPS1200 – Version 1.50
203
C
P
ROVIDED
S
AMPLES
C-1
PROGRAM FRAMES
C-1.1
VBA Sample Program
The sample program shows how simple it is to build an effective application with Visual Basic. The sample program
represents a simple measurement task that measures and displays the Hz angle and the V angle continuously. In addition
you have the possibility to perform a distance measurement with the following distance measurement programs: single
distance standard, single distance fast and tracking.
In order to execute this example program, install MSVB6.0 (or later) on your hard disk and copy the following files in a
directory of your choice:
\SAMPLES\VB\VBSAMPLE.VBP
Visual Basic Project of the sample.
\SAMPLES\VB\VBSAMPLE.FRM
Main form of the sample.
\SAMPLES\VB\VBSAMPLE_SETUP.FRM
Communication parameter setup form.
\SAMPLES\VB\COM_STUBSPUB.BAS
Contains the declarations of the TPS1200 system
functions.
\SAMPLES\VB\GEOCOMS2K.DLL
Contains the implementation of GeoCOM.
\SAMPLES\VB\VBSAMP32.EXE
Executable of the sample.
Finally connect the TPS1200 Theodolite with the preferred serial port on your personal computer and invoke the
executable file. Press the
Setup
button to select the communication parameters (Serial Port, Baudrate, Protocol) and
start the application with the button
Go
online
. The button
Quit
terminates the application.
C-1.2
C/C++ Sample Programs
The provided sample programs show simple Visual C++ MFC (Microsoft foundation classes) applications. The
functionality is exactly the same as in the Visual Basic program above.
The following files have to be copied into a Visual C++ Version 6.0 (or later) working directory in order to build a
32bit application:
\SAMPLES\VC\GEOCOM_SAMPLE.DSW
Work space file of the project
\SAMPLES\VC\*.CPP
C++ source files
\SAMPLES\VC\*.H
C++ header files
\SAMPLES\VC\GEOCOM_SAMPLE.RC
Resource file 1
\SAMPLES\VC\RES\GEOCOM_SAMPLE.RC
Resource file 2
\SAMPLES\VC\RES\GEOCOM_SAMPLE.ICO
Icon file
\SAMPLES\VC\COM_PUB.HPP
Header file for GeoCOM
\SAMPLES\VC\Release\GEOCOMS2K.LIB
GeoCOM Library
\SAMPLES\VC\Release\GEOCOMS2K.DLL
Contains the implementation of GeoCOM
\SAMPLES\VC\Release\GeoCOM_SAMPLE.EXE
Executable of the sample
Note
: To operate successfully the
geocoms2k.dll
file must be accessible for the operating system, hence it must be
located in a directory, which the operating system looks up for the requested DLL file