Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop...
-
Upload
tobias-derick-morton -
Category
Documents
-
view
219 -
download
1
Transcript of Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop...
![Page 1: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/1.jpg)
Esri International User Conference | San Diego, CA
Technical Workshops |
Migrating Custom Desktop Solutions from 9.3 to 10John Hauck and Ralf Gottschalk
July 14th 2011
![Page 2: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/2.jpg)
Agenda
• Changes at ArcGIS 10- SDK Requirements
- 64 Bit support
- Publisher Policy Files
• Runtime Binding
• Changes to Component Registration
• New Customization Framework Options- Add-ins
- Enhancements to Python
• VBA Developer Migration
• VB6 Developer Migration
![Page 3: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/3.jpg)
Changes at ArcGIS 10
![Page 4: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/4.jpg)
SDK Requirements
• Visual Studio 2008 sp 1
• Visual Studio 2010
• Visual Studio Express 2008
• .NET Framework - 3.5 sp 1
• Eclipse Galileo or Ganymede
• JDK 6 update 16
• ArcGIS changes- Single ArcObjects SDK for each language
- Engine Runtime must be installed to develop with the controls
![Page 5: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/5.jpg)
64 Bit Support
• ArcGIS Desktop and Engine are 32 bit applications- Run as 32 bit applications on a 64 Bit OS
• For standalone applications- Set platform to x86 in Visual Studio Configuration
Manager
- Default is “Any CPU”
• At Version 10 ArcGIS applications are Large Address Aware- On 64 Bit OS processes can take up to 4 gigabytes of
RAM if available
![Page 6: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/6.jpg)
No Publisher Policy Files at ArcGIS 10
• Policy files specify assembly redirection- Installed into the GAC
- Included in previous versions of ArcGIS
• Desktop applications include an Application Configuration file - Redirects 9.3.x Assemblies to 10
- There for migration assistance only
- Recommended to recompile
![Page 7: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/7.jpg)
Runtime Binding
![Page 8: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/8.jpg)
Standalone Applications
• At ArcGIS 10 each product has it’s own runtime- Products have their own install locations
- Service pack products separately
- Uninstall service packs
• ArcObjects must be pointed to a runtime to work- Required for all standalone applications
- Must bind before making any other ArcObjects calls
- Preferably in your main method or in the application events
• Remember – Binding is not Licensing- Still have to check out a license after binding
Runtime Binding
![Page 9: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/9.jpg)
Standalone Application
• Add reference to ESRI.ArcGIS.Version
• Use the RuntimeManager static class- Call ESRI.ArcGIS.RuntimeManager.Bind
- Pass in product code of the target runtime
- Also BindLicense method- Which binds and calls AoInitialize under the hood
Runtime Binding - .NET
![Page 10: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/10.jpg)
Demo Runtime Binding
![Page 11: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/11.jpg)
Migrating Custom Components
![Page 12: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/12.jpg)
Component Registration
• Prior to 10, ArcGIS knew which customizations to load based on which categories a component was registered in
• Example Custom ArcMap Command- Implement ICommand
- Register COM component
- Register command in MxCommands Category
- Upon startup ArcMap reads all components in the MxCommands category and loads appropriate commands
Understanding component registration
![Page 13: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/13.jpg)
Registry
Component Registration at ArcGIS 9.x
My.dll
ArcMap.exeMxCommands
COM
ICommand
Regsvr32 or Regasm
![Page 14: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/14.jpg)
Component Registration
• ArcGIS 10 no longer reads component categories form the registry
• Component Category information is read from configuration files (*.ecfg)
Understanding component registration at 10
![Page 15: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/15.jpg)
Component Registration at ArcGIS 10
Registry
My.dll
ArcMap.exeMxCommands
COM
ICommand
ECFG
EsriRegasm
![Page 16: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/16.jpg)
Component Registration
• Components are still COM based- Must register custom components
• Use ESRIRegAsm.exe to register category information- Creates your *.ecfg file
- Places it into appropriate folder- Engine:
%CommonProgramFiles%\ArcGIS\Engine10.0\Configuration\CATID
- Desktop:
%CommonProgramFiles%\ArcGIS\Desktop10.0\Configuration\CATID
How to register custom components at 10
![Page 17: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/17.jpg)
Component Registration
• To Deploy little change needs to be made- Option 1:
- If you call RegSrv32.exe or RegAsm.exe
- Call ESRIRegAsm.exe instead
- ESRIRegAsm.exe <MyDll.dll> /p:<Product> /s
- Option 2: - Register like you always did and with COM copy the ecfg to the
appropriate location
- Engine:
%CommonProgramFiles%\ArcGIS\Engine10.0\Configuration\CATID
- Desktop:
%CommonProgramFiles%\ArcGIS\Desktop10.0\Configuration\CATID
How to deploy custom components
![Page 18: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/18.jpg)
Component Registration
• Adding the EsriRegAsm.exe step to your own .NET projects- Unload and edit project
- Add the custom build step
- This registers your component on build and unregisters on clean
• C++ developers add custom Post-Build Event- "$(CommonProgramFiles)\ArcGIS\bin\
esriregasm.exe" /p:Desktop "$(TargetPath)"
Adding registration to existing projects
![Page 19: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/19.jpg)
Migration Workflow Overview
![Page 20: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/20.jpg)
Migration
• ArcObjects SDK includes the Code Migration Analyzer- Provides warnings in the error list window to help with
migrating applications to 10
• Update debug start action to new ArcGIS executable locations
• Fix any changes to Assemblies
• Add new component registration step
• Standalone applications add the Binding code
Tips migration workflow
![Page 21: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/21.jpg)
Migrating Custom Components
![Page 22: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/22.jpg)
New Customization Framework Options
![Page 23: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/23.jpg)
New Customization Framework
• No COM registration required!
• Can use Java or .NET
• Create Add-in through an Eclipse or Visual Studio Wizard- Config.esriAddinsx xml file and a class
- New items can be created through wizard or through XML
• Compile Add-in- Creates an *.esriaddin file
- XCopy deployable
- Installation is as simple as double
clicking on the Add-in
Add-ins
![Page 24: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/24.jpg)
New Customization Framework
• Types of Add-in customizations- Button and tools
- Combo Boxes
- Menus, Context menus, Multi-items
- Toolbars and Tool palettes
- Dockable windows
- Extensions
- Editor Extension
Add-ins
![Page 25: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/25.jpg)
New Customization Framework
• Add-ins are installed on a per user basis
• No Administrative permissions required- Can be digitally signed
- Installation can be controlled by systems administrator - Block all Add-ins, block unsigned Add-ins, specify an
administrator folder, only allow Esri Add-ins
• Add-in can be placed on a network share and referenced through Add-in Manager- All updates will automatically be picked up next time
ArcGIS Desktop is loaded
Add-ins
![Page 26: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/26.jpg)
Demo Add-ins
![Page 27: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/27.jpg)
Python
• ArcPy site-package- Automation of GIS mapping functionality
- Printing and Exporting
- Manipulate Map Document and Layer Files
- Automate Map Book creation
- Automation of GIS analysis - Geoprocessing
- Python API for Spatial Analyst
- Python API for GeoStatistical Analyst
Enhanced at ArcGIS 10
![Page 28: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/28.jpg)
Python
• Can be leveraged throughout ArcGIS- Same scripts can run on
- Desktop
- Engine
- Server
- Windows / Linux
DesktopEngine Server
Enhanced at ArcGIS 10
![Page 29: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/29.jpg)
Demo Python
![Page 30: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/30.jpg)
VBA Migration
![Page 31: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/31.jpg)
VBA Migration
• Free VBA Compatibility Setup- Request license
- No Support and no SDK
- Available to allow existing solution to still work doing migration
• Esri urges your to migrate VBA application to a supported development environment
• Where should a VBA developer go?
Status for 10.1
![Page 32: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/32.jpg)
VBA Migration
• Why migrate to Python?- Simpler API
- Perfect for Automation of Mapping and GIS Analysis
- Functionality will increase over time
- Python can be leveraged from any development environment
• Why might Python not be an option?- Not an ArcObjects replacement
- Review ArcPy and make sure it does what you need
- Need to completely rewrite your code- Business logic will need to be changed significantly
Python
![Page 33: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/33.jpg)
VBA Migration
• Why migrate to Add-ins?- A lot of code can be copied and pasted in a VB.net
application
- Types of customizations are the same or similar
- Simple deployment model
Add-ins
![Page 34: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/34.jpg)
Migrating VBA to Add-ins
![Page 35: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/35.jpg)
VB6 Migration
![Page 36: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/36.jpg)
VB6 Migration
• As of ArcGIS 10 VB6 is no longer supported- We don’t ship a VB6 SDK
- We don’t install the VB6 runtime
• What does this mean for VB6 Components?- Migrate to a supported language
- ArcObjects SDK contains many resource to help with the migration process- Case studies
- Samples
- Tips
Current Status
![Page 37: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/37.jpg)
Component Registration at ArcGIS 10
Registry
My.dll
ArcMap.exe
COM
ICommand
MxCommands
EsriRegasm and Regsrv32
![Page 38: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/38.jpg)
VB6 Migration
• For large VB6 solutions- Migrate components bit by bit
• VB6 components are not blocked by the ArcGIS system- Components can be registered to help in the migration
process KB 37639- Test components thoroughly
- Replace with supported components as they become available
Migration Strategy
![Page 39: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/39.jpg)
Registering Components for Migration
![Page 40: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/40.jpg)
Questions?
• Please don’t forget to fill out the surveys.
• www.esri.com/sessionevals
![Page 41: Esri International User Conference | San Diego, CA Technical Workshops | Migrating Custom Desktop Solutions from 9.3 to 10 John Hauck and Ralf Gottschalk.](https://reader037.fdocuments.in/reader037/viewer/2022103007/56649d845503460f94a6aa7b/html5/thumbnails/41.jpg)