Home
Add Document
Sign In
Create An Account
Developing Python Add-ins for ArcGIS for Desktop
Download PDF
Comment
Report
18 Downloads
215 Views
Developing Python Add-ins for ArcGIS for Desktop Jason Pardy
What are add-ins?
•
•
New model for ArcGIS Desktop application customization -
Collection of tools on a toolbar
-
Perform action in response to application event
Easy to build, install, and share -
No Component Object Model (COM) registration
-
Loaded from well-known folders
-
Authored in .NET, Java, or Python (10.1)
Why use Python? IMapDocument mxd = new MapDocumentClass(); mxd.Open(@"C:\Data\MyMap.mxd", null); IMap map = mxd.get_Map(0); • Python makes add-ins easier ILayer lyr = map.get_Layer(0); - No DLLs IFeatureLayer featureLyr = (IFeatureLayer)lyr; - No compiling IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass(); IWorkspace = workspaceFactory.OpenFromFile(@"C:\Data\New.gdb", 0); - Nowksp ArcObjects IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)wksp; - Less code IFeatureClass newFC = featureWorkspace.OpenFeatureClass("cities"); featureLyr.FeatureClass = newFC; mxd.Save(false, false); mxd = arcpy.mapping.MapDocument(r"C:\Data\MyMap.mxd") lyr = arcpy.mapping.ListLayers(mxd)[0] lyr.replaceDataSource(r"C:\Data\New.gdb", "FILEGDB_WORKSPACE", "cities") mxd.save()
Supported add-in types
•
Buttons and tools
•
Toolbars
•
Tool palettes
•
Combo boxes
•
Menus
•
Extensions
•
Dockable windows are not supported
•
No custom UI support
Using Python add-ins
Python Add-In Wizard
Recommend Documents
ArcGIS 10.1 for Desktop
Using Python with ArcGIS Runtime Desktop SDKs
Developing Apps for ArcGIS Marketplace
.NET Add-Ins for ArcGIS for Desktop
.NET Add-ins for ArcGIS for Desktop
Using Python with ArcGIS
Using Python with ArcGIS
Python 101: Using Python with ArcGIS
×
Report Developing Python Add-ins for ArcGIS for Desktop
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
×
Sign In
Email
Password
Remember me
Forgot password?
Sign In
Login with Facebook
Our partners will collect data and use cookies for ad personalization and measurement.
Learn how we and our ad partner Google, collect and use data
.
Agree & Close