April 30, 2009

Industry Specific GIS Data Models in AutoCAD

My mature Valencia orange tree is full of fruit, and it will have ripe fruit from April thru August, which means as much fresh orange juice as I want to squeeze and drink from the single tree. My lemon tree is still small, but it usually has at least one ripe lemon on it every month of the year. I planted a baby avocado tree two years ago, still no fruit…

I reap the fruit of the previous owner’s planting and care of my orange tree. The lemon tree I planted is starting to produce, and the avocado tree is an investment in the future for me.

One free benefit of ArcGIS for AutoCAD that I can start working with right away is accessing ArcGIS map services in AutoCAD with ArcGIS for AutoCAD. As a GIS administrator I can immediately connect the AutoCAD professionals in other departments, and AutoCAD-based contractors outside my organization by looking at the common and direct view of the enterprise GIS basemap through a map service.

Another benefit that is growing in importance is the ability for these same AutoCAD users to create GIS-ready data with the tools in ArcGIS for AutoCAD that build content according to the mapping specification for drawings.

I can use industry specific GIS data models defined by various industry experts for GIS in AutoCAD too! Within ArcGIS I simply export a sample geodatabase like the Water Model available on ESRI.com to an AutoCAD file using the ArcGIS EXPORT TO CAD tool available with ArcView, and presto I have the water model industry schema designed for use in GIS within AutoCAD according to the mapping specification for drawings! Used as an AutoCAD template file, blank versions of the schema can be passed along to others to fill up with water-model content, I know that when the CAD data is brought back into ArcGIS it will be readily usable.
Time to pick some more oranges.

April 22, 2009

Editing GIS Data in CAD: Attributes

I rented a house on vacation. The house was furnished with cooking utensils and the alike. We packed just our personal stuff that we intended to enjoy while we where there in the new environment. It wasn’t like home; lots of things were different, how things were organized, different interfaces to the appliances etc. We benefitted from having those things there, and not having to pack them. Not surprisingly their stuff was chosen and adapted for a more rugged and minimalist life at the beach. We cooked and played with their stuff, using stuff we brought or bought while we where there. Like all good vacations we took back family memories and experiences that updated and recharged various attributes of our lives.

ArcGIS desktop reads and writes both AutoCAD and Microstation files. In the case of AutoCAD files, ESRI’s mapping specification for drawing allows attributed GIS features to be included in plain AutoCAD files. So what good is that? It is useful for me to create AutoCAD data that will also be used as GIS data and to comply with GIS submittal requirements, but what about as a means for editing ArcGIS data in ArcGIS data sources?

If I want to allow AutoCAD users to make attribute-only edits to my ArcGIS data I can use ArcGIS geoprocessing tools like EXPORT TO CAD, JOIN and CALCULATE to facilitate the workflow. By exporting ArcGIS data to an AutoCAD file with the EXPORT TO CAD tool, the resultant AutoCAD file retains the unique object identifier and feature class organization and attributes of the source ArcGIS feature class according to the mapping specification for drawings. I can make attribute edits to the copy of the data in AutoCAD with ArcGIS for AutoCAD, or any other MSD compliant application. After attribute changes are made to that copy of the data, I can JOIN the AutoCAD version of the data to the original ArcGIS GIS feature class, based on the unique object identifier field and use the geoprocessing CALCULATE tool to move the attributed data from the CAD-based copy of the data to the geodatabase version for each of the attribute fields I want to update.

April 09, 2009

Missing Link








Oops, forgot to add the link to the AutoLISP routine in the original version of the last post.

April 03, 2009

One More Time Around the Block

My birthday is coming up soon and I’m planning on celebrating with an Easter vacation on the beach. The retreat is also doubling as our summer vacation, and payback to my wife for abandoning her every weekend and evening to coach basketball this winter. My daughter is also planning to celebrate her belated birthday at the beach. Her birthday party was also delayed because of the basketball schedule.

In a previous post I discussed some of the reasons I may want to continue to use block attributes as a means to attribute point feature in AutoCAD even when using the Mapping Specification for Drawings to create data for use in ArcGIS.

Here is a new AutoLISP Routine that will build the MSD feature class schema in a drawing based on all of the block definitions and attributes on those block definitions that are contained in a drawing. The included AutoLISP command is called esri_BlockToFC. This tool is useful to generate new MSD feature classes and attributes when moving away from relying on AutoCAD block attributes as a means to store attributes in an AutoCAD file on Point, Line or Polygon entities. It will use the tag name of attributes and generate typed fields according to the any default value you may have specified for a particular ATTDEF. If the default value for the ATTDEF called diameter has a default value of 4.5 then this lisp routine will create an MSD feature class attribute with a floating type attribute. I can override the type of a field using the feature class management panel of ArcGIS for AutoCAD.

The MSD feature class filter criteria created for each feature class will be based solely on the block name from each block. I generally do not need different feature classes for every block in my drawing. I will likely need to use the ArcGIS for AutoCAD feature class management panel to rename feature classes and consolidate blocks, or remove or re-define the filtering criteria for the feature classes that get created. In the case where I might have blocks holding attributes for lines or polygons I will change the feature class type and the filtering criteria. I can use these tools to automate the process of copying attribute schema from my existing block attribute-based data creation workflows to take advantage of the MSD capabilities of ArcGIS for AutoCAD and ArcGIS Desktop. If nothing else it is an example of customizing the ArcGIS for AutoCAD application in a useful way with AutoLISP.

April 02, 2009

Geoprocessing, MSD and .NET

“Nothing but net” is a welcome refrain for basketball shooters. I hope you will find these .NET samples connecting AutoCAD with ArcGIS Geoprocessing located on ArcScripts equally valuable.

I enjoyed meeting with the CAD savvy developers at ESRI 2009 Developers Summit. Hello again to all of you who attended our CAD technical presentation at the conference or that met with the CAD team at the breakout session. Karen the co-presenter and author of the samples, has posted the sample code on ArcScripts. This code was demonstrated during our session to connect AutoCAD .NET to ArcGIS’s Geoprocessing tools via .NET for the purpose of extracting data from ArcGIS sources as CAD data. Conversely the samples also include adding data from CAD drawings into ArcGIS data stores. These coding samples are available here on ArcScripts.

The samples are a concrete programming examples of the topic I introduced in a recent blog posting on bouncing CAD files off of geoprocessing.
FREE hit counter and Internet traffic statistics from freestats.com