A post long overdue: What I did one hot Summer…
It was this same holiday season in Australia just as they were in many places around the world at the same time. During those times we usually have some serious weather around there: 42C (110F) temperatures, no wind unless it’s the one that feels like someone pointed a hairdryer in your face, full force set on ”Hot”…
So if you’re not watching tennis or indulging somewhere on the beach and working towards that hard earned skin cancer, you would be sitting in an air conditioned room and fiddling with Civil 3D API. What else!
And so, I had someone ask me to populate Object Data field named “Elevation” in their ArcView® shape files with Civil 3D Surface elevations AND (believe it or not) PAY me for the privilege. All that for some 2000 point symbols in a utility network.
So there we were, it came out from the neck of the woods where I would not expect to get such request. But it was a legitimate call to automate integration of Spatial data with the Civil Engineering functions or objects, in Civil 3D.
So I jumped to the opportunity to bring to life this whole idea of Spatial-Civil integration. And here is what came out of that:
The client had imported some ArcView Shape files in Civil 3D. Points data - nodes in a utility network. The attribute table was imported but there was one unknown value: Rim Elevation! The survey of the network was done and the Surface Object was in Civil 3D drawing file.
But, we’ve got this when we list the porperties of any node:
< Click on the thumbnail to enlarge
After trying a couple of methods to achieve this with AutoCAD Map 3D and Civil 3D we arrived at the conclusion that the APIs of both Map and Civil can be utilized to solve this. A little user interface and some digging through Dictionaries of Object Data Tables produced this utility:
< Click on the thumbnail to enlarge
After this quick selection process, we had all similar objects (type, Layer, OD Table Name etc.) populated with Elevations from selected Surface Object. and the results were showing:
< Click on the thumbnail to enlarge
Civil 3D 2008 provides utilities to drape a selection of different objects on to a selected surface. However, AutoCAD Point Object is not supported, this would change the Z-coordinate of insertion point only and we could not pass the value of it to a selected OD Table field. Because Property Alterations don’t support using Object Properties to set a value for a selected OD Table field.
Nothing that a little VBA can’t achieve and bring the Spatial data and Civil Engineering together!
Hasta pronto!