You are on page 1of 10

SimGis General Function Extension

(SiGGeF)
For Arcview GIS V.3.0a or later
Internal Product ID – a4d

SimGis Corporation
Copyright 2000. All Rights Reserved.
SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

Introduction
The SimGis General Functional Extension for Arcview provides the base functionality that all
SimGis extensions build on. This document is an exhaustive list of functions included in version
1.0 of this extension.

The SimGis General Functional Extension for Arcview is comprised of 5 files:

gnfn01sg.avx $AVHOME/ext The Installable Portion of the tool with


Gui controls.

gnfn11sg.afx $AVHOME/apps/simgis/ The Functional Scripts for the demo


releases (and all SiGADE dev products).

gnfn12sg.afx $AVHOME/apps/simgis/ The Functional Scripts for the SimGis


commercial releases.

gnfn13sg.afx $AVHOME/apps/simgis/ The Administration Function Extension

cmdftns.exe $AVHOME/apps/simgis/siggef The executable for OS directive


functions

Appcfg.acv $AVHOME/apps/ The application configuration


registration file (all SiGADE Products
have a listing in this file)

Apppmsns.acv $AVHOME/apps/ The permissions file for all SiGADE


Products.

Persprfl.acv $AVHOME/apps/ The personal profile file for all SiGADE


Products

These 5 files are installed from Arcview via the supplied project file (sg_XXXXX.apr, where XXXX
is the acronym for the SimGis product supporting the base functions), which contains the
functional content of the extensions internally.

Installation of the product results in the creation of a supporting directory structure in the
$AVHOME path which consists of the following directory hierarchy:

$AVHOME Arcview Application home directory


/apps SiGADE functional extension storage location
/simgis SimGis corporate reserved product space
/lib SimGis library and security file locale
/usr SimGis license and default user profiles locale

Additionally, unless otherwise configured, each user will have a directory created in the $HOME
path which is a hidden preferences / configuration file directory.

$HOME Users home directory


/avstor SiGADE configuration storage location (Windows)
/.avstor SiGADE configuration storage location (UNIX)

This directory can contain several files depending on the extensions installed.

AvGen_Funct.doc Page 1 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

* Most extensions created using the SimGis SiGADE product will add or use some files in these
locations.

Functional Overview of SiGGeF


SiGGeF contains several generic functions that pertain to the SimGis product line, as well as
several functions that implement the base functionality enabling SiGADE developed products.
The functions included in Version 1.0 will expand with the release of future expanded versions of
SiGADE. Version numbering of SiGGeF will not correspond to the versions of other components,
including SiGADE.

The *.afx file for the Demo and SiGADE developed versions will include all functions related to
configuration, license handling general SiGADE implementation required functions.

Demo / SiGADE developed release functions:

Check Environmental Variables


Set Environmental Variable
Configure Environment
Update Personal Profile
Update Global Profile
Display File Content

SimGis Commercial release functions:

Get Document parameters


Get Project parameters
Save to ODB
Read from ODB
Find String
Key Code Reader
License file Reader
De-Obfuscator
Gui Builder / Killer
Trappable Error Codes

These functions are designed to be generic and usable by any given product. Requests for
inclusion in competitor and client products should be considered. These base functions will be
extended in future versions by the inclusion of new functions.

Functional Definitions of SiGGeF Configuration Files


There are several configuration files for SiGGeF (and all SiGADE developed products).

The configuration files for all SiGADE products are ASCII readable text files which consist of one-
line configuration parameters. The content format uses a “%%%” delimiter to begin, end and
separate all fields in a line record. The line content for each file varies from file to file, but the
internal format of each file is consistent within that file. The first field for each record is the
readable name for the parameter. If there is a Boolean value to that record, it is denoted by the
keywords “OK” or “NotOK” (note there are no spaces).

AvGen_Funct.doc Page 2 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

The usages of these configuration files is varied, dependant upon the SiGADE application in
question. *Remember, not all SiGADE applications are necessarily from the same company.

The configuration files that ship with SiGGeF are appcfg.acv, and apppmsns.acv. These
specific configuration volumes contain global information about all SiGADE
applications. The volume appcfg.acv contains a registration entry for all SiGADE
applications. The record format for this file is:

%%%Application Name%%%Application Configuration File%%%Number of


Configurable Parameters%%%Configuration Script%%%
(note: this entire string is on a single line, and constitutes one record)

The volume apppmsns.acv is a global configuration volume for all configuration entries.
It consists of permission keys as to which applications can be user configured and which
are administrator level configuration parameters. Additionally, there are permission
records for local versus global storage for configuration files and precedence rules. The
record format for this file is:

%%%Parameter Name%%%OK or NotOK%%%Optionality%%%Storage


Level%%%Precedence%%%
(note: this entire string is on a single line, and constitutes one record)

