AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
*GLC
Message 1 of 2 (77 Views)

VBA code causes Fatal Error with Grid Volume Surfaces in dwg

77 Views, 1 Replies
04-11-2004 09:01 PM
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
*Brian Hailey
Message 2 of 2 (77 Views)

Re: VBA code causes Fatal Error with Grid Volume Surfaces in dwg

04-12-2004 06:59 AM in reply to: *GLC
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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.