Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VBA code causes Fatal Error with Grid Volume Surfaces in dwg

1 REPLY 1
Reply
Message 1 of 2
Anonymous
171 Views, 1 Reply

VBA code causes Fatal Error with Grid Volume Surfaces in dwg

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
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Hi GLC, You seem to be asking a lot of customization questions. You will probably get a lot of answers if you post your questions in the autodesk.aec.land-desktop.customization newsgroup. This newsgroup is focused primarily on the up and coming Civil3D software and, as of now, has a limited (but very knowledgeable) following. Brian

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report