Optionality indicates requirement for a parameter, and is specified by the values “Opt” or
“Reqd”. Storage level denotes the locations of configured parameters, and can be of the
set: “global”, “local”, or “both”. Storage loctions for the actual configuration volumes is
set in the application specific configuration volume residing in
$AVHOME/apps/coname/appname, where coname is the company-specific directory for
the application developer and appname is the application-specific directory for the
application (local files are same-named and reside in $HOME/avstor/ coname/appname).
The precedence parameter determines the precedence of use of the configuration
parameters for each entry. The values for this key can be “GL”, “LG”, “G”, “L” or “I”,
where the first character represents the first location read for a parameter, and a second
character represents the follow-up search location for the parameter if the first location
does not hold a value for the concerned parameter. If only one character is denoted, only
one location is searched for the configuration parameter. The “I” character key denotes
ignore, and does not search for any key, using the application internal default instead. If
any searched key cannot be found, the parameter key value defaults to the application
internal default (varies from one application to another).

The volume persprfl.acf is a global default volume which contains keys for all personal
profile entries. Each profile entry follows the format:

%%% Parameter Name%%%OK or NotOK%%%Optionality%%%Storage


Level%%%Precedence%%%Value%%%Type%%%ParmList%%%
(note: this entire string is on a single line, and constitutes one record)

AvGen_Funct.doc Page 3 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

The new fields in this record (beyond the contents of the aforementioned apppmsns.acv)
are as follows. Value is the default entry for a personal file, type is the key type (string,
numeric, date, etc) and ParmList is the space delimited list that provides the values for a
restricted value set. To enable this field, the entry should be non-nil.
* All configuration files may have null entries denoted with the keyword &NIL&.
** All List Entries are space delimited, with a literal space denoted by &_&.

Functional Definition of SiGGeF Error Trapping Module

The SiGGeF Error Trapping Module is comprised of a single script that processes and
displays incoming error messages produced by the application. These errors are caught
by the developer and passed as a error code to the ETM script. Error codes are numeric
from 000 to 999 inclusive. A description of the error codes is given in the SiGADE
Standard, Gold and Platinum packages.

The second part of the SiGGeF ETM is a module naming convention. Each script should
have a module string attached to it which is passed to the ETM script in order to further
elucidate the location of the error message passed. The recommended format for these
module codes is:
Company Code Product Code Version Code File Code Script Id
ami 4xp7a 105 003 039

The meaning of this code is broken down into five parts; first, the Company Code is a
unique identifier for your company (ami for Acme Industries), second, the Product Code
is a unique identifier for your specific product (4xp7a for Spatial Calculator), third, the
Version Code is the current version of the script (not necessarily the product), fourth, the
File Code identifies which file number in the set this script is contained in (003 denoting
spacalam.avx, the third file in the application), and lastly fifth, the Script ID, which is a
unique identifier for the specific script in the application.

These components together enable an error to be traced back to the general block location
from which it arose. This can mean great savings to an applications distributor in debug
time, product support time and version turn-around.

Functional Definitions of SiGGeF Scripts


1. Check Environmental Variables
a. Definition:
i. Checks and displays to the user the current paths for all Arcview default
registered environmental variables ($AVBIN, $AVEXT, $AVHOME,
$CWD, $DEVEXT (3.2+), $HOME, $TEMP, $USEREXT, $WORKDIR)
b. Sg_gf_CheckEnvVars
c. Requires no parameters
d. Callable from script
e. Called from 2 Gui elements
i. Project Menu (Config)
ii. Application Menu (Config)

AvGen_Funct.doc Page 4 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

f. No children
g. No parents
h. Returns no values
2. Set Environmental Variables
a. Definition:
i. Prompts the user to set the Arcview default registered environmental
variables ($AVBIN, $AVEXT, $AVHOME, $CWD, $DEVEXT (3.2+),
$HOME, $TEMP, $USEREXT, $WORKDIR), can be set as a group or
individually.
b. Sg_gf_SetEnvVars
c. Requires no parameters
d. Callable from script
e. Called from 2 Gui elements
i. Project Menu (Config)
ii. Application Menu (Config)
f. No children
g. No parents
h. Returns no values
3. Configure Environment
a. Definition:
i. Starts the environmental configuration session, this controls the flow of
configuration for each registered SiGADE developed product.
b. Sg_gf_ConfigEnv_Start
c. Requires no parameters
d. Not Callable from script
e. Called from 2 Gui elements
i. Project Menu (Config)
ii. Application Menu (Config)
f. Children
i. Direct
1. sg_gf_GlobalConfigs_Permissions
2. sg_gf_ConfigEnv_GoGui (Dialog Script)
3. sg_gf_ConfigEnv_ReadProducts_Gui (Dialog Script)
4. sg_gf_ConfigEnv_Update_Gui (Dialog Script)
5. sg_gf_CfgEnv_Close_Gui (Dialog Script)
6. sg_gf_Config_ReadKeys
ii. Indirect
1. <<Indeterminate>> (Product Related)
iii. Dialogs
1. sg_gf_ConfigEnv_Gui
g. No parents
h. Returns no values
4. Update Personal Profile
a. Definition:
i. Starts the personal configuration session, this controls the flow of
configuration for creation of personal settings for each registered
SiGADE developed product.
b. Sg_gf_SetPersonal
c. Requires no parameters
d. Callable from script
e. Called from 2 Gui elements
i. Project Menu (Config)
ii. Application Menu (Config)
f. Children

