Hi,
The code included below works fine until I have a grid volume surface in the
drawing, even if it's not the first surface in the drawing, i.e.
osurfs.item(0). Can someone confirm if this is a defect or if I'm doing
something wrong? Thanks, GLC
--------------
Option Explicit
Public g_oCivilApp As AeccApplication
Public g_oAeccDoc As AeccDocument
Public g_oAeccDb As AeccDatabase
Public g_StyCount As Integer
Public doObjectData As Boolean
Sub getCivilObjects()
Dim oApp As AcadApplication
Set oApp = ThisDrawing.Application
Set g_oCivilApp = oApp.GetInterfaceObject("AeccXUiLand.AeccApplication")
Set g_oAeccDoc = g_oCivilApp.ActiveDocument
Set g_oAeccDb = g_oAeccDoc.Database
End Sub
Sub SurfaceUtilities()
'NOTE this causes as FATAL ERROR when the drawing contains a grid volume
surface
Debug.Print vbCrLf + " SURFACE UTILITIES"
Debug.Print " -----------------"
getCivilObjects
Dim oSurfs As AeccSurfaces
Dim oSurf As AeccSurface
Set oSurfs = g_oAeccDoc.Surfaces
Set oSurf = oSurfs.Item(0) 'breakpoint set here
Debug.Print " Surface name - " & oSurf.Name
Debug.Print " Surface type - " & oSurf.Type
Debug.Print " Stylename - " & oSurf.StyleName
Debug.Print vbCrLf + " DONE..."
End Sub