Upload
horacio-rodriguez
View
239
Download
0
Embed Size (px)
Citation preview
8/13/2019 Building Arcgis Applications for Autocad
1/25
Building ArcGIS Applications for AutoCADBuilding ArcGIS Applications for AutoCAD
Karen Hodge, CAD Development LeadKaren Hodge, CAD Development Lead
&&
Don Kuehne, CAD Product ManagerDon Kuehne, CAD Product Manager
8/13/2019 Building Arcgis Applications for Autocad
2/25
IntroductionsIntroductions
Who are we?Who are we?
We are CAD at ESRIWe are CAD at ESRI
Who are you?Who are you?
.NET programmers.NET programmers
GIS professionals creating magicGIS professionals creating magic
Understand how to use CAD in Arc MapUnderstand how to use CAD in Arc Map
Not AutoCAD programming wizardsNot AutoCAD programming wizards
8/13/2019 Building Arcgis Applications for Autocad
3/25
ScheduleSchedule
GoalsGoals
Inspire you to go fartherInspire you to go farther
Today we will coverToday we will cover
.NET with ArcGIS Geoprocessing in C#.NET with ArcGIS Geoprocessing in C#
.NET with AutoCAD.NET with AutoCAD
Accessing Geoprocessing from AutoCADAccessing Geoprocessing from AutoCAD
o u ons o common wor owso u ons o common wor ows
Please complete the session survey!Please complete the session survey!
8/13/2019 Building Arcgis Applications for Autocad
4/25
Getting Ready: .NET Geoprocessing in ArcGISGetting Ready: .NET Geoprocessing in ArcGISWhat you need to get startedWhat you need to get started
What ou DO NOT need:What ou DO NOT need:
Mastery of Arc ObjectsMastery of Arc Objects
What you DO need:What you DO need:
ArcGIS 9.3 SP1 (+)ArcGIS 9.3 SP1 (+)
.. ..
Licensing: Server, Desktop, EngineLicensing: Server, Desktop, Engine
Understanding of GeoprocessingUnderstanding of Geoprocessing
ccess o amp esccess o amp es http://resources.esri.com/ArcgisServer/http://resources.esri.com/ArcgisServer/
http://resources.esri.com/CADdata/http://resources.esri.com/CADdata/
On Your MarksOn Your Marks
8/13/2019 Building Arcgis Applications for Autocad
5/25
Getting Ready: Mapping Specification for DWGGetting Ready: Mapping Specification for DWGYour CAD/GIS Power ToolYour CAD/GIS Power Tool
What ou mi ht WANT:What ou mi ht WANT:
A better way to organize CAD dataA better way to organize CAD data
. .. . .. _ _ __ _ _ ..
ArcGIS for AutoCADArcGIS for AutoCAD
User Interface for Mapping SpecificationUser Interface for Mapping Specification
And moreAnd more
On Your MarksOn Your Marks
8/13/2019 Building Arcgis Applications for Autocad
6/25
.NET with ArcGIS Geoprocessing.NET with ArcGIS GeoprocessingWriting console applications using Geoprocessing ToolsWriting console applications using Geoprocessing Tools
Demo from Sam le: ArcGIS GP ConsoleDemo from Sam le: ArcGIS GP Console
-- Server Developer HelpServer Developer Help-- http://resources.esri.com/arcgisserver/http://resources.esri.com/arcgisserver/
Geoprocessor gp = new Geoprocessor();
ESRI.ArcGIS.ConversionTools.ExportCAD ec =new ESRI.ArcGIS.ConversionTools.ExportCAD();
ec.in_features = @"C:\Data\USA_Data.gdb\states";
ec.Output_Type = "DWG_R2007";
ec.Output_File = @"C:\Data\Output\Output.DWG";
ec.Seed_File = @"C:\Data\defaultSeed.dwg";
gp.OverwriteOutput = true;
gp.Execute(exportCad, null);
Get SetGet Set
8/13/2019 Building Arcgis Applications for Autocad
7/25
Today we will coverToday we will cover
.NET with ArcGIS Geo rocessin in C#.NET with ArcGIS Geo rocessin in C#
Getting started with AutoCAD programmingGetting started with AutoCAD programming
.NET with AutoCAD.NET with AutoCAD
Accessing Geoprocessing from AutoCADAccessing Geoprocessing from AutoCAD
Solutions to common CAD/GIS workflowsSolutions to common CAD/GIS workflows
Next: Getting started in AutoCAD programmingNext: Getting started in AutoCAD programming
8/13/2019 Building Arcgis Applications for Autocad
8/25
.NET in AutoCAD.NET in AutoCADWhat you need to get startedWhat you need to get started
Version of AutoCAD withVersion of AutoCAD with .Net.Net 2.02.0
2007, 2008, 20092007, 2008, 2009Map 3d, Civi l 3d, etcMap 3d, Civi l 3d, etc
croso sua u o , erv ce accroso sua u o , erv ce ac
www.autodesk.com/developautocadwww.autodesk.com/developautocad
Introduction to AutoCAD .NET ProgrammingIntroduction to AutoCAD .NET Programming
Video tutorialVideo tutorial
Closing Statement (16 point yellow italic)Closing Statement (16 point yellow italic)
8/13/2019 Building Arcgis Applications for Autocad
9/25
ObjectARX SDKObjectARX SDK Which to Use?Which to Use?
2008 2009
API Version 2007 2008 64-bit 2009 64-bit 2010
ObjectARX 2007 Yes Yes No Yes No No
ObjectARX 2008 No Yes No Yes No No
ObjectARX 2008 64 bit No No Yes No? Yes No
ObjectARX 2009 No No No Yes Yes No*
8/13/2019 Building Arcgis Applications for Autocad
10/25
AutoCAD .NET : Hello, WorldAutoCAD .NET : Hello, WorldA first program in AutoCADA first program in AutoCAD
Ob ectARX WizardOb ectARX Wizard
Prototype:Prototype: SendStringToExecuteSendStringToExecute NetLoadNetLoad for Managed Applicationsfor Managed Applications
CommandMethod("HelloWorld")]
static public void HelloCommand()
SendStringToExecute(
"(command \"_text\" '(10.0 10.0 0.0)
200 0 \"Hello, World\")",
a se, a se, a se ;}
Programming in AutoCADa first stepProgramming in AutoCADa first step
8/13/2019 Building Arcgis Applications for Autocad
11/25
Today we will cover:Today we will cover:
.NET with ArcGIS Geo rocessin in C#.NET with ArcGIS Geo rocessin in C#
Getting started with AutoCAD programmingGetting started with AutoCAD programming
.NET with AutoCAD.NET with AutoCAD
Accessing Geoprocessing from AutoCADAccessing Geoprocessing from AutoCAD
Solutions to common CAD/GIS workflowsSolutions to common CAD/GIS workflows
Next: Putting it all togetherNext: Putting it all together
8/13/2019 Building Arcgis Applications for Autocad
12/25
AutoCAD .NET : Hello, ArcGIS!AutoCAD .NET : Hello, ArcGIS!Putting it all togetherPutting it all together
Insert into current fi leInsert into current fi le
CommandMethod("HelloArcGIS")]
static public void GrabCommand()
Geoprocessor gp = new Geoprocessor();
ESRI.ArcGIS.ConversionTools.ExportCAD ec =
new ESRI.ArcGIS.ConversionTools.ExportCAD();ec. n_ ea ures = : a a _ a a.g s a es ;
ec.Output_Type = "DWG_R2007";
ec.Output_File = @"C:\Data\Output\Output.DWG";
ec.Seed_File = @"C:\Data\defaultSeed.dwg";
gp.OverwriteOutput = true;
gp.Execute(ec, null);
InsertFile(ec.Output_File);
Programming in AutoCADa first stepProgramming in AutoCADa first step
8/13/2019 Building Arcgis Applications for Autocad
13/25
Adding Coordinate Systems to AutoCADAdding Coordinate Systems to AutoCAD
ArcGIS for AutoCADArcGIS for AutoCAD
Mapping Specification
for DWG
Coordinate Systems
8/13/2019 Building Arcgis Applications for Autocad
14/25
Today we will cover:Today we will cover:
.NET with ArcGIS Geo rocessin in C#.NET with ArcGIS Geo rocessin in C#
Getting started with AutoCAD programmingGetting started with AutoCAD programming
.NET with AutoCAD.NET with AutoCAD
Accessing Geoprocessing from AutoCADAccessing Geoprocessing from AutoCAD
Solutions to common CAD/GIS workflowsSolutions to common CAD/GIS workflows
Next: Common workflow solutionsNext: Common workflow solutions
8/13/2019 Building Arcgis Applications for Autocad
15/25
Common CAD Integration WorkflowsCommon CAD Integration WorkflowsSubtitle (16 point yellow i talicSubtitle (16 point yellow i talic))
Viewin CAD in Ma sViewin CAD in Ma s
ArcMapArcMap
u ng a a n ou ng a a n o
ExportCADExportCAD
Pushing CAD into GISPushing CAD into GIS
Data CleanupData Cleanup
Using CAD in GIS AnalysisUsing CAD in GIS Analysis
Closing Statement (16 point yellow italic)Closing Statement (16 point yellow italic)
8/13/2019 Building Arcgis Applications for Autocad
16/25
Data Loading from CADData Loading from CADUnderstanding the requirementsUnderstanding the requirements
Understand the oalUnderstand the oal
Load just the new parcelsLoad just the new parcels
n ers an e pro emn ers an e pro em
Parcels = PolygonParcels = Polygon
Filtering dataFiltering data
Evaluate possible solutionsEvaluate possible solutions
a e ayer a e ayer
How can you organize CAD data better?How can you organize CAD data better?
8/13/2019 Building Arcgis Applications for Autocad
17/25
Feature Class Organization in AutoCADFeature Class Organization in AutoCAD
ArcGIS for AutoCADArcGIS for AutoCAD
Mapping Specification
for DWG
Coordinate Systems
Feature Classes
8/13/2019 Building Arcgis Applications for Autocad
18/25
Demo: Data Loading WorkflowDemo: Data Loading WorkflowPrototyping a solutionPrototyping a solution
Geo rocessin o tions for loadin dataGeo rocessin o tions for loadin data
CommandMethod(CADToGIS")]
static public void LoadCommand()
Geoprocessor gp = new Geoprocessor();
ESRI.ArcGIS.ConversionTools.ExportCAD cf =
new ESRI.ArcGIS.DataManagement.CopyFeatures();. _ .
cf.output_features = @"C:\Data\maury.gdb\parcels
gp.OverwriteOutput = true;
. ,
}
Closing Statement (16 point yellow italic)Closing Statement (16 point yellow italic)
8/13/2019 Building Arcgis Applications for Autocad
19/25
Understanding your DataUnderstanding your DataWhen doing it wrong is the right thing to doWhen doing it wrong is the right thing to do
PolylinePolyline != Parcels!= Parcels
8/13/2019 Building Arcgis Applications for Autocad
20/25
Demo: Data Loading from CADDemo: Data Loading from CADA better solutionA better solution
Understand the oalUnderstand the oal
Load just the new parcels with attributesLoad just the new parcels with attributes
n ers an e pro emn ers an e pro em
Parcel boundaries built into polygonsParcel boundaries built into polygons
Attaching interior text as attributeAttaching interior text as attribute
QA in CADQA in CAD
CADCAD--based feature classes forbased feature classes for polylinespolylines and textand text
Geoprocessing toolsGeoprocessing tools
If only we could use attributes in AutoCADIf only we could use attributes in AutoCAD
8/13/2019 Building Arcgis Applications for Autocad
21/25
Feature Attributes in AutoCADFeature Attributes in AutoCAD
ArcGIS for AutoCADArcGIS for AutoCAD
Mapping Specificationfor DWG
Name
ID
Value
Coordinate Systems Entity Attributes
Feature Classes
8/13/2019 Building Arcgis Applications for Autocad
22/25
Demo: The Whole PictureDemo: The Whole Picture
Data creation in CADData creation in CAD
Typical CAD workflowTypical CAD workflowMaps as landmarksMaps as landmarks
Analysis and Data Management in GISAnalysis and Data Management in GIS
ServerServer-- or Engineor Engine--based toolsbased tools
Data served to the EnterpriseData served to the Enterprise
rc erver rc erver ArcGIS for AutoCADArcGIS for AutoCAD
What else could we do?What else could we do?
8/13/2019 Building Arcgis Applications for Autocad
23/25
Today we coveredToday we covered
.NET with ArcGIS Geo rocessin in C#.NET with ArcGIS Geo rocessin in C#
Getting started with AutoCAD programmingGetting started with AutoCAD programming
.NET with AutoCAD.NET with AutoCAD
Accessing Geoprocessing from AutoCADAccessing Geoprocessing from AutoCAD
Solutions to common CAD/GIS workflowsSolutions to common CAD/GIS workflows
Still have questions?Still have questions?
8/13/2019 Building Arcgis Applications for Autocad
24/25
Additional ResourcesAdditional ResourcesQuestions, answers and informationQuestions, answers and information
Tech TalkTech Talk ESRI Resource CentersESRI Resource CentersOutside this room right now!Outside this room right now! PPTs, code and videoPPTs, code and video
resources.esri.comresources.esri.com
www.twitter.com/www.twitter.com/
ESRIDevSummitESRIDevSummit
tinyurl.com/tinyurl.com/
ESRIDevSummitFBESRIDevSummitFB
8/13/2019 Building Arcgis Applications for Autocad
25/25