ArcGIS Version 9.x Implementation of Avenue Wraps In converting our existing ArcGIS 8.x applications to ArcGIS 9.x the following issues were encountered: 1. Unregister any existing 8.x custom application DLLs by typing in a Command Prompt window the following: regsvr32 /u xxxxx.dll ArcGIS 8.x and 9.x can not coexist on the same PC so that any references to 8.x based DLLs should be removed. 2. Any references to esriCore can be removed or changed to their new counterpart. The esriCore library in ArcGIS 9.x has been broken up into a number of smaller libraries. If working with VBA code in an ArcMap document file, the easiest thing to do is to globally remove the esriCore reference, if present. If working with VB code, use the ESRI VB6 Code Converter Add-In to convert your VB project to be compatible with ArcGIS 9.x (the Code Converter will not work on ArcMap document files with VBA code). Note, if your application is referencing the Avenue Wraps DLL, it is a good idea to remove the reference to the DLL and then re-reference the DLL so that the latest instance of the DLL is being referenced. 3. Modeless dialogs had to be rewritten to use the IModelessFrame interface. The ArcGIS developer online help contains a description of how to recode the modeless dialogs. Type IModelessFrame in the search window under the Index tab to display the help. 4. The avBitMapSet "wraparound" was changed so as to display the selected feature. This modification may have an impact on the operation of your application depending upon how avBitMapSet is being used. 5. The avExecute and avExecute2 "wraparounds" were changed to use the avRunShell procedure in order to properly execute the given command. 6. The .Insert method had to be changed to the .CreateFeature method when dealing with annotation features. 7. Prior to using the .AddLayer method call avStopEditing first to stop the editor, if this is not done, any open edits will be lost. It appears that if the editor is in session and a new layer is added to the map any edits that were made will be lost. The only work-around is to stop the editor prior to adding the new layer. Avenue Wraps for ArcGIS Directory Comments: 1. The Avenue Wraps Distribution directory contains five sub-directories which are described below. In addition to these folders there are a number of other files that appear in the distribution directory including the following: avwraps.dll The Avenue Wraps ActiveX DLL file which can be referenced in any ArcMap document file or in a VB project file. This file is registered with Windows during the installation process and is ready for use. avshell.exe The Avenue Wraps ActiveX EXE file which is used by the Avenue Wraps ActiveX DLL file. This file is registered with Windows during the installation process and is ready for use. (NOT INCLUDED FOR ArcGIS 8.x USERS) *.bas VBA module files containing sample exercises which demonstrate how the Avenue Wraps can be used. avwraps.mxd ArcMap Document file containing the source code for the Avenue Wraps. (ArcGIS 8.x SPECIFIC, not applicable for ArcGIS 9.x users) AppendixD.pdf Appendix D of the Avenue Wraps Book in .pdf format readme.txt This file. 2. The directory 'data' contains an ArcMap document file, exercise.mxd, that references the Avenue Wraps DLL, avwraps.dll. In so doing, the ArcMap document file does not have to contain the Avenue Wraps source modules. Within this document file there are sample VBA macros demonstrating various Avenue Wraps functionality. Each module can be opened and executed using the VBA Run tool. In additon, there is a custom tool bar that demonstrates various types of user interaction with the map display, such as, making a single pick, drawing a line, drawing a circle, etc. The source code for the tool bar commands are in the ThisDocument module under the ArcMap Objects folder within the Project category. Holding the cursor over a specific tool will result in a ToolTip message being displayed. If there should be a problem in opening the exercise.mxd document file, the reader can recreate the exercise.mxd document file by performing the following: Referencing the Avenue Wraps DLL in an ArcMap document file: a. Invoke ArcMap b. Select the Tools menu item c. Select the Macros sub menu item d. Select the Visual Basic Editor sub menu item e. Select the Tools menu item f. Select the References... sub menu item g. Select the Browse... button h. Navigate to the location of the avwraps.dll file, if this is unknown use the Windows Search or Find File functionality to locate the avwraps.dll file i. Select the Open button, the Avenue Wraps DLL has now been been referenced in the ArcMap document file and all of its procedures are available for use. In the list of Available References on the left side of the References dialog box an item called CEDRA Avenue Wraps should appear with a check in a square to the left of CEDRA Avenue Wraps j. Click the OK button Loading the exercise.mxd specific modules: k. Select the File menu item l. Select the Import File... sub menu item m. Select the Module3.bas file and then click the Open button n. Repeat step m for Module4.bas, Module5.bas, Module6.bas, Module7.bas, Module8.bas, Module9.bas, InitGlobalsMOD.bas and ThisDocument.cls o. Select the File menu item p. Select the Close and Return to ArcMap sub menu item Creating an ArcMap document file: q. Select the File menu item r. Select the Save As... sub menu item s. Enter exercise in the data field to the right of the label File name: and then select the Save button. The exercise.mxd document file has now been recreated and is ready for use. 3. The directory 'dll' contains the VB project, avwraps.vbp, which builds the Avenue Wraps dll file. All of the Avenue Wraps code associated with the dll implementation is in this directory. Note that the code contained in this directory is VB specific, although a good deal of it will function in a VBA environment. For ArcGIS 9.x users only, the source code for the Avenue Wraps is only contained in this directory. Any other Avenue Wraps code appearing in any of the other directories is ArcGIS 8.x specific. For ArcGIS 8.x users the code in this directory is for the most part identical to the code in the other directories with any exceptions due to the differences between VB and VBA. The code in this directory is VB specific. Note, if the user wishes to modify the DLL implementation of the Avenue Wraps it is this file, avwraps.vbp, that should be altered. 4. The directory 'forms' includes the form modules used by the ArcMap document file, avwraps.mxd. The forms in this directory function under a VBA environment and certain ones will function in a VB environment as well. Those that do not function in a VB environment will have a counterpart that can be found in the 'vb' directory. (ArcGIS 8.x SPECIFIC, not applicable for ArcGIS 9.x users) 5. The directory 'vb' contains the Avenue Wraps that are specific to VB rather than VBA. Since there is a difference between VB and VBA code, the code that is specific to a VB program is placed in this directory. In developing the Avenue Wraps an effort was made to make the code function in both a VB and VBA environment, however, due to differences between VB and VBA, some wraps had to be written twice, once for VB and another time for VBA. (ArcGIS 8.x SPECIFIC, not applicable for ArcGIS 9.x users) 6. The directory 'vbacode' contains all of the modules that make up the Avenue Wraps. Any text editor can be used to open an individual file. The ArcMap document file, avwraps.mxd, contains all of these files. The purpose of supplying this directory is so that the programmer can use Notepad or any other text editor to view a specific file while writing a VB/VBA macro which uses the Avenue Wraps. This approach somewhat simulates an online Help system. That is, the programmer writes the VB/VBA code and uses Notepad, etc. to view a specific Avenue Wraps for more detailed information. (ArcGIS 8.x SPECIFIC, not applicable for ArcGIS 9.x users)