![]() |
![]() |
The CEDRA Corporation is pleased to announce the release of
the Second Edition of Avenue WrapsTM.
ISBN 0-9722631-0-1. A new publication comprised of 608 pages,
Avenue Wraps offers detailed information describing the process
of how Avenue code can be converted into Visual Basic® or
Visual Basic for Applications code under the ArcGIS 8.x or ArcGIS
9.x platforms, as well as, how new ArcGIS applications can be
developed using the Avenue Wraps software. The second edition
of Avenue Wraps contains: (a) 73 new "wraparounds",
(b) support for personal geodatabase manipulation, (c) compatability
with the ArcGIS 9.x ArcObjects environment and (d) full access
to all of the Visual Basic code comprising the Avenue Wraps software.
In addition, the Avenue Wraps 2nd Edition CD includes the CEDRA-ArcView3-Tools and the CEDRA-Callout-Tools
toolbars. The CEDRA-ArcView3-Tools toolbar offers a number of
selection tools which "stream-line" the user's interaction
with ArcMap, increasing productivity by at least 30%. The CEDRA-Callout-Tools provides functionality
for the creation of Balloon, Line and Banner callouts. These toolbars
are a free bonus which are included with the Avenue Wraps 2nd
Edition CD.
The Avenue Wraps 2nd Edition book contains a description of the
"wraparounds" for more than 300 of the most popular
Avenue requests. A complete list of the available "wraparounds"
is presented in the Table of Contents listing shown below. Note
that when we use the word "wraparound", what is meant
is that the Avenue request has been converted into Visual Basic
in the form of a subroutine or a function, thereby eliminating
the need for the developer to write the ArcObjectsTM
code to simulate the function of the Avenue request. The developer
simply substitutes the name of the Avenue Wraps "wraparound"
for the Avenue request.
The Avenue Wraps 2nd Edition CD includes the Visual Basic project
file (avwraps.vbp) that builds the Avenue Wraps DLL (avwraps.dll).
The developer is able to modify the project file as desired or
simply extract those portions which are of interest and incorporate
them into his or her own application. The book and CD can be ordered
together or the CD can be ordered separately. Since the reader
has full access to all of the Visual Basic code which comprises
the Avenue Wraps software, a developer can: (a) use the software
as is, (b) modify any or all of the software, or (c extract those
portions which are of interest to the developer.
Those who purchased the Avenue Wraps 1st Edition should note that
the "wraparounds" in that edition will only function
with the ArcGIS 8.x environment. When ArcGIS 9.x was released
a significant amount of work was required to convert the 8.x "wraparounds"
to function in the 9.x environment. Should users of the Avenue
Wraps 1st Edition wish to migrate their applications to the ArcGIS
9.x environment, they may: (a) order the Avenue Wraps 2nd Edition
book and CD, or (b) order the 2nd Edition CD only. Note that it
is possible to substitute the 2nd Edition's version of the avwraps.dll
for the 1st Edition's. Some modifications may need to be performed
after the substitution, although they should be minimal, if any.
The Avenue Wraps 2nd Edition book contains a description of the
new "wraparounds" that were introduced during the migration
to the ArcGIS 9.x environment. Depending upon the application,
users may or may not wish to implement these new "wraparounds".
However, if you wish to operate applications that incorporated
the Avenue Wraps 1st Edition "wraparounds" in the ArcGIS
9.x environment, users will need to convert the "wraparounds"
themselves or incorporate the "wraparounds" in the Avenue
Wraps 2nd Edition CD. Click on this link to read a description
of the issues in converting Avenue Wraps 8.x applications to the
9.x environment.
Using Avenue Wraps there is no searching through the ArcObjects Developer Help, no scratching your head as to how to convert GetFTab into the appropriate ArcObjectsTM Property, or how to get the Legend for a Theme.
CEDRA Avenue Wraps has been there, done that, and is ready for you to use.
Discussing general Avenue to VB/VBA syntax differences, Views, Themes, Tables, Selection Sets, Graphic Elements, Querying, Calculating, File I/O operations, Message Boxes, User-Document interaction, Manipulation of Feature Shapes, Legends, Classifications and Application deployment, CEDRA Avenue Wraps contains numerous samples that will cut your conversion effort by more than 70%. CEDRA Avenue Wraps offers Avenue developers a one-to-one mapping between Avenue requests and AvenueWraps "wraparounds". In addition, to being used to convert existing applications, CEDRA Avenue Wraps can be used to develop new applications using an Avenue programming style. Why learn ArcObjects when CEDRA Avenue Wraps provides the one-to-one mapping between Avenue requests and their ArcObjects counter-parts.
Don't leave your Avenue applications behind, use CEDRA Avenue Wraps and migrate your applications to ArcGISTM.
Originally written as a guide for converting Avenue code into VB or VBA code, Avenue Wraps has grown into a tool Avenue and VB programmers can use to develop ArcObjects based applications. Since a developer can mix ArcObjects and Avenue Wraps code, ArcObjects programmers can use the Avenue Wraps as an easier means of performing various programming tasks. That is, new applications can be developed using Avenue Wraps, rather than just migrating existing Avenue code. Since Avenue Wraps is written using ArcObjects, a developer is free to mix Avenue Wraps procedures and native ArcObjects code.
Not in the mood to retype scripts, ELECTRONIC
MEDIA (CD) is available containing CEDRA Avenue Wraps for both
the ArcGIS 8.x and 9.x environments as a Dynamically Linked Library
(.dll). For either ArcGIS 8.x or 9.x, CEDRA Avenue Wraps is immediately
available for Avenue programmers to begin converting their applications.
Users who are solely interested in the CEDRA-ArcView3-Tools toolbar
should order the CEDRA Avenue Wraps 2nd Edition CD.
Note to existing CEDRA Avenue Wraps users,
to migrate their existing 8.x applications to the 9.x environment,
the developer can simply reference the new CEDRA Avenue Wraps
ArcGIS 9.x .dll and execute the ESRI VB6 Code Converter Add-in.
If you want to see how the Avenue Wraps
procedures can be used, click here Avenue
Wraps Samples for an extensive list of "how to"
samples. These samples contain listings of how to perform typical
Avenue programming operations. If you are looking for detail information,
click here Avenue Wraps Description for
a thorough discussion regarding the contents of the Avenue Wraps
book. The Avenue Wraps Description document follows the sequence
of the Table of Contents in the Avenue Wraps book to give the
reader a behind the scenes look into how the Avenue Wraps were
developed For those interested in what is covered in the installation
instructions click here, Avenue Wraps Installation
Instructions.
Complementing the Avenue Wraps book, The CEDRA Corporation also offers web based training on the use and implementation of the Avenue Wraps procedures. As part of the CEDRA Web Training program, a number of different classes are offered which pertain to the Avenue Wraps book. By clicking on the CEDRA Web Training link you will be able see what courses are offered, how the training program operates and ordering information. Note that the Avenue Wraps class listings and ordering information appear towards the bottom of the web page.
Note, if you would like to download any of the .html or .pdf files which are linked on this page (such as the Avenue Wraps Samples), Microsoft Internet Explorer users can "right-click" on the link and select the Save Target As... command from the "pop-up" menu list. You can then navigate to a location on your local disk followed by clicking the Save button to begin the download process. Once the download is finished, a new dialog box will appear from which you can either open the downloaded file or close the dialog box to continue your internet session.
![]() |
Interested in an article describing the theory behind Avenue
Wraps, click on the following link for "A
wraparound Story". Written by the authors, a .pdf file
is available describing the process in converting Avenue into
VB/VBA along with a brief description on how Avenue Wraps was
designed to operate. Simply fill out the form and return the form to The CEDRA
Corporation by: (a) emailing the form to cedra@cedra.com, attention
Purchasing, (b) faxing the form to 585-262-2042, or (c) mailing
the form to the address shown at the bottom of the form. |
Table of Contents
Chapter 1 Introduction to Avenue
Wraps 1-1
1.1 Comments on the Declaration of Variables 1-2
1.2 Overview of the Chapter Contents 1-4
1.3 Getting Started 1-7
1.3.1 General Commentary 1-7
1.3.2 Converting an Avenue System Script 1-9
1.3.3 Converting a Geometric Avenue Script 1-17
1.3.4 Converting another Geometric Avenue Script 1-20
Chapter 2 General Conversion Guides
and Avenue Wraps 2-1
2.1 Numbers and Arithmetic Operations 2-3
2.1.1 Variable Types and Declarations 2-3
2.1.2 Arithmetic Operations 2-4
2.1.3 Intrinsic Functions 2-4
2.1.4 Rounding and Truncation of Numbers 2-6
2.1.5 String Messages 2-6
2.1.6 Error Trapping 2-7
2.2 Manipulation of String Variables 2-9
2.2.1 String Manipulation Requests and Functions 2-9
2.2.2 Querying Variables and If Statements 2-10
2.2.3 Converting and Initializing Variables 2-11
2.3 Lists, Arrays and Collections 2-13
2.3.1 Definitions 2-13
2.3.2 Working with Arrays 2-13
2.3.3 Working with Collections 2-14
2.3.4 Sorting of Collections 2-14
2.3.5 Copying of Collections 2-15
2.4 Iterative Operations 2-16
2.4.1 The Iterative Statements 2-16
2.4.2 Converting the Avenue "For Each ... End" Statement
2-16
2.4.3 Converting the Avenue "While ... End" Statement
2-17
2.4.4 Early Exit of an Iterative Statement 2-18
2.4.5 Advancing to the Next Iteration 2-19
2.5 Miscellaneous Operations 2-20
2.5.1 Current Time and Date 2-20
2.5.2 System Beep 2-20
2.5.3 Variable Declarations 2-20
2.5.4 Script Execution 2-22
2.6 Avenue Wraps 2-23
2.6.1 Function avBasicTrim 2-23
2.6.2 Function avClone 2-23
2.6.3 Subroutine avExecute 2-24
2.6.4 Subroutine avExecute2 2-25
2.6.5 Function avGetEnvVar 2-25
2.6.6 Subroutine avRemoveDupStrings 2-26
2.6.7 Subroutine CopyList 2-26
2.6.8 Subroutine CopyList2 2-27
2.6.9 Subroutine CopyList3 2-27
2.6.10 Subroutine CreateList 2-28
2.6.11 Function Dformat 2-28
2.6.12 Subroutine SortTwoArrays 2-29
2.6.13 Subroutine SortTwoLists 2-30
Chapter 3 Application - Document Avenue Wraps 3-1
3.1 Application - Document Related Avenue Wraps 3-5
3.1.1 Function avAddDoc 3-5
3.1.2 Function avDocActivate 3-5
3.1.3 Function avFindDoc 3-6
3.1.4 Subroutine avGetActiveDoc 3-6
3.1.5 Subroutine avGetActiveThemes 3-7
3.1.6 Subroutine avGetName 3-7
3.1.7 Subroutine avGetProjectName 3-8
3.1.8 Subroutine avGetWinFonts 3-8
3.1.9 Subroutine avGetWorkDir 3-9
3.1.10 Subroutine avInit 3-9
3.1.11 Subroutine avMoveTo 3-10
3.1.12 Subroutine avObjGetName 3-10
3.1.13 Subroutine avObjSetName 3-11
3.1.14 Subroutine avRemoveDoc 3-11
3.1.15 Subroutine avResize 3-12
3.1.16 Subroutine avSetName 3-12
3.1.17 Subroutine avSetWorkDir 3-13
3.1.18 Subroutine avViewMake 3-13
3.2 Theme - Layer Related Avenue Wraps 3-15
3.2.1 Subroutine avGetLayerIndx 3-15
3.2.2 Subroutine avGetLayerType 3-15
3.2.3 Subroutine avGetSelectedExtent 3-16
3.2.4 Subroutine avGetThemes 3-16
3.2.5 Subroutine avGetVisibleCADLayers 3-17
3.2.6 Subroutine avGetVisibleThemes 3-17
3.3 Display Related Avenue Wraps 3-18
3.3.1 Subroutine avDisplayInvalidate 3-18
3.3.2 Subroutine avGetDisplay 3-18
3.3.3 Subroutine avGetDisplayFlush 3-19
3.3.4 Subroutine avPanTo 3-19
3.3.5 Function avReturnVisExtent 3-19
3.3.6 Subroutine avSetExtent 3-20
3.3.7 Subroutine avZoomToSelected 3-20
3.3.8 Subroutine avZoomToTheme 3-21
3.3.9 Subroutine avZoomToThemes 3-21
3.3.10 Subroutine ChangeView 3-22
3.4 Progress Run and Status Bar Display Avenue Wraps 3-23
3.4.1 Subroutine avClearStatus 3-23
3.4.2 Subroutine avShowStopButton 3-23
3.4.3 Subroutine Calc_Callback 3-23
3.4.4 Subroutine RunProgress 3-24
3.5 Sample Code 3-26
Chapter 4 File Input and Output Avenue Wraps 4-1
4.1 Directory Utility Related Avenue Wraps 4-3
4.1.1 Function avDirExists 4-3
4.1.2 Subroutine avListFiles 4-3
4.2 File Existence and Deletion Related Avenue Wraps 4-5
4.2.1 Function avDeleteDS 4-5
4.2.2 Function avFileCopy 4-6
4.2.3 Function avFileDelete 4-6
4.2.4 Function avFileExists 4-7
4.3 File Name Manipulation Related Avenue Wraps 4-8
4.3.1 Function avGetBaseName 4-8
4.3.2 Function avGetBaseName2 4-8
4.3.3 Function avGetExtension 4-9
4.3.4 Function avGetPathName 4-9
4.3.5 Function avSetExtension 4-10
4.4 File Opening and Closing Related Avenue Wraps 4-6
4.4.1 Subroutine avLineFileClose 4-6
4.4.2 Function avLineFileMake 4-6
4.4.3 ASCII File Read/Write Example 4-12
4.5 Writing to and Reading from Files Statements and Related
Avenue Wraps 4-13
4.5.1 Writing to an ASCII File 4-13
4.5.2 Reading from an ASCII File 4-14
4.5.3 Length of an ASCII File 4-15
4.5.4 End of an ASCII File 4-16
4.5.5 Rewind an ASCII File 4-17
4.5.6 Subroutine avAsTokens 4-17
4.6 File Dialogs 4-21
4.6.1 avFileDialogPut 4-21
4.6.2 avFileDialogReturnFiles 4-22
Chapter 5 Theme and Table Avenue
Wraps 5-1
5.1 Layer (Theme) and Table Related Avenue Wraps 5-7
5.1.1 Subroutine avCheckEdits 5-7
5.1.2 Subroutine avCreateTable 5-7
5.1.3 Function avFTabExport 5-8
5.1.4 unction avFTabMakeNew 5-9
5.1.5 Function avGetShapeType 5-10
5.1.6 Subroutine avGetTables 5-11
5.1.7 Subroutine avGetThemeExtent 5-12
5.1.8 Subroutine avInvalidateTOC 5-12
5.1.9 Function avIsCoverage 5-13
5.1.10 Function avIsEditable 5-13
5.1.11 Function avIsFTheme 5-14
5.1.12 Function avIsSDE 5-14
5.1.13 Function avIsVisible 5-15
5.1.14 Subroutine avSetEditable 5-15
5.1.15 Subroutine avSetEditable2 5-16
5.1.16 Subroutine avSetEditableTheme 5-17
5.1.17 Subroutine avSetVisible 5-17
5.1.18 Subroutine avStartOperation 5-18
5.1.19 Subroutine avStopEditing 5-18
5.1.20 Subroutine avStopOperation 5-19
5.1.21 Subroutine avThemeInvalidate 5-19
5.1.22 Subroutine avThemeSetName 5-20
5.1.23 Function avVTabExport 5-21
5.1.24 Function avVTabMake 5-22
5.1.25 Function avVTabMakeNew 5-23
5.1.26 Function FindLayer 5-23
5.1.27 Function FindTheme 5-24
5.2 Theme or Table Attribute Field Related Avenue Wraps 5-27
5.2.1 Function avAddFields 5-27
5.2.2 Function avFieldGetType 5-27
5.2.3 Function avFieldMake 5-28
5.2.4 Function avGetAlias 5-29
5.2.5 Subroutine avGetFields 5-29
5.2.6 Subroutine avGetPrecision 5-30
5.2.7 Subroutine avGetUniqueValues 5-30
5.2.8 Function avRemoveFields 5-31
5.2.9 Subroutine avSetAlias 5-32
5.3 Theme or Table Record Related Avenue Wraps 5-33
5.3.1 Function avAddRecord 5-33
5.3.2 Function avGetFTab 5-33
5.3.3 Subroutine avGetFTabIDs 5-34
5.3.4 Subroutine avGetFTabIDs2 5-34
5.3.5 Function avGetNumRecords 5-35
5.3.6 Subroutine avGetVTab 5-36
5.3.7 Subroutine avGetVTabIDs 5-36
5.3.8 Subroutine avGetVTabIDs2 5-37
5.3.9 Function avReturnValue 5-37
5.3.10 Subroutine avSetValue 5-38
5.3.11 Subroutine avSetValueG 5-39
5.4 Feature Handling Related Avenue Wraps 5-41
5.4.1 Subroutine avFeatureInvalidate 5-41
5.4.2 Subroutine avGetFeature 5-41
5.4.3 Subroutine avGetFeatData 5-42
5.4.4 Subroutine avGetGeometry 5-43
5.4.5 Subroutine avGetTableRow 5-43
5.4.6 Subroutine avUpdateAnno 5-44
5.5 Calculating, Querying and Summarizing Layers (Themes) and
Tables Related Avenue Wraps 5-45
5.5.1 Function avCalculate 5-45
5.5.2 Subroutine avQuery 5-46
5.5.3 Function avSummarize 5-47
5.5.4 Subroutine avTableSort 5-52
5.6 Shapefile and GeoDatabase Related Avenue Wraps 5-53
5.6.1 Function avOpenFeatClass 5-53
5.6.2 Function avOpenWorkspace 5-55
5.6.3 Function CreateAccessDB 5-55
5.6.4 Function CreateAnnoClass 5-56
5.6.5 Function CreateFeatClass 5-57
5.6.6 Function CreateNewGeoDB 5-58
5.6.7 Function CreateNewShapeFile 5-61
5.6.8 Function CreateShapeFile 5-64
5.7 Linking and Joining Tables 5-69
5.7.1 Function avIsJoined 5-69
5.7.2 Function avIsLinked 5-69
5.7.3 Function avJoin 5-70
5.7.4 Function avLink 5-70
5.7.5 Function avUnJoinAll 5-71
5.7.6 Function avUnLinkAll 5-72
5.7.7 Function avUpdateJoin 5-73
5.7.8 Function avUpdateLink 5-73
5.7.9 Function avUpdateLinks 5-74
5.8 Sample Code 5-79
Chapter 6 Feature Selection Avenue Wraps 6-1
6.1 Making Selections Related Avenue Wraps 6-3
6.1.1 Subroutine avBitmapSet 6-3
6.1.2 Subroutine avGetSelection 6-3
6.1.3 Subroutine avGetSelectionIDs 6-4
6.1.4 Subroutine avGetSelectionIDs2 6-4
6.1.5 Subroutine avGetSelFeatures 6-5
6.1.6 Subroutine avInvSelFeatures 6-7
6.1.7 Subroutine avSelectByFTab 6-7
6.1.8 Subroutine avSelectByPoint 6-8
6.1.9 Subroutine avSelectByPolygon 6-9
6.1.10 Subroutine avSetActive 6-10
6.1.11 Subroutine avSetAll 6-10
6.1.12 Subroutine avSetSelection 6-11
6.1.13 Subroutine avSetSelectionIDs 6-11
6.1.14 Subroutine avSetSelFeatures 6-12
6.1.15 Subroutine avSetSelFeatures2 6-13
6.1.16 Subroutine avUpdateSelection 6-13
6.1.17 Subroutine avXORSelection 6-14
6.2 Clearing and Removing Selections Related Avenue Wraps 6-15
6.2.1 Subroutine avBitmapClear 6-15
6.2.2 Subroutine avBitmapClearAll 6-15
6.2.3 Subroutine avClearSelection 6-16
6.2.4 Subroutine avClearSelection2 6-16
6.2.5 Subroutine avGetSelectionClear 6-17
6.2.6 Subroutine avRemoveRecord 6-18
Chapter 7 Message and Menu Boxes Avenue Wraps 7-1
7.1 Information and Warning Messages Related Avenue Wraps 7-3
7.1.1 Subroutine avMsgBox 7-3
7.1.2 Subroutine avMsgBoxF 7-4
7.1.3 Subroutine avMsgBoxInfo 7-5
7.1.4 Subroutine avMsgBoxList 7-5
7.1.5 Subroutine avMsgBoxMultiList 7-7
7.1.6 Subroutine avMsgBoxWarning 7-8
7.1.7 Subroutine avShowMsg 7-8
7.2 Data Input Message Boxes Related Avenue Wraps 7-9
7.2.1 Subroutine avMsgBoxInput 7-9
7.2.2 Subroutine avMsgBoxMultiInput 7-9
7.2.3 Subroutine avMsgBoxMultiInput2 7-11
7.2.4 Subroutine HDBbuild 7-14
7.2.5 Subroutine HDBbuild1 7-20
7.2.6 Subroutine VCBbuild 7-26
7.2.7 Subroutine VDBbuild 7-28
7.2.8 Subroutine VDBbuild2 7-32
7.3 Selection Message Boxes Related Avenue Wraps 7-33
7.3.1 Subroutine avMsgBoxChoice 7-33
7.3.2 Subroutine avMsgBoxChoice2 7-33
7.3.3 Subroutine avMsgBoxYesNo 7-34
7.3.4 Subroutine avMsgYesNoCancel 7-35
Chapter 8 Geometry Avenue Wraps
8-1
8.1 General Geometric Avenue Wraps 8-5
8.1.1 Subroutine avaClassMake 8-5
8.1.2 Subroutine avAsList 8-6
8.1.3 Subroutine avAsList2 8-7
8.1.4 Subroutine avAsList3 8-8
8.1.5 Subroutine avPlAsList 8-8
8.1.6 Subroutine avPlAsList2 8-9
8.1.7 Subroutine avPlFindVertex 8-9
8.1.8 Subroutine avPlGet3Pt 8-10
8.1.9 Subroutine avPlModify 8-11
8.1.10 Subroutine GetShape 8-12
8.2 Geometric Feature Creation Avenue Wraps 8-13
8.2.1 Function avAsPolygon 8-13
8.2.2 Function avCircleMakeXY 8-13
8.2.3 Function avMultipointMake 8-14
8.2.4 Function avPointIDMake 8-14
8.2.5 Function avPointMake 8-15
8.2.6 Function avPointMMake 8-15
8.2.7 Function avPointSetID 8-16
8.2.8 Function avPointSetM 8-16
8.2.9 Function avPointSetZ 8-17
8.2.10 Function avPointZMake 8-17
8.2.11 Function avPolygonMake 8-18
8.2.12 Function avPolygonMake2 8-18
8.2.13 Function avPolylineMake 8-19
8.2.14 Function avPolylineMake2 8-19
8.2.15 Function avPolyline2Pt 8-19
8.2.16 Function avRectMake4Pt 8-20
8.2.17 Function avRectMakeXY 8-21
8.3 Geometric Attributes Avenue Wraps 8-23
8.3.1 Function avHasM 8-23
8.3.2 Function avHasZ 8-23
8.3.3 Function avReturnArea 8-24
8.3.4 Function avReturnCenter 8-24
8.3.5 Function avReturnLength 8-25
8.4 Geometric Editing Avenue Wraps 8-27
8.4.1 Function avClean 8-27
8.4.2 Function avIntersects 8-28
8.4.3 Function avIsWithin 8-28
8.4.4 Function avReturnDifference 8-29
8.4.5 Function avReturnIntersection 8-29
8.4.6 Function avReturnMerged 8-30
8.4.7 Function avReturnUnion 8-31
8.4.8 Subroutine avSplit 8-31
8.4.9 Subroutine avUnion 8-32
8.5 Sample Code for Shape Editing 8-33
Chapter 9 User Document Interaction 9-1
9.1 Creating a Tool Bar and Tool 9-1
9.2 Sample Document Interaction 9-4
9.2.1 Point Creation 9-4
9.2.2 Polyline Creation 9-4
9.2.3 Circle Creation 9-5
9.2.4 Polygon Creation 9-7
9.2.5 Point or Rectangle Creation 9-8
Chapter 10 Graphics and Symbols 10-1
10.1 General Graphics Avenue Wraps 10-5
10.1.1 Subroutine avGetGraphicList 10-5
10.1.2 Subroutine avGetSelected 10-5
10.1.3 Subroutine avGraphicInvalidate 10-6
10.1.4 Subroutine avGraphicListDelete 10-6
10.1.5 Subroutine avGraphicListEmpty 10-7
10.1.6 Subroutine avRemoveGraphic 10-7
10.1.7 Subroutine avRemoveGraphics 10-8
10.1.8 Subroutine avSetGraphicsLayer 10-8
10.1.9 Subroutine avViewAddGraphic 10-9
10.1.10 Subroutine avViewGetGraphics 10-9
10.2 Graphic Attribute Assignment Avenue Wraps 10-10
10.2.1 Function avGraphicGetShape 10-10
10.2.2 Function avGraphicGetSymbol 10-10
10.2.3 Subroutine avGraphicSetShape 10-11
10.2.4 Subroutine avGraphicSetSymbol 10-11
10.2.5 Function avGraphicShapeMake 10-12
10.2.6 Function avSymbolGetAngle 10-12
10.2.7 Function avSymbolGetColor 10-13
10.2.8 Function avSymbolGetOLColor 10-13
10.2.9 Function avSymbolGetOLWidth 10-14
10.2.10 Function avSymbolGetSize 10-14
10.2.11 Function avSymbolGetStipple 10-15
10.2.12 Function avSymbolGetStyle 10-16
10.2.13 Function avSymbolMake 10-16
10.2.14 Subroutine avSymbolSetAngle 10-17
10.2.15 Subroutine avSymbolSetColor 10-17
10.2.16 Subroutine avSymbolSetOLColor 10-19
10.2.17 Subroutine avSymbolSetOLWidth 10-19
10.2.18 Subroutine avSymbolSetSize 10-20
10.2.19 Subroutine avSymbolSetStipple 10-21
10.2.20 Subroutine avSymbolSetStyle 10-21
10.3 Graphic Text Avenue Wraps 10-23
10.3.1 Function avGraphicTextGetAngle 10-23
10.3.2 Subroutine avGraphicTextGetStyle 10-23
10.3.3 Function avGraphicTextGetSymbol 10-24
10.3.4 Function avGraphicTextGetText 10-24
10.3.5 Function avGraphicTextMake 10-25
10.3.6 Subroutine avGraphicTextSetAngle 10-25
10.3.7 Subroutine avGraphicTextSetStyle 10-26
10.3.8 Subroutine avGraphicTextSetSymbol 10-26
10.3.9 Subroutine avGraphicSetText 10-27
10.3.10 Subroutine GetTextFont 10-27
10.3.11 Function MakeTextElement 10-28
10.3.12 Function MakeTextSymbol 10-29
10.4 Sample Graphics Code 10-28
Chapter 11 Classifications and Legends 11-1
11.1 Classifications 11-3
11.1.1 Subroutine avInterval 11-3
11.1.2 Subroutine avNatural 11-3
11.1.3 Subroutine avQuantile 11-4
11.1.4 Subroutine avQuantileX 11-5
11.1.5 Subroutine avSingleSymbol 11-6
11.1.6 Subroutine avUnique 11-7
11.1.7 Subroutine avUniqueM 11-8
11.2 Legends 11-11
11.2.1 Subroutine avGetClassifications 11-11
11.2.2 Function avGetClassType 11-11
11.2.3 Subroutine avGetFieldNames 11-12
11.2.4 Subroutine avGetLegend 11-12
11.2.5 Function avGetLegendType 11-13
11.2.6 Function avGetNumClasses 11-13
11.2.7 Subroutine avLegendGetSymbols 11-14
11.2.8 Subroutine avLegendSetSymbols 11-14
11.2.9 Subroutine avUpdateLegend 11-15
11.3 Symbol Palette 11-17
11.3.1 Function avGetPalette 11-17
11.3.2 Subroutine avPaletteGetList 11-18
11.3.3 Subroutine avPaletteGetNames 11-20
Chapter 12 Utility Macros 12-1
12.1 VBA Script Import and Export 12-3
12.1.1 Subroutine ExportVBA 12-3
12.1.2 Subroutine ImportVBA 12-3
12.2 Background Scripts 12-5
12.2.1 Subroutine avConvertArea 12-5
12.2.2 Subroutine avConvertDistance 12-5
12.2.3 Function avPix2Map 12-6
12.2.4 Function avUpdateDefaultFont 12-7
12.2.5 Subroutine GetTextRect 12-7
12.2.6 Function icasinan 12-8
12.2.7 Function icatan 12-8
12.2.8 Function iccomdis 12-9
12.2.9 Subroutine iccomppt 12-9
12.2.10 Function icdegrad 12-10
12.2.11 Subroutine icforce 12-10
12.2.12 Function icmakdir 12-11
12.2.13 Function icraddeg 12-11
12.2.14 Subroutine SetViewSnapTol 12-12
12.3 Projection Scripts 12-13
12.3.1 Subroutine ShapeProjectSHP 12-13
12.3.2 Subroutine ShapeProjectVAL 12-15
Chapter 13 Avenue Wraps Forms 13-1
13.1 Creating a VBA Form 13-1
13.2 Creating the EnterFiles Form 13-5
13.3 Creating the HDialogBox Form 13-11
13.4 Creating the VDialogBox Form 13-15
13.5 Creating the VDialogBox2 Form 13-19
13.6 VB Specific Properties 13-24
Chapter 14 Application Deployment
Methods 14-1
14.1 Creating an ArcMap Template File 14-1
14.2 Creating an ArcMap Project File referencing an ArcMap Template
File 14-4
14.3 Creating an Active X DLL 14-6
14.3.1 General Commentary 14-6
14.3.2 Creating a Toolbar DLL 14-8
14.3.3 Loading an Active X DLL within ArcMap 14-19
14.3.4 Creating a ComboBox 14-20
14.4 Using the Avenue Wraps DLL 14-25
14.4.1 General Commentary 14-25
14.4.2 Avenue Wraps Properties 14-26
Appendices
A. Palette Index Values A-1
B. Color Calibration Charts B-1
C. Avenue Requests to Avenue Wraps Mapping
C-1
D. Listings of Avenue
Wraps D-1
Index
Sample Wraps
Shown below are three Avenue Wraps for the
Avenue requests GetActiveDoc, GetActiveThemes and
GetBaseName, respectively. These samples illustrate the
format in which the Avenue Wraps are presented.
Option Explicit
'
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
' *
*
' * Name: avGetActiveDoc File Name: avgtadoc.bas
*
' *
*
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
' *
*
' * PURPOSE: GET THE CURRENT DOCUMENT OR FOCUS MAP *
' *
*
' * GIVEN: nothing
*
' *
*
' * RETURN: pMxApp = the application
*
' * pmxDoc
= the document
*
' * pActiveView
= the active view
*
' * pMap
= the focus map
*
' *
*
' * Dim pMxApp As IMxApplication
*
' * Dim pmxDoc As IMxDocument
*
' * Dim pActiveView As IActiveView
*
' * Dim pMap As IMap
*
' *
*
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
'
Public Sub avGetActiveDoc(pMxApp
As esriCore.IMxApplication, _
pmxDoc As esriCore.IMxDocument,
_
pActiveView As esriCore.IActiveView,
_
pMap As esriCore.IMap)
'
'
' -Get the active view <<<---
Set pMxApp = Application
Set pmxDoc = Application.Document
Set pActiveView = pmxDoc.ActiveView
'
' -Get the active map
Set pMap = pmxDoc.FocusMap
'
End Sub
Option Explicit
'
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
' *
*
' * Name: avGetActiveThemes File Name: avgtathm.bas *
' *
*
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
' *
*
' * PURPOSE: GET A LIST OF THE ACTIVE OR SELECTED THEMES *
' *
*
' * GIVEN: pmxDoc = the active view
*
' *
*
' * RETURN: ThemesList = list of themes
*
' *
*
' * Dim pmxDoc As IMxDocument
*
' * Dim ThemesList As New Collection
*
' *
*
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
'
Public Sub avGetActiveThemes(pmxDoc
As esriCore.IMxDocument, ThemesList)
'
Dim pMap As esriCore.IMap
Dim RecList As New Collection
Dim pSelected As IUnknown
Dim pItems As esriCore.ISet
Dim pUnknown As IUnknown
Dim aName As Variant
Dim aType As Integer
Dim kPos, i As Long
Dim aLName As Variant
'
' -Get the active map
Set pMap = pmxDoc.FocusMap
'
' -Initialize the list of themes
Call CreateList(ThemesList)
'
' -Initialize the list of index values indicating the position
of
' -the theme in the Table of Contents
Call CreateList(RecList)
'
' -Get the selected item, if any
Set pSelected = pmxDoc.SelectedItem
'
' -Check if nothing is selected
If (Not pSelected Is Nothing) Then
'
' -Check if more than one item selected
If TypeOf pSelected Is esriCore.ISet Then
Set pItems = pSelected
pItems.Reset
'
' -Get the first selected layer
Set pUnknown = pItems.Next
'
' -Loop until we have run out of selected layers
Do While Not pUnknown Is Nothing
'
' -Find out what we are working with
Call avGetLayerType(pUnknown, aName, aType)
'
' -Check if we have something we can work with
If (aType > 0) Then
' -Store the name of the layer
ThemesList.Add (aName)
' -Initialize the index reflecting the layers
' -position in the TOC
kPos = 999999
' -Find its position in the Table of Contents
For i = 0 To pMap.LayerCount - 1
' -Get the layer name in uppercase characters
aLName = UCase(pMap.Layer(i).name)
' -Check if given name matches the layer name
If (aLName = aName) Then
kPos = i
Exit For
End If
Next
' -Store the index
RecList.Add (kPos)
End If
'
' -Get the next feature found in the selection
Set pUnknown = pItems.Next
Loop
'
' -Sort the lists, if any data exists, to ensure that the
' -theme order corresponds to the order in the TOC
If (RecList.Count > 0) Then
Call SortTwoLists(RecList, ThemesList, "Sorting...",
True)
End If
'
' -Handle case when one item selected
Else
'
' -Find out what we are working with
Call avGetLayerType(pSelected, aName, aType)
'
' -Check if we have something we can work with, if so
' -store the name
If (aType > 0) Then
ThemesList.Add (aName)
End If
End If
End If
'
' -Initialize the global variable
Set ugLayer = Nothing
'
' -Initialize the name of the layer or table
ugLayerStrg = " "
'
End Sub
Option Explicit
'
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
' *
*
' * Name: avGetBaseName File Name: avgbasnm.bas
*
' *
*
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
' *
*
' * PURPOSE: GET THE BASE NAME THAT APPEARS IN A PATH NAME
*
' *
*
' * GIVEN: aPath = the full path name to be processed
*
' *
*
' * RETURN: avGetBaseName = base name appearing in a path name *
' * including
the filename extension, if *
' * one
is present in the base name *
' * given
return
*
' * c:\test\vb\aFile.shp
aFile.shp *
' * c:\test\vb\aFile
aFile *
' * c:\test\vb\
vb
*
' * c:\test\vb
vb
*
' * c:\a
a
*
' * c:\
*
' * aFile.txt
aFile.txt
*
' *
Second from last example (c:\) yields
*
' *
an empty string ("")
*
' *
*
' * Dim aPath As String
*
' * Dim avGetBaseName As String
*
' *
*
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * *
'
Public Function avGetBaseName(aPath)
As String
'
Dim fs
Dim rootName, anExt As String
'
' -Create a file system object for the shapefile
Set fs = CreateObject("Scripting.FileSystemObject")
'
' -Get the root name of the file being processed
rootName = fs.GetBaseName(aPath)
'
' -Trim any leading and trailing blanks
avGetBaseName = Trim(rootName)
'
' -Get the extension in the base name, if any
anExt = avGetExtension(aPath)
'
' -Add the extension into the base name, if appropriate
If (Len(anExt) > 0) Then
avGetBaseName = avGetBaseName + "." + anExt
End If
'
' -Dereference the object
Set fs = Nothing
'
End Function
CEDRA Publications are for those that want to get a heads up on the bridging of engineering and GIS, The CEDRATM Corporation provides publications dealing with CAD: preparation of maps, survey data import, design of various civil engineering projects, preparation of associated design drawings, and/or general geometric solutions and graphics - COGO: solution of geometric problems, and design of roadways, sites and other land morphologic projects - Parcel maintenance - Water distribution: modeling and design of water distribution systems - Sanitary, Storm, Combined sewer modeling and inventory applications.
!!!!! For a limited time only purchase a CEDRA Publication and get the applicable accompaning demo software !!!!!
|
This publication describes the graphic menus common to all modules of The CEDRA System used in the preparation of maps, survey data import, design of various civil engineering projects, preparation of associated design drawings, and/or general geometric solutions and graphics. PARTIAL CONTENTS: ATTRIBUTES: Concepts, Menu Structure, Layers, Line Styles, Point Snapping, Grid Use, Element Visibility, Windowing, Zooming, Input Data Format PRIMITIVES: Types, Points, Lines, Curves, Text Fonts and Justification SPECIAL CONSTRUCTIONS: Intersections, Projections, Tangencies, Mirroring, Parallel/concentric Elements, Contour Manipulation, Shading, Dynamic Rotation OPERATIONS: Repetition, Translation and Rotation, Editing, Deletions and Cut-outs INPUT/OUTPUT: Loading Files, Loading Macros, Filing, ARC/INFO, DXF and IGES Communication .... (620 Pages) |
|
|
This publication is a supplement to that of the CEDRA Graphics Engine. It describes additional graphics commands used in the drafting of engineering drawings as prepared with The CEDRA System. PARTIAL CONTENTS: SYMBOLS: Built-in Symbols, Special Symbols, Scaling, Dragging and RotatingBOXES: Types and Definition DIMENSIONING: Modes, Projection Line Display, Leaders, Justification, Radial and Angular Dimensions SHADING: Patterns, Orientation, Spacing, Weight Ratio of Shade Region, Select Object to be Shaded APPENDICES: Fonts and Text Sizes, Symbols and Line Styles, Utility Programs, CEDRA Drawing File Structure UTILITY PROGRAMS: Format Conversion, Text Import, Mass Editing, Drawing Sizing and Merging, Drawing Cut-outs, Digitization, Coordinate Table Plotting, ARC/INFO Communication .... (144 Pages) |
|
|
This publication describes the interactive graphic commands used in the preparation of topographic maps, execution of various surveying applications, solution of geometric problems, and design of roadways, sites and other land morphologic projects with The CEDRA System. PARTIAL CONTENTS: TIN: Define and Manipulate a Mesh, Generate Contours, Merge Meshes, Data Import/Export STAKEOUT SURVEY: Stakeout Data Selection, Stakeout Report DTM Analysis: User Specifications, Cross Section and Profile Stripping, Slope Analysis, Flow Paths GRADING: Template Definition, Profile, Cross Sections and Alignments TRAVERSE: Methods, Adjustment Specifications ALIGNMENTS: Design criteria, Horizontal Alignment Data, Vertical Alignment Data, Cul-de-sacs, Automatic Lot Generation, House Envelopes, Metes & Bounds, Stationing, Earthwork, Design Contours ..... (568 Pages) |
|
|
This publication presents the hydraulic concepts used in the modeling of sewer and drainage systems, and describes the model preparation and graphic user interface with The CEDRA System. PARTIAL CONTENTS: OVERVIEW: Concepts, Geometric Model, Special Model Features, Load Model, Capacity Analysis, Hydrograph Development, Backwater, Model Verification MODEL PREPARATION: Processing Modes, Base Map, Model Preparation, Command Structure THE COMMANDS: Control Parameters, Conduit Built-in- and Custom Shapes, Geometric Model, Parallel Pipes, Diversions, Siphons, Force Mains, Head Losses, IDF Curves and Peaking Factors, Storm and Waste Water Load Model, Capacity Analysis, Flow Hydrograph, Backwater, Flow Metering REPORTS: Capacity, Inadequate Pipes, Hydrographs, Backwater, Graphics and Profiles..... (682 Pages) |
|
|
This publication descibes the graphic interface of The CEDRA System with the U.S. Environmental Protection Agency's EPANETTM Version 1 and Version 2 modelers for the modeling and design of water distribution systems. PARTIAL CONTENTS: GEOMETRY: Units, Service Area, Network, Nodes, Pipes, Read/Create ASCII Geometry Data Files LOADINGS: Defining the Supply Source, Defining the Demand Loads MODELING: Simulation Types, Directives to the Analysis Program, Display of Analysis Results, Alternative Analyses,ATTRIBUTES & QUANTITIES: Create Layers, Set Annotation Attributes THE HYDRAULIC SOLUTION: Pressure and Flow Requirements, Basic Equations DISCUSSION OF EXAMPLES: Steady State Simulations, Extended Period Simulations SPECIAL CONSIDERATIONS: Closing Pipes, Pressure Regulating Valves, Pumps, Parallel Pipes..... (332 Pages) |
|
|
This publication is packed with step-by-step instructions to the most frequently asked questions like Data Collector Input, Geometrics, Roadway, Drainage, Sewer and Water Design, Drawing Assembly and Management, DXF Communication, Plotting and many others. PARTIAL CONTENTS: THE CEDRA SYSTEM: Design Philosophy, File Organization, Survey Data Import, Graphics BASIC INTERACTIVE GRAPHICS: User-Interface, Main Menu Overview FILE MANAGEMENT: Directories and Sub-Directories, Drawing Files, Input, Data and Command Files SAMPLE PROBLEMS: Digitization, Traverse Adjustment, TIN Generation, Contour Generation, Boundary Generation, Profile and Cross-Section Extraction, Horizontal Alignments, Vertical Alignments, Stakeout Data, GIS Communication, Profile & Cross Section Plotting, Grading, Earthwork, Slope Analysis....... (716 Pages) |
|
|
This publication presents a methodology for creating inter-related models of various utilities with The CEDRA System using step-by step instructions. PARTIAL CONTENTS: BASE DATA: Attributes, Source of Information, Base Map THE UTILITY SYSTEM: Digitization, File Import, Alignments, Filing, DBMS and Spreadsheet Communication SANITARY SEWER SYSTEM: System Concepts, Geometric Model, Load Model STORM DRAINAGE SYSTEM: System Concepts, Geometric Model, Load Model SEWER MODELING: Peaking Factors, IDF Curves, Custom Conduit Shapes, Capacity analysis SEWER ASSESSMENT: Infiltration, Flow Hydrographs and Metering, Backwater, Stormwater Detention WATER DISTRIBUTION SYSTEM: Network Model, Supply/Demand ModelSURVEY APPLICATIONS: Traversing, Cross Sections, Profiles, Stakeout, Map Preparation .... (496 Pages) |
|
|
This publication describes in detail the menus, buttons and tools that help the user in editing ArcView shapefiles and performing general CAD-like drafting. PARTIAL CONTENTS: INTRODUCTION: General Concepts, User Interface, Extended Data, Program Invocation PROJECT DOCUMENT: Re-sizing Windows, Preferences, Changing Working Directories VIEW MENUS: Text Editing Menus, Arrowhead Parameters, Generate Graphic Text from a Table, Import Points, Annotate Menus BUTTONS: Units, Angles, Directions, Point Snapping, Traversing, Layers, File Viewing GEOMETRIC TOOLS: Points, Lines, Curves, TangenciesCONSTRUCTION TOOLS: Offset Elements, Element Editing, Intersection Tools DRAFTING TOOLS: Echo of Distances, Angles and Areas, Dimensioning, Transformation.... (184 Pages) |
|
|
This publication includes that of CEDRA-AVcad, and expands it with additional three dimensional coordinate geometry commands used in engineering, surveying, mapping and related applications. PARTIAL CONTENTS: INTRODUCTION: Concepts, Program Invocation PROJECT DOC: Sizing Windows, PreferencesMENUS: Text Editing, Arrowhead Parameters, Import Points, AnnotateBUTTONS: Units, Angles, Directions, Point Snapping, Traversing, LayersPOINTS: Group #1, Group #2LINES: Group #1, Group #2, Group #3CURVES: Group #1, Group #2, Group #3OFFSET & PROJECTIONS: Offset elements, ProjectionsTANGENCIES: Tangent Lines, Tangent ArcsEDITING: Move, Extend, Divide, CutoutINTERSECTIONS: Group #1, Group #2, Group #3DRAFTING: Echo Distances, Angles and Areas, Dimensioning, Transformation .... (268 Pages) |
|
|
This publication includes that of CEDRA-AVcad, and expands it with additional three dimensional coordinate geometry commands tailored for land parcel (cadastral) mapping and related applications. PARTIAL CONTENTS: INTRODUCTION: General Concepts, Program Invocation PROJECT DOC: Sizing Windows, Preferences MENUS: Text Editing, Arrowhead Parameters, Import Points, Annotate, Parcel Utilities, Plat Drawing BUTTONS: Units, Angles, Directions, Point Snapping, Traversing, Layers GEOMETRIC TOOLS: Points, Lines, Curves, Tangent Arcs CONSTRUCTIONS: Offset Elements, Editing Elements, Intersections DRAFTING: Echo of Distances, Angles and Areas, Dimensioning, Transformation PARCEL TOOLS: Squaring Buildings, Define Parcels, Transcribe Deed, Edit Parcels, Split and Combine Parcels, Delete Parcels .... (232 Pages) |
|
| This publication presents the concepts used in the modeling of storm and waste water systems with the SEWERS and SWMM modelers, and describes the model preparation and editing user interface. PARTIAL CONTENTS: INTRODUCTION: Concepts, Geometric Model, Conduits, Special Features, Load Model, Shapefiles, User Interface, Program Invocation PROJECT DOC: Windows, Preferences, Directories VIEW MENUS: Text Editing, Arrowheads, Import Points, Annotate MODELING: Control Data, Xtran Data, Hydrographs, User Shapes, Update Geometry, Execute MODIFY: Control Data, Attributes, Sumps, Output Table, Classification QUERY: Range, Highs, Lows, Nodes, Pipes, Strips, Inadequate Pipes ANNOTATE: Nodes, Pipes, Profile, EPS Graphs BUTTONS: Units, Angles, Directions, Layers, File Viewing TOOLS: Nodes, Pipes, Waste Loads, Storm Loads, Modify Nodes & Pipes, Dimension, Transform..... (378 Pages) | |
|
This publication presents the concepts used in the modeling of water distribution systems with the U.S. Environmental Protection Agency's EPANETTM Version 1 and Version 2 modelers, and describes the model preparation and editing user interface. PARTIAL CONTENTS: INTRODUCTION: Concepts, Nodes, Pipes, Networks, Service Areas, Shapefiles, User Interface, Program Invocation PROJECT DOC: Windows, Preferences, Directories VIEW MENUS: Text Editing, Arrowheads, Import Points, Annotate MODELING: Control Data, Resegment, Condition Controls, Water Quality, Update Geometry, Execute MODIFY: Control Data, Attributes, Water Quality, Output Table, Classification QUERY: Range, Highs, Lows, Nodes, Pipes, Reverse Flow, System ANNOTATE: Nodes, Pipes, Profile, EPS Graphs BUTTONS: Units, Angles, Directions, Layers, File Viewing TOOLS: Nodes, Pipes, Load Assignment, Modify Nodes & Pipes, Delete, Break Pipe, Select Strip, Dimension, Transform..... (406 Pages) |
For more information on CEDRATM software and services contact The CEDRA Corporation at 151 Sully's Trail - Suite 6, Pittsford, New York 14534, phone: 585-232-6998, fax: 585-262-2042 or Send E-mail to CEDRA: cedra@cedra.com