AvGen_Funct.doc Page 5 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

i. Direct
1. sg_gf_GlobalConfigs_Permissions
2. sg_gf_PersonalConfigs_Table
3. sg_gf_PersonalConfigs_ProcessKeys
4. sg_gf_PersonalConfigs_Commit
ii. No Indirect
g. No parents
h. Returns no values
5. Update Global Profile
a. Definition:
i. Starts the global configuration session, this controls the flow of
configuration for creation of global settings for each registered SiGADE
developed product.
b. Sg_gf_SetGlobalConfigs
c. Requires no parameters
d. Callable from script
e. Called from 2 Gui elements
i. Project Menu (Config)
ii. Application Menu (Config)
f. Children
i. Direct
1. sg_gf_GlobalConfigs_Permissions
2. sg_gf_GlobalConfigs_Table
3. sg_gf_GlobalConfigs_ProcessKeys
4. sg_gf_GlobalConfigs_Commit
ii. No Indirect
g. No parents
h. Returns no values
6. Display File Content
a. Definition:
i. Receives and displays a text file in a TextWin
b. Sg_gf_DisplayFileContent
c. Requires
i. Filename object
d. Callable from script
e. Not Called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns
i. nil
7. Get Document parameters
a. Definition:
i. Retrieves standard definition fields from a document object passed to
this script.
b. Sg_gf_GetDocParams
c. Requires
i. Document Object
d. Callable from script
e. Not Called from Gui elements
f. Children
i. Sg_gf_DisplayString
g. Parents
i. <<Indeterminate>> (Product Related)

AvGen_Funct.doc Page 6 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

h. Returns
i. string
8. Get Project parameters
a. Definition:
i. Retrieves standard definition fields from current project object.
b. Sg_gf_GetProjParams
c. Requires no parameters
d. Callable from script
e. Called from 1 Gui element
i. Project Menu (Tools)
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns
i. string
9. Save to ODB
a. Definition:
i. Creates new ODB file of filename received and inserts all objects in list
object received.
b. Sg_gf_WriteToODB
c. Requires
i. List object of objects
ii. Filename object
d. Callable from script
e. Not Called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns
i. Boolean
10. Read from ODB
a. Definition:
i. Opens an existing ODB file from filename object received and generates
a list object containing all elements thereof.
b. Sg_gf_ReadFromODB
c. Requires
i. Filename object
d. Callable from script
e. Not Called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns
i. List object of objects
11. Find String
a. Definition:
i. Searches all documents in list object received for string object received.
Search is conducted in titles and/or document content.
b. Sg_gf_FindString_Global
c. Requires
i. String object
ii. List object of document objects
iii. Boolean (title search)
iv. Boolean (content search)

AvGen_Funct.doc Page 7 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

d. Callable from script


e. Not called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns
i. List object of documents
12. Key Code Reader
a. Definition:
i. Reads key code embedded in the file referenced by the filename object
received.
b. Sg_gf_ReadKeyCodes
c. Requires
i. Filename object
ii. Script object (Keyholder)
iii. String object (KeyID)
d. Callable from script
e. Not Called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns
i. String object (keycode)
13. License File Reader
a. Definition
i. Reads license embedded in the file referenced by the filename object
received.
b. Sg_gf_ReadLicenseFile
c. Requires
i. Filename object
ii. Script object (Keyholder)
iii. String object (KeyID)
d. Callable from script
e. Not called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns
i. String object (License authentication)
14. De-Obfuscator
a. Definition:
i. Reads content from obfuscated file / script and concatenates to a string
object.
b. Sg_gf_DeCrypt
c. Requires
i. Filename or string object (Obfuscated source)
ii. Script object (Keyholder)
iii. String object (KeyID)
d. Callable from script
e. Not called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns

AvGen_Funct.doc Page 8 of 10 Last saved by Michael Corsello


SimGis Corporate Private 11/6/09:10:23 AM Michael Corsello

i. List object of integers (ids)


15. Gui Builder / Killer
a. Definition:
i. Adds or removes Gui elements (controls) to/from current Arcview
session.
b. Sg_gf_GuiEdit
c. Requires
i. Boolean (build / kill)
ii. List object of lists
1. control
2. location
3. position
d. Callable from script
e. Not called from Gui elements
f. No children
g. Parents
i. <<Indeterminate>> (Product Related)
h. Returns no values

AvGen_Funct.doc Page 9 of 10 Last saved by Michael Corsello

You might also like