Hi,
I want to explain a little bit about how to write the VBA code that's required to read Civil 3D object properties because there is a couple of things that you need to be aware of depending on what you are trying to accomplish:
example code is:
RESULT="—"
(common VBA technique to publish the outcome of the code at the beginning)
On Error Resume Next
(this ensures that if the code fails the program does not crash)
Set oApp=GetObject(, "AutoCAD.Application")
(Civil 3D is built on top AutoCAD so we must get access to the acad application first)
Set oCivilApp=oApp.GetInterfaceObject("AeccXUiLand.AeccApplication.11.0")
(this is where it starts getting tricky because there is 4 major civil application that can be listed here, then you must specify the version depending on what Civil 3D year version you are running)
The 4 Civil apps are
- AeccxUiLand (all other Civil 3D Objects)
- AeccUiPipe (for Pipe Networks)
- AeccxUiRoadway (for Corridors)
- AeccxUiSurvey (survey Figures)

right click and go to properties/details tab to identify the version no. it is different per the Civil 3D year version. (Civil 3D 2019 is v. 13.0)

Set obj=oCivilApp.ActiveDocument.HandleToObject("[Handle]")
(you must have the Handle field included in your property set! this is going to be an automatic field that must be added prior to creating this formula field, it's necessary because it creates the link between the object designation in AutoCAD and it's Civil 3d properties)
RESULT=obj.Name
(finally we are going to reveal the property of the Civil 3d object that we want to read)
the best and easiest way to get a complete picture of what properties you can read and what to write on this line is to run the DumpObject.LSP provided at http://www.lee-mac.com/dumpobject.htmlObject.
this lisp routine will result is an example listing as the following that I generated by selecting a pipe object, as you can see you now have all the Civil 3D Property Names applicable to a certain object and you can now use the property name as a Result in your VBA Code (note that the properties are different for each object so properties of a structure are different than those for a pipe)
Select object: ; IAeccPipe: Pipe interface
; Property values:
; Alignment = nil
; Application (RO) = #<VLA-OBJECT IAeccApplication 000001c5c35d8080>
; ClosestPointTo (RO) = ...Indexed contents not shown...
; Connectors (RO) = #<VLA-OBJECT IAeccConnectors 000001c5c35d8da0>
; Description = "12 inch Concrete Pipe"
; DisplayName (RO) = "Pipe - (1)"
; Document (RO) = #<VLA-OBJECT IAeccDocument 000001c5c35d8590>
; EGLDown = 0.0
; EGLUp = 0.0
; EndPoint (RO) = #<VLA-OBJECT 000001c5c35d87a0>
; EndStructure (RO) = #<VLA-OBJECT IAeccStructure 000001c5c33b2990>
; EntityTransparency = "ByLayer"
; FlowDirection (RO) = 1
; FlowDirectionMethod = 1
; Handle (RO) = "86C8"
; HasExtensionDictionary (RO) = 0
; HGLDown = 0.0
; HGLUp = 0.0
; HoldOnResize = 0
; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 000001c5c3bc5548>
; InnerDiameterOrWidth (RO) = 1.0
; InnerHeight (RO) = 1.0
; IsMaxCoverViolated (RO) = ...Indexed contents not shown...
; IsMinCoverViolated (RO) = ...Indexed contents not shown...
; Labels (RO) = #<VLA-OBJECT IAeccPipeLabels 000001c5c3c25eb0>
; Layer = "C-STRM-PIPE"
; Length2D (RO) = 115.963
; Length3D (RO) = 115.969
; Linetype = "ByLayer"
; LinetypeScale = 1.0
; Lineweight = -1
; Material = "ByLayer"
; MaximumCover (RO) = 0.0
; MinimumCover (RO) = 0.0
; Name = "Pipe - (1)"
; ObjectID (RO) = 42
; ObjectName (RO) = "AeccDbPipe"
; OuterDiameterOrWidth (RO) = 1.33333
; OuterHeight (RO) = 1.33333
; OwnerID (RO) = 43
; ParamsBool (RO) = #<VLA-OBJECT 000001c5c35d9f40>
; ParamsDouble (RO) = #<VLA-OBJECT 000001c5c35da420>
; ParamsLong (RO) = #<VLA-OBJECT 000001c5c35da480>
; ParamsString (RO) = #<VLA-OBJECT 000001c5c35d9fa0>
; PartDataRecord = #<VLA-OBJECT IAeccPartDataRecord 000001c5c35da840>
; PartFamily (RO) = #<VLA-OBJECT IAeccPartFamily 000001c5beb87e60>
; PartSizeName (RO) = "12 inch Concrete Pipe"
; PartType (RO) = 10
; PlotStyleName = "ByLayer"
; PointAtParam (RO) = ...Indexed contents not shown...
; Position (RO) = #<VLA-OBJECT IAeccPoint3d 000001c5c35da930>
; ProfileNetworkParts (RO) = #<VLA-OBJECT IAeccGraphProfileNetworkParts 000001c5c3c25910>
; Radius (RO) = 0.0
; ShowToolTip = -1
; Slope (RO) = 0.01
; StartPoint (RO) = #<VLA-OBJECT 000001c5c35db350>
; StartStructure (RO) = #<VLA-OBJECT IAeccStructure 000001c5c33b6190>
; STMPipeMetadata = unsupported result type: 65
; Style = #<VLA-OBJECT IAeccPipeStyle 000001c5beb894e0>
; SubEntityType (RO) = 0
; Surface = nil
; SweptShape (RO) = 2
; TrueColor = #<VLA-OBJECT IAcadAcCmColor 000001c5c3bc61a0>
; Visible = -1
; WallThickness (RO) = 0.166667
Hope this helps,
Samir Rezk
Technical Support Specialist