![]() |
![]() |
The CEDRA Corporation is pleased to announce the release of Avenue WrapsTM. ISBN 0-9722631-0-1. A new publication comprised of more than 600 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. More than 250 of the most popular Avenue requests are presented in Avenue Wraps. 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.
Not in the mood to retype scripts, ELECTRONIC
MEDIA (CD) is available containing CEDRA Avenue Wraps in an ArcMap
document file and as a Dynamically Linked Library (.dll). In either
form, CEDRA Avenue Wraps is immediately available for Avenue programmers
to begin converting their applications.
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.
|
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. |
Table of Contents
Chapter 1 Introduction to Avenue Wraps 1-1
1.1 Comments on the Declaration of Variables1-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-16
1.3.4 Converting another Geometric Avenue Script 1-19
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.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-10
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-14
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 Function avGetEnvVar 2-25
2.6.5 Subroutine CopyList 2-25
2.6.6 Subroutine CopyList2 2-26
2.6.7 Subroutine CreateList 2-26
2.6.8 Function Dformat 2-27
2.6.9 Subroutine SortTwoLists 2-28
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 avFindDoc 3-5
3.1.3 Subroutine avGetActiveDoc 3-6
3.1.4 Subroutine avGetActiveThemes 3-6
3.1.5 Subroutine avGetName 3-7
3.1.6 Subroutine avGetProjectName 3-7
3.1.7 Subroutine avGetWorkDir 3-8
3.1.8 Subroutine avInit 3-8
3.1.9 Subroutine avMoveTo 3-9
3.1.10 Subroutine avObjSetName 3-9
3.1.11 Subroutine avObjSetName 3-10
3.1.12 Subroutine avRemoveDoc 3-10
3.1.13 Subroutine avResize 3-11
3.1.14 Subroutine avSetName 3-11
3.1.15 Subroutine avSetWorkDir 3-12
3.2 Theme - Layer Related Avenue Wraps 3-13
3.2.1 Subroutine avGetLayerIndx 3-13
3.2.2 Subroutine avGetLayerType 3-13
3.2.3 Subroutine avGetSelectedExtent 3-14
3.2.4 Subroutine avGetThemes 3-14
3.2.5 Subroutine avGetVisibleCADLayers 3-15
3.2.6 Subroutine avGetVisibleThemes 3-15
3.3 Display Related Avenue Wraps 3-16
3.3.1 Subroutine avDisplayInvalidate 3-16
3.3.2 Subroutine avGetDisplay 3-16
3.3.3 Subroutine avGetDisplayFlush 3-17
3.3.4 Subroutine avPanTo 3-17
3.3.5 Function avReturnVisExtent 3-17
3.3.6 Subroutine avSetExtent 3-18
3.3.7 Subroutine avZoomToSelected 3-18
3.3.8 Subroutine avZoomToTheme 3-19
3.3.9 Subroutine avZoomToThemes 3-19
3.3.10 Subroutine ChangeView 3-20
3.4 Progress Run and Status Bar Display Avenue Wraps 3-21
3.4.1 Subroutine avClearStatus 3-21
3.4.2 Subroutine avShowStopButton 3-21
3.4.3 Subroutine Calc_Callback 3-21
3.4.4 Subroutine RunProgress 3-22
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 avFileDelete 4-5
4.2.3 Function avFileExists 4-5
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-5
5.1.1 Subroutine avCheckEdits 5-5
5.1.2 Function avFTabMakeNew 5-5
5.1.3 Function avGetShapeType 5-6
5.1.4 Subroutine avGetThemeExtent 5-7
5.1.5 Subroutine avInvalidateTOC 5-8
5.1.6 Function avIsEditable 5-8
5.1.7 Function avIsFTheme 5-9
5.1.8 Function avIsVisible 5-9
5.1.9 Function avOpenFeatClass 5-10
5.1.10 Subroutine avSetEditable 5-10
5.1.11 Subroutine avSetEditableTheme 5-11
5.1.12 Subroutine avSetVisible 5-12
5.1.13 Subroutine avStartOperation 5-12
5.1.14 Subroutine avStopEditing 5-12
5.1.15 Subroutine avStopOperation 5-13
5.1.16 Subroutine avThemeInvalidate 5-14
5.1.17 Function avVTabMakeNew 5-14
5.1.18 Function CreateNewShapeFile 5-15
5.1.19 Function CreateShapeFile 5-16
5.1.20 Function FindLayer 5-21
5.2 Theme or Table Attribute Field Related Avenue Wraps 5-23
5.2.1 Function avAddFields 5-23
5.2.2 Function avFieldGetType 5-23
5.2.3 Function avFieldMake 5-33
5.2.4 Subroutine avGetFields 5-25
5.2.5 Function avRemoveFields 5-25
5.3 Theme or Table Record Related Avenue Wraps 5-27
5.3.1 Function avAddRecord 5-27
5.3.2 Function avGetFTab 5-27
5.3.3 Subroutine avGetFTabIDs 5-28
5.3.4 Function avGetNumRecords 5-28
5.3.5 Subroutine avGetVTab 5-29
5.3.6 Subroutine avGetVTabIDs 5-29
5.3.7 Subroutine avSetValue 5-30
5.3.8 Subroutine avSetValueG 5-31
5.4 Feature Handling Related Avenue Wraps 5-33
5.4.1 Subroutine avFeatureInvalidate 5-33
5.4.2 Subroutine avGetFeature 5-33
5.4.3 Subroutine avGetFeatData 5-34
5.4.4 Subroutine avGetGeometry 5-35
5.4.5 Subroutine avUpdateAnno 5-35
5.5 Calculating, Querying and Summarizing Layers (Themes) and
Tables Related Avenue Wraps 5-37
5.5.1 Function avCalculate 5-37
5.5.2 Subroutine avQuery 5-38
5.5.3 Function avSummarize 5-38
5.6 Sample Code 5-44
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 avGetSelFeatures 6-4
6.1.5 Subroutine avInvSelFeatures 6-6
6.1.6 Subroutine avSelectByFTab 6-7
6.1.7 Subroutine avSelectByPoint 6-8
6.1.8 Subroutine avSelectByPolygon 6-8
6.1.9 Subroutine avSetActive 6-9
6.1.10 Subroutine avSetAll 6-10
6.1.11 Subroutine avSetSelection 6-10
6.1.12 Subroutine avSetSelFeatures 6-11
6.1.13 Subroutine avUpdateSelection 6-11
6.1.14 Subroutine avXORSelection 6-12
6.2 Clearing and Removing Selections Related Avenue Wraps 6-13
6.2.1 Subroutine avBitmapClear 6-13
6.2.2 Subroutine avClearSelection 6-13
6.2.3 Subroutine avGetSelectionClear 6-14
6.2.4 Subroutine avRemoveRecord 6-14
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 avMsgBoxInfo 7-3
7.1.2 Subroutine avMsgBoxList 7-3
7.1.3 Subroutine avMsgBoxWarning 7-5
7.1.4 Subroutine avShowMsg 7-6
7.2 Data Input Message Boxes Related Avenue Wraps 7-7
7.2.1 Subroutine avMsgBoxInput 7-7
7.2.2 Subroutine avMsgBoxMultiInput 7-7
7.2.3 Subroutine avMsgBoxMultiInput2 7-9
7.2.4 Subroutine VDBbuild 7-12
7.2.5 Subroutine VDBbuild2 7-15
7.3 Selection Message Boxes Related Avenue Wraps 7-17
7.3.1 Subroutine avMsgBoxChoice 7-17
7.3.2 Subroutine avMsgBoxYesNo 7-17
7.3.3 Subroutine avMsgYesNoCancel 7-18
Chapter 8 Geometry Avenue Wraps 8-1
8.1 General Geometric Avenue Wraps 8-3
8.1.1 Subroutine avaClassMake 8-3
8.1.2 Subroutine avAsList 8-4
8.1.3 Subroutine avAsList2 8-5
8.1.4 Subroutine avAsList3 8-6
8.1.5 Subroutine avPlAsList 8-6
8.1.6 Subroutine avPlAsList2 8-7
8.1.7 Subroutine avPlFindVertex 8-7
8.1.8 Subroutine avPlGet3Pt 8-8
8.1.9 Subroutine avPlModify 8-9
8.2 Geometric Feature Creation Avenue Wraps 8-11
8.2.1 Function avAsPolygon 8-11
8.2.2 Function avCircleMakeXY 8-11
8.2.3 Function avPointMake 8-12
8.2.4 Function avPolygonMake 8-12
8.2.5 Function avPolygonMake2 8-13
8.2.6 Function avPolylineMake 8-13
8.2.7 Function avPolylineMake2 8-14
8.2.8 Function avPolyline2Pt 8-14
8.2.9 Function avRectMakeXY 8-15
8.3 Geometric Attributes Avenue Wraps 8-16
8.3.1 Function avReturnArea 8-16
8.3.2 Function avReturnCenter 8-16
8.3.3 Function avReturnLength 8-17
8.4 Geometric Editing Avenue Wraps 8-18
8.4.1 Function avClean 8-18
8.4.2 Function avIntersects 8-18
8.4.3 Function avReturnIntersection 8-19
8.4.4 Function avReturnMerged 8-20
8.4.5 Function avReturnUnion 8-20
8.4.6 Subroutine avSplit 8-21
8.5 Sample Code for Shape Editing 8-23
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 avGraphicInvalidate 10-5
10.1.3 Subroutine avGraphicListDelete 10-6
10.1.4 Subroutine avGraphicListEmpty 10-6
10.1.5 Subroutine avRemovetGraphic 10-7
10.1.6 Subroutine avSetGraphicsLayer 10-7
10.1.7 Subroutine avViewAddGraphic 10-8
10.1.8 Subroutine avViewGetGraphics 10-8
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.2 Legends 11-9
11.2.1 Subroutine avGetClassifications 11-9
11.2.2 Function avGetClassType 11-9
11.2.3 Subroutine avGetFieldNames 11-10
11.2.4 Subroutine avGetLegend 11-10
11.2.5 Function avGetLegendType 11-11
11.2.6 Function avGetNumClasses 11-11
11.2.7 Subroutine avLegendGetSymbols 11-12
11.2.8 Subroutine avLegendSetSymbols 11-12
11.2.9 Subroutine avUpdateLegend 11-13
11.3 Symbol Palette 11-15
11.3.1 Function avGetPalette 11-15
11.3.2 Subroutine avPaletteGetList 11-16
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 GetTextRect 12-5
12.2.2 Function icasinan 12-6
12.2.3 Subroutine icatan 12-6
12.2.4 Function iccomdis 12-6
12.2.5 Subroutine iccomppt 12-7
12.2.6 Function icdegrad 12-8
12.2.7 Subroutine icforce 12-8
12.2.8 Function icmakdir 12-9
12.2.9 Function icraddeg 12-9
12.2.10 Subroutine SetViewSnapTol 12-10
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 VDialogBox Form 13-11
13.4 Creating the VDialogBox2 Form 13-15
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
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
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 KYPIPE program of the University of Kentucky 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 KYPIPE and EPANET 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