paunicm Posted March 17, 2013 Posted March 17, 2013 I am trying to read superelevation data from Civil 3D 2012 by VBA, but it is not successful, I think the problem is establishing reference for Superelevation only for Civil 3D 2012. Maybe somebody can help. Thanks. PM Quote
BlackBox Posted March 17, 2013 Posted March 17, 2013 Welcome to CADTutor! Could you post the code you're using (that is not successful), so that we may help you? Quote
BIGAL Posted March 18, 2013 Posted March 18, 2013 With no code are you opening the AeccXUiLand.AeccApplication. Quote
paunicm Posted March 18, 2013 Author Posted March 18, 2013 Please, see the code below: Dim oApp As AcadApplication Set oApp = ThisDrawing.Application ' NOTE - Always specify the version number. Const sAppName = "AeccXUiLand.AeccApplication.9.0" Dim g_oCivilApp As AeccApplication Set g_oCivilApp = oApp.GetInterfaceObject(sAppName) If (g_oCivilApp Is Nothing) Then MsgBox "Error creating " & sAppName & ", exit." Exit Sub End If Dim g_oDocument As AeccDocument Set g_oDocument = g_oCivilApp.ActiveDocument Dim ObjAlignment As AeccAlignment Set ObjAlignment = g_oDocument.AlignmentsSiteless.Item(0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''' MsgBox ObjAlignment.Name 'Up to here All Ok ! 'But how can I make reference to "SuperElevationDataElement" 'see next link: 'http://docs.autodesk.com/CIV3D/2012/ENU/API_Reference_Guide/com/civil_om_civil.htm PM Quote
BIGAL Posted March 21, 2013 Posted March 21, 2013 Keep going down the tree maybe Dim objalignmentname as objalignment.name ? set objsuper = objalignmentname.SuperElevationDataElement Